Skip to main content
GET
Get task status

Get Task Status

Query image, video, audio, and 3D generation tasks and retrieve all returned files when complete.

Endpoint

Authentication

This endpoint currently retrieves tasks by task_id without requiring an Authorization header or checking task ownership. The examples include a Bearer header so they can share the same client configuration as authenticated submit requests.

Get API Key

Generate your API key from the console

Parameters

Path Parameters

Response

Success Response (200)

Response Fields

Status Values

Response Examples by Status

Not Started

Running (Image)

Finished (Image)

Finished (Video)

Failed

Code Examples

cURL

Python

JavaScript / Node.js

Go

Java

PHP

Ruby

Polling Best Practices

When polling for task completion, follow these recommendations:
Poll Interval: Check status every 2-5 seconds. Avoid polling more frequently to prevent rate limiting.
Timeout: Implement timeouts to avoid infinite loops. Typical generation times:
  • Images: 15-60 seconds
  • Videos: 90-300 seconds
Exponential Backoff: On rate limit (429) or server errors (5xx), implement exponential backoff (wait 1s, 2s, 4s, 8s…).

Complete Polling Example

Error Responses

HTTP Error Codes

Error Response Format

Important Notes

Content Validity: File expiry depends on the storage provider. Download and save outputs that you need to retain.
Credits: Credits are deducted when the task is submitted. If the task fails, those credits are refunded automatically.
Webhooks: Instead of polling, you can provide a callback_url when submitting tasks to receive automatic notifications. See the Quick Start guide.

Next Steps

Submit Task

Learn how to submit generation tasks

Image Generation

Generate images with GPT-4o

Video Generation

Create videos with Sora 2

Quick Start

Complete integration guide

Additional generated files

Audio and 3D workflows use the same files array. file_type may be audio, 3d, image, or other. The array retains model assets, previews, textures, animation files, and timestamp files. Each item may also include label, format, content_type, file_name, file_size, and metadata. Process every returned file; metadata fields are optional.

Path Parameters

task_id
string
required

Unique task identifier

Response

Task status retrieved successfully

code
integer
required

HTTP status code

Example:

200

data
object
required