---
title: "Get job status"
method: GET
path: "/jobs/{jobId}"
tags: ["Jobs"]
---

# Get job status

`GET /jobs/{jobId}`

## Request

- Base URL: `https://www.aimagicx.com/api/v1`
- URL: `https://www.aimagicx.com/api/v1/jobs/{jobId}`
- Auth: HTTP bearer

Retrieves the status and result of an async job.

## Path parameters

- `jobId` string, required

## Query parameters

- `poll` boolean

## Response `200`

Job status

- JobStatusResponse
  - `id` string
  - `status` 'pending' | 'processing' | 'completed' | 'failed'
  - `progress` integer
  - `created` integer
  - `completed` integer, nullable
  - `model` string
  - `outputData` object, nullable: Result data when completed
  - `errorMessage` string, nullable: Error message if failed
  - `usage` Usage
    - `credits_used` integer
    - `credits_breakdown` object
    - `prompt_tokens` integer
    - `completion_tokens` integer
    - `total_tokens` integer

## Other responses

- `401`: Unauthorized - invalid or missing API key
- `404`: Resource not found

---

[API](https://skmtc.dev/aimagicx/apis/ai-magicx-api.md) - [All operations](https://skmtc.dev/aimagicx/apis/ai-magicx-api/llms.txt) - [OpenAPI document](https://skmtc.dev/aimagicx/apis/ai-magicx-api/revisions/08210272abb4?raw)
