Referência API
Create a JSON task
Unified JSON task creation for supported image and video tasks. Pass task_type and a params object. Optional webhook_url is stored on the task.
POST
/api/go/b2b/tasks/createSolicitação
| Field | Type | Required | Description |
|---|---|---|---|
task_type | string | Required Yes | Supported task type such as API_TEXT_TO_IMAGE_GPT_IMAGE_2. |
params | object | Required Yes | Task-specific parameters. See the Task params tab. |
context | object | Required No | |
webhook_url | string | Required No | Responda HTTP 2xx. Elimine duplicações por task_id e mantenha consultas como alternativa. code=0 não garante a geração. |
context.page_source | string | Required No | Optional caller-side source marker for analytics or debugging. |
Estrutura da resposta
| Field | Type | Required | Description |
|---|---|---|---|
task_id | string | Required Yes | Task UUID for polling and result lookup. |
status | string | Required Yes | PENDING / RUNNING / COMPLETED / FAILED / CANCELLED |
queue_position | integer | Required No | Queue position for async tasks. |
generation_params | object | Required No | Normalized task params saved by the backend. |
result | object | Required No | Returned immediately for synchronous tasks that complete during create. |
Exemplo de solicitação
JSON
{
"task_type": "ANIMA_TEXT_TO_IMAGE",
"params": {
"amount": 1,
"height": 1024,
"prompt": "anime character in a sunlit flower garden, delicate watercolor illustration",
"turbo": true,
"use_aesthetic": true,
"watermark": false,
"width": 1024
}
}