Submit with POST /v1/generate carrying mode, prompt, and an optional model id from the catalog. Media jobs may attach an init_image. You get a job id back; poll GET /v1/generations/{id} every few seconds until status is done (the result holds a media URL or text) or failed.
Full field list and lifecycle: Generation API.