API Platform
createTask
POST /jobs/createTask — queue an async AI generation job on ModKie.
POST /jobs/createTask
POST /api/v1/jobs/createTask queues an asynchronous AI generation job and returns a taskId. HTTP 200 means the task was accepted into the queue, not that generation finished. Poll GET /jobs/recordInfo?taskId=… until state is success or fail, or pass callBackUrl for a completion webhook (Kie.ai-compatible). Credits are validated before accept; deduction happens only on success.
Creates an async generation task.
Request
{
"model": "google/veo-3-1",
"callBackUrl": "https://example.com/hooks/modkie",
"input": {
"prompt": "A cinematic drone shot over mountains at sunrise",
"aspect_ratio": "16:9",
"duration": "5"
}
}Optional top-level fields (same level as model, not inside input):
| Field | Description |
|---|---|
callBackUrl | HTTPS webhook URL for this task only. When set, ModKie POSTs unsigned task.completed JSON on terminal state. Authenticate task creation with your API key only — no platform webhook secret is required. |
callBackUrl must use HTTPS; localhost and 127.0.0.1 are rejected. Invalid values return HTTP 400 and the task is not created.
Response
{
"code": 200,
"msg": "success",
"data": { "taskId": "task_xxx" }
}Notes
- Image vs video routing is inferred from the model id when
capabilityis omitted - Optional
capability:"image"|"video" - Your account must have enough credits for the quoted model before the task is accepted (HTTP 402 if not)
- Credits are not deducted when
taskIdis returned — billing happens when recordInfo reportsstate=success - See Webhooks for callback payload format and account-level fallback