Skip to content
Docs menu

API reference

Poll a task

On this page

GET /api/v1/task/{taskId}?model={modelId}

Returns the task state and, once complete, the result URLs. Pass the same modelId you created the task with as the model query parameter.

json
{
  "taskId": "a1b2c3d4e5f6g7h8",
  "state": "success",
  "resultUrls": ["https://you.bot/api/file?t=…"]
}
  • Poll every 2–3 seconds; back off if a task runs long. Most media tasks finish in seconds to a couple of minutes.
  • Stop polling when state is success or fail.
  • On fail, the response includes an error message and the credits are refunded.
Result URLs are served from our domain through an opaque token — the upstream provider's storage is never revealed.