Get AI Generation Task
FreshGETGET https://api.creatify.ai/api/ai_generation/{id}/Retrieve a specific AI generation task by its ID.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Yes | The generation task ID |
Headers
| Header | Type | Required | Description |
|---|---|---|---|
X-API-ID | string | Yes | Your Creatify API ID |
X-API-KEY | string | Yes | Your Creatify API key |
Example Request
bash
curl -X GET 'https://api.creatify.ai/api/ai_generation/gen-001/' \
-H 'X-API-ID: your-api-id' \
-H 'X-API-KEY: your-api-key'Response
json
{
"id": "gen-001",
"status": "done",
"model": "image-gen-v1",
"inputs": {
"prompt": "A professional product photo on white background"
},
"output": "https://cdn.creatify.ai/generation/gen-001.png",
"created_at": "2024-01-15T10:30:00Z",
"updated_at": "2024-01-15T10:32:00Z"
}Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Unique task identifier |
status | string | Task status: pending, processing, done, failed |
model | string | The AI model used |
inputs | object | The input parameters provided |
output | string | Generated output URL |
created_at | string | ISO 8601 timestamp |
updated_at | string | ISO 8601 timestamp |
Status Codes
| Code | Description |
|---|---|
200 | Success |
401 | Unauthorized -- invalid API credentials |
404 | Task not found |
500 | Internal server error |