---
title: "Get task status and output"
method: GET
path: "/tasks/{id}"
---

# Get task status and output

`GET /tasks/{id}`

## Request

- Base URL: `https://reapi.ai/api/v1`
- URL: `https://reapi.ai/api/v1/tasks/{id}`
- Auth: HTTP bearer

## Path parameters

- `id` string, required

## Query parameters

- `include` string

## Response `200`

Task status

- object
  - `id` string, required
  - `model` string, required
  - `status` 'processing' | 'modal' | 'completed' | 'failed', required
  - `modal_expires_at` integer: Midjourney only: Unix deadline for submitting modal parameters to the same task.
  - `created_at` integer, required
  - `output` object, nullable
  - `usage` object, required
    - `credits` integer, required: Backward-compatible whole-credit settlement summary. Exact token-metered amounts are reported in the optional top-level billing object.
  - `billing` union: GPT Image settlement evidence. Returned only when GET /tasks/{id} uses include=billing. source=openai_token_usage is exact; source=reservation_estimate means successful output was charged at the admission reservation because trustworthy token meters were unavailable.
    - object
      - `source` 'openai_token_usage' | 'reservation_estimate', required: Evidence used for the final charge.
      - `credits_exact` number, required: Full formula-derived amount in credits, retained to micro-USD precision.
      - `cost_usd` number, required: Full formula-derived amount in USD. In a balance shortfall this is the actual amount, not only the amount collected.
      - `credits_charged` integer: Final whole-credit reservation charge when source is reservation_estimate.
      - `cost_usd_charged` number: Final reservation charge in USD when source is reservation_estimate.
      - `text_input_tokens` integer, required: Actual text-input tokens reported by the model.
      - `image_input_tokens` integer, required: Actual image-input tokens reported by the model.
      - `image_output_tokens` integer, required: Actual image-output tokens reported by the model.
      - `cached_tokens` integer: Optional cached input reported by the model. It is retained as usage metadata; the sell formula applies the configured standard rates to the reported text/image input totals and does not apply a separate cache discount.
    - object
      - `source` 'openai_token_usage' | 'reservation_estimate', required: Evidence used for the final charge.
      - `credits_exact` number: Full formula-derived amount in credits, retained to micro-USD precision.
      - `cost_usd` number: Full formula-derived amount in USD. In a balance shortfall this is the actual amount, not only the amount collected.
      - `credits_charged` integer, required: Final whole-credit reservation charge when source is reservation_estimate.
      - `cost_usd_charged` number, required: Final reservation charge in USD when source is reservation_estimate.
      - `text_input_tokens` integer: Actual text-input tokens reported by the model.
      - `image_input_tokens` integer: Actual image-input tokens reported by the model.
      - `image_output_tokens` integer: Actual image-output tokens reported by the model.
      - `cached_tokens` integer: Optional cached input reported by the model. It is retained as usage metadata; the sell formula applies the configured standard rates to the reported text/image input totals and does not apply a separate cache discount.
  - `error` object, nullable
  - `webhook` object, nullable: Webhook delivery record. Returned only when GET /tasks/{id} uses include=webhook; null when the task was submitted without webhook_url. Never included in the webhook payload itself.
    - `status` 'pending' | 'in_progress' | 'delivered' | 'failed', required: pending = task not finished yet; in_progress = an attempt is running; delivered = a 2xx was recorded; failed = the last attempt failed (retries stop after the third).
    - `attempts` integer, required
    - `claimed_at` string, date-time, nullable
    - `response_status` integer, nullable: HTTP status your endpoint returned on the last attempt.
    - `last_error` string, nullable: http_<status> | timeout | connect_failed | dns_failed | tls_error | blocked_private_address | request_failed | render_timeout | render_failed | stale_claim | attempt_lost
    - `last_attempt_at` string, date-time, nullable
    - `delivered_at` string, date-time, nullable

## Other responses

- `401`: Missing or invalid API key
- `404`: Task not found
- `429`: Rate limit exceeded

---

[API](https://skmtc.dev/reapi/apis/reapi-http-api.md) - [All operations](https://skmtc.dev/reapi/apis/reapi-http-api/llms.txt) - [OpenAPI document](https://skmtc.dev/reapi/apis/reapi-http-api/revisions/1d2713a6058a?raw)
