Get Image Task Status
Query image generation task status and results
GET
- Query async image generation task execution status and results
- Real-time status updates and progress tracking
- Get generated images when task completes
- Multi-language support (zh/en/ko/ja)
Authorizations
All endpoints require Bearer Token authenticationGet your API Key:Visit the API Key Management Page to get your API KeyAdd it to the request header:
Path Parameters
Task ID returned by the image generation API
Response
Unique task identifier
Object type, always
generation.taskTask status
queued- Queued for processingin_progress- Processingcompleted- Successfully completedfailed- Failed
Image generation model used
Task creation time (Unix timestamp)
Task completion time (Unix timestamp, only returned when completed)
Generated image URL (only returned on success)
Image URL expiration time (Unix timestamp, only returned on completion)
Task result (only returned on success)
Error information (only returned on failure)
Task Status Reference
| Status | Description | Is Final | Recommended Action |
|---|---|---|---|
submitted | Task submitted, waiting for processing | ❌ | Wait 2-3 seconds, then query again |
in_progress | Task is processing | ❌ | Wait 3-5 seconds, then query again |
completed | Task completed successfully | ✅ | Get image from url field |
failed | Task processing failed | ✅ | Check error info |
Polling Strategy
Python Polling Example
Resource Expiration
Error Codes
| HTTP Code | Error Type | Description |
|---|---|---|
| 400 | invalid_request | Invalid request parameters |
| 401 | unauthorized | Authentication failed, check API Key |
| 402 | insufficient_quota | Insufficient balance |
| 404 | task_not_found | Task not found |
| 422 | content_policy_violation | Content policy violation |
| 429 | rate_limit_exceeded | Rate limit exceeded |
| 500 | internal_error | Internal server error |