Skip to main content
GET
/
v1
/
tasks
/
{task_id}
curl --request GET \
  --url https://api.apimart.ai/v1/tasks/task-unified-1757156493-imcg5zqt \
  --header 'Authorization: Bearer <token>'
{
  "code": 200,
  "data": {
    "id": "task-unified-1757156493-k9m2xpvw",
    "status": "completed",
    "progress": 100,
    "result": {
      "images": [
        {
          "url": "https://example.com/generated-image.png",
          "expires_at": 1757242893
        }
      ]
    },
    "created": 1757156493,
    "completed": 1757156593,
    "estimated_time": 100,
    "actual_time": 100
  }
}
curl --request GET \
  --url https://api.apimart.ai/v1/tasks/task-unified-1757156493-imcg5zqt \
  --header 'Authorization: Bearer <token>'
{
  "code": 200,
  "data": {
    "id": "task-unified-1757156493-k9m2xpvw",
    "status": "completed",
    "progress": 100,
    "result": {
      "images": [
        {
          "url": "https://example.com/generated-image.png",
          "expires_at": 1757242893
        }
      ]
    },
    "created": 1757156493,
    "completed": 1757156593,
    "estimated_time": 100,
    "actual_time": 100
  }
}

Authorizations

Authorization
string
required
All API endpoints require Bearer Token authenticationGet your API Key:Visit the API Key Management Page to get your API KeyAdd it to the request header:
Authorization: Bearer YOUR_API_KEY

Path parameters

task_id
string
required
Task ID returned by the generation API

Response

id
string
Unique task identifier
status
string
Task status values:
  • pending - Queued for processing
  • processing - In progress
  • completed - Finished successfully
  • failed - Failed
  • cancelled - Cancelled by user
progress
integer
Task progress percentage (0–100)
result
object
Task result, returned only when status is completed
created
integer
Task creation timestamp
completed
integer
Task completion timestamp (only present when completed)
estimated_time
integer
Estimated completion time in seconds
actual_time
integer
Actual completion time in seconds (only present when completed)
error
object
Error details (only present when status is failed)