Task API
Submit Task
Submit an AI generation task and immediately receive a taskId
POST
Submit an asynchronous generation task. All models (image, video) share this endpoint, distinguished by the
model parameter.
400 responses from this endpoint can mean either:- request validation failed, such as a missing required field
- the request was blocked by pre-submission content moderation
msg: "content rejected by moderation" plus data.flagged and data.categories fields with the moderation result details.Model name. For example,
nano-banana, veo3, etc. See individual model documentation for details.Model input parameters, including prompt and model-specific parameters.
Webhook callback URL. When the task reaches a terminal state, the system will send a POST request to this URL. Localhost is not supported.
Caller’s user identifier, used for request tracing.