# Get task

> One task in full: what was asked for, what came back, what it cost. Owner-only, so it takes an API key or an OAuth token rather than a public access token.

The whole task: the request as accepted, the result, the cost, and any errors.
It takes an API key, not a public access token, and it reads the database, so
use it for failed tasks, audits, and dashboards rather than in a polling loop.
Poll [status](https://mynth.io/docs/api-reference/endpoints/tasks/status.md) instead.

`GET /tasks/{id}`

**Auth:** API key or OAuth token

## Path parameters

- `id` (required, string) — The task to fetch. Example `"tsk_01KE7XWWEQ4MCGWKBQKJ1G47RP"`.

## Response

### 200 — Task returned

- `data` (required, object)
  - **image.generate · pending**
    - `id` (required, string)
    - `cost` (required, string | null) — USD charged. Set once the task completes; null while pending or failed.
    - `errors` (required, object[] | null) — Why the task failed. Null unless `status` is `failed`.
      - `code` (required, string)
      - `message` (string)
    - `user_id` (required, string)
    - `api_key_id` (required, string | null) — The API key that created the task. Null for tasks created without one.
    - `created_at` (required, string) — format: date-time.
    - `updated_at` (required, string) — format: date-time.
    - `type` (required, "image.generate")
    - `request` (required, object)
      - `model` (string) — Default `"auto"`. One of: `"alibaba/qwen-image-2.0"`, `"alibaba/qwen-image-2.0-pro"`, `"alibaba/qwen-image-2.1-pro"`, `"alibaba/qwen-image-3.0"`, `"alibaba/qwen-image-3.0-pro"`, `"bytedance/seedream-5.0-lite"`, `"bytedance/seedream-pro"`, `"bytedance/seedream-v5-flash"`, `"black-forest-labs/flux-1-schnell"`, `"black-forest-labs/flux.1-dev"`, `"black-forest-labs/flux.2-dev"`, `"black-forest-labs/flux.2-pro"`, `"black-forest-labs/flux.2-flex"`, `"black-forest-labs/flux.2-max"`, `"black-forest-labs/flux.2-klein-4b"`, `"black-forest-labs/flux-3"`, `"bria/fibo-edit-1.5"`, `"bria/fibo-generate-1.5"`, `"circlestone-labs/anima"`, `"goofy-ai/prefect-pony-xl-lora"`, `"google/gemini-3.1-flash-lite-image"`, `"google/gemini-3.1-flash-image"`, `"google/gemini-nano-banana-2.1"`, `"google/gemini-3-pro-image-preview"`, `"ideogram/ideogram-4.5"`, `"imagineart/imagineart-1.5-pro"`, `"imagineart/imagineart-2.0"`, `"john6666/bismuth-illustrious-mix"`, `"klingai/kling-image-3.0"`, `"klingai/kling-image-o3"`, `"krea/krea-2-turbo"`, `"krea/krea-2-medium"`, `"krea/krea-2-large"`, `"luma/uni-1"`, `"luma/uni-1-max"`, `"maxfeifei8/one-obsession"`, `"meta/muse-image"`, `"microsoft/mai-image-2.6"`, `"microsoft/mai-image-2.6-flash"`, `"minimax/h3"`, `"openai/gpt-image-2"`, `"openai/gpt-image-2.5-flare"`, `"openai/gpt-image-2.5-sunburst"`, `"purplesmartai/pony-diffusion-v6-xl"`, `"recraft/recraft-v4"`, `"recraft/recraft-v4.1-flash"`, `"recraft/recraft-v4-pro"`, `"reve/reve"`, `"reve/reve-remix"`, `"sourceful/riverflow-2.0-pro"`, `"tongyi-mai/z-image"`, `"tongyi-mai/z-image-turbo"`, `"wan/wan2.6-image"`, `"wan/wan2.7-image"`, `"wan/wan2.7-image-pro"`, `"xai/grok-imagine-image"`, `"xai/grok-imagine-image-2.0"`, `"xai/grok-imagine-image-quality"`, `"auto"`. Example `"black-forest-labs/flux.2-pro"`.
      - `prompt` (required, string) — Positive prompt. ≥ 1 characters, ≤ 8192 characters. Example `"Cute Cat"`.
      - `negative_prompt` (string) — ≤ 8192 characters.
      - `magic_prompt` (boolean)
      - `count` (integer) — Default `1`. ≥ 1, ≤ 20.
      - `size` (object | string) — One of: `"auto"`, `"square"`, `"portrait"`, `"landscape"`, `"portrait_tall"`, `"landscape_wide"`, `"1:1"`, `"2:3"`, `"3:2"`, `"3:4"`, `"4:3"`, `"4:5"`, `"5:4"`, `"9:16"`, `"16:9"`, `"21:9"`, `"2:1"`, `"1:2"`, `"1:1_4k"`, `"2:3_4k"`, `"3:2_4k"`, `"3:4_4k"`, `"4:3_4k"`, `"4:5_4k"`, `"5:4_4k"`, `"9:16_4k"`, `"16:9_4k"`, `"21:9_4k"`, `"2:1_4k"`, `"1:2_4k"`.
        - …
      - `inputs` ((string | object)[]) — ≤ 20 items.
        - …
      - `rating` (object | boolean) — One of: `true`.
        - …
      - `output` (object)
        - …
      - `generate_public_access_token` (boolean) — Return a short-lived public access token as `public_access_token`, for polling this task from browser code without your API key. Defaults to false.
      - `webhook` (object)
        - …
      - `destination` (string) — ≥ 1 characters, ≤ 64 characters. Example `"bunny-prod"`.
      - `metadata` (object)
    - `result` (required, null)
    - `status` (required, "pending")
  - **image.rate · pending**
    - `id` (required, string)
    - `cost` (required, string | null) — USD charged. Set once the task completes; null while pending or failed.
    - `errors` (required, object[] | null) — Why the task failed. Null unless `status` is `failed`.
      - `code` (required, string)
      - `message` (string)
    - `user_id` (required, string)
    - `api_key_id` (required, string | null) — The API key that created the task. Null for tasks created without one.
    - `created_at` (required, string) — format: date-time.
    - `updated_at` (required, string) — format: date-time.
    - `type` (required, "image.rate")
    - `request` (required, object)
      - **nsfw_sfw**
        - `url` (required, string) — format: uri.
        - `mode` ("nsfw_sfw") — Default `"nsfw_sfw"`.
      - **custom**
        - `url` (required, string) — format: uri.
        - `mode` (required, "custom")
        - `levels` (required, object[]) — ≥ 2 items, ≤ 7 items.
          - …
    - `result` (required, null)
    - `status` (required, "pending")
  - **image.alt · pending**
    - `id` (required, string)
    - `cost` (required, string | null) — USD charged. Set once the task completes; null while pending or failed.
    - `errors` (required, object[] | null) — Why the task failed. Null unless `status` is `failed`.
      - `code` (required, string)
      - `message` (string)
    - `user_id` (required, string)
    - `api_key_id` (required, string | null) — The API key that created the task. Null for tasks created without one.
    - `created_at` (required, string) — format: date-time.
    - `updated_at` (required, string) — format: date-time.
    - `type` (required, "image.alt")
    - `request` (required, object)
      - `url` (required, string) — format: uri.
    - `result` (required, null)
    - `status` (required, "pending")
  - **image.review · pending**
    - `id` (required, string)
    - `cost` (required, string | null) — USD charged. Set once the task completes; null while pending or failed.
    - `errors` (required, object[] | null) — Why the task failed. Null unless `status` is `failed`.
      - `code` (required, string)
      - `message` (string)
    - `user_id` (required, string)
    - `api_key_id` (required, string | null) — The API key that created the task. Null for tasks created without one.
    - `created_at` (required, string) — format: date-time.
    - `updated_at` (required, string) — format: date-time.
    - `type` (required, "image.review")
    - `request` (required, object)
      - `url` (required, string) — format: uri.
      - `effort` (string) — Reviewer panel to run. 'high' runs five strong vision models; 'low' runs three smaller ones for triage. Default `"high"`. One of: `"low"`, `"high"`.
    - `result` (required, null)
    - `status` (required, "pending")
  - **image.remove_background · pending**
    - `id` (required, string)
    - `cost` (required, string | null) — USD charged. Set once the task completes; null while pending or failed.
    - `errors` (required, object[] | null) — Why the task failed. Null unless `status` is `failed`.
      - `code` (required, string)
      - `message` (string)
    - `user_id` (required, string)
    - `api_key_id` (required, string | null) — The API key that created the task. Null for tasks created without one.
    - `created_at` (required, string) — format: date-time.
    - `updated_at` (required, string) — format: date-time.
    - `type` (required, "image.remove_background")
    - `request` (required, object)
      - `url` (required, string) — format: uri.
      - `output` (object)
        - …
      - `generate_public_access_token` (boolean) — Return a short-lived public access token as `public_access_token`, for polling this task from browser code without your API key. Defaults to false.
      - `webhook` (object)
        - …
      - `destination` (string) — ≥ 1 characters, ≤ 64 characters. Example `"bunny-prod"`.
      - `metadata` (object)
    - `result` (required, null)
    - `status` (required, "pending")
  - **image.upscale · pending**
    - `id` (required, string)
    - `cost` (required, string | null) — USD charged. Set once the task completes; null while pending or failed.
    - `errors` (required, object[] | null) — Why the task failed. Null unless `status` is `failed`.
      - `code` (required, string)
      - `message` (string)
    - `user_id` (required, string)
    - `api_key_id` (required, string | null) — The API key that created the task. Null for tasks created without one.
    - `created_at` (required, string) — format: date-time.
    - `updated_at` (required, string) — format: date-time.
    - `type` (required, "image.upscale")
    - `request` (required, object)
      - `url` (required, string) — format: uri.
      - `size` (required, object | string) — How much to enlarge each side. The upscaled image can be at most 4096x4096 pixels. One of: `"2x"`, `"4x"`.
        - …
      - `effort` (required, string) — Upscaler to run, and the price. 'low' is fast and sharp; 'high' rebuilds fine detail such as small text and faces. One of: `"low"`, `"high"`.
      - `output` (object)
        - …
      - `generate_public_access_token` (boolean) — Return a short-lived public access token as `public_access_token`, for polling this task from browser code without your API key. Defaults to false.
      - `webhook` (object)
        - …
      - `destination` (string) — ≥ 1 characters, ≤ 64 characters. Example `"bunny-prod"`.
      - `metadata` (object)
    - `result` (required, null)
    - `status` (required, "pending")
  - **video.generate · pending**
    - `id` (required, string)
    - `cost` (required, string | null) — USD charged. Set once the task completes; null while pending or failed.
    - `errors` (required, object[] | null) — Why the task failed. Null unless `status` is `failed`.
      - `code` (required, string)
      - `message` (string)
    - `user_id` (required, string)
    - `api_key_id` (required, string | null) — The API key that created the task. Null for tasks created without one.
    - `created_at` (required, string) — format: date-time.
    - `updated_at` (required, string) — format: date-time.
    - `type` (required, "video.generate")
    - `request` (required, object)
      - `model` (required, string) — One of: `"bytedance/seedance-2.0-mini"`, `"google/gemini-omni-flash-1.1"`, `"prunaai/p-video"`, `"xai/grok-imagine-video-1.5"`. Example `"bytedance/seedance-2.0-mini"`.
      - `prompt` (required, string) — Positive prompt. ≥ 1 characters, ≤ 8192 characters. Example `"A cat surfing a wave at sunset"`.
      - `negative_prompt` (string) — ≤ 8192 characters.
      - `duration` (number) — Video duration in seconds. Defaults to the model's default duration. ≥ 1, ≤ 60.
      - `size` (object | string) — Aspect ratio and resolution tier. The aspect ratio is best effort: the closest one the model supports. With image inputs the first frame sets the shape. Defaults to "auto". One of: `"auto"`, `"square"`, `"portrait"`, `"landscape"`, `"portrait_tall"`, `"landscape_wide"`, `"1:1"`, `"2:3"`, `"3:2"`, `"3:4"`, `"4:3"`, `"4:5"`, `"5:4"`, `"9:16"`, `"16:9"`, `"21:9"`, `"2:1"`, `"1:2"`, `"auto_480p"`, `"auto_720p"`, `"auto_1080p"`, `"auto_4k"`, `"square_480p"`, `"square_720p"`, `"square_1080p"`, `"square_4k"`, `"portrait_480p"`, `"portrait_720p"`, `"portrait_1080p"`, `"portrait_4k"`, `"landscape_480p"`, `"landscape_720p"`, `"landscape_1080p"`, `"landscape_4k"`, `"portrait_tall_480p"`, `"portrait_tall_720p"`, `"portrait_tall_1080p"`, `"portrait_tall_4k"`, `"landscape_wide_480p"`, `"landscape_wide_720p"`, `"landscape_wide_1080p"`, `"landscape_wide_4k"`, `"1:1_480p"`, `"1:1_720p"`, `"1:1_1080p"`, `"1:1_4k"`, `"2:3_480p"`, `"2:3_720p"`, `"2:3_1080p"`, `"2:3_4k"`, `"3:2_480p"`, `"3:2_720p"`, `"3:2_1080p"`, `"3:2_4k"`, `"3:4_480p"`, `"3:4_720p"`, `"3:4_1080p"`, `"3:4_4k"`, `"4:3_480p"`, `"4:3_720p"`, `"4:3_1080p"`, `"4:3_4k"`, `"4:5_480p"`, `"4:5_720p"`, `"4:5_1080p"`, `"4:5_4k"`, `"5:4_480p"`, `"5:4_720p"`, `"5:4_1080p"`, `"5:4_4k"`, `"9:16_480p"`, `"9:16_720p"`, `"9:16_1080p"`, `"9:16_4k"`, `"16:9_480p"`, `"16:9_720p"`, `"16:9_1080p"`, `"16:9_4k"`, `"21:9_480p"`, `"21:9_720p"`, `"21:9_1080p"`, `"21:9_4k"`, `"2:1_480p"`, `"2:1_720p"`, `"2:1_1080p"`, `"2:1_4k"`, `"1:2_480p"`, `"1:2_720p"`, `"1:2_1080p"`, `"1:2_4k"`.
        - …
      - `audio` (boolean) — Enable model-native generated audio. Only supported by models with audio capability.
      - `inputs` ((string | object)[]) — ≤ 5 items.
        - …
      - `generate_public_access_token` (boolean) — Return a short-lived public access token as `public_access_token`, for polling this task from browser code without your API key. Defaults to false.
      - `webhook` (object)
        - …
      - `metadata` (object)
    - `result` (required, null)
    - `status` (required, "pending")
  - **image.generate · completed**
    - `id` (required, string)
    - `cost` (required, string | null) — USD charged. Set once the task completes; null while pending or failed.
    - `errors` (required, object[] | null) — Why the task failed. Null unless `status` is `failed`.
      - `code` (required, string)
      - `message` (string)
    - `user_id` (required, string)
    - `api_key_id` (required, string | null) — The API key that created the task. Null for tasks created without one.
    - `created_at` (required, string) — format: date-time.
    - `updated_at` (required, string) — format: date-time.
    - `type` (required, "image.generate")
    - `request` (required, object)
      - `model` (string) — Default `"auto"`. One of: `"alibaba/qwen-image-2.0"`, `"alibaba/qwen-image-2.0-pro"`, `"alibaba/qwen-image-2.1-pro"`, `"alibaba/qwen-image-3.0"`, `"alibaba/qwen-image-3.0-pro"`, `"bytedance/seedream-5.0-lite"`, `"bytedance/seedream-pro"`, `"bytedance/seedream-v5-flash"`, `"black-forest-labs/flux-1-schnell"`, `"black-forest-labs/flux.1-dev"`, `"black-forest-labs/flux.2-dev"`, `"black-forest-labs/flux.2-pro"`, `"black-forest-labs/flux.2-flex"`, `"black-forest-labs/flux.2-max"`, `"black-forest-labs/flux.2-klein-4b"`, `"black-forest-labs/flux-3"`, `"bria/fibo-edit-1.5"`, `"bria/fibo-generate-1.5"`, `"circlestone-labs/anima"`, `"goofy-ai/prefect-pony-xl-lora"`, `"google/gemini-3.1-flash-lite-image"`, `"google/gemini-3.1-flash-image"`, `"google/gemini-nano-banana-2.1"`, `"google/gemini-3-pro-image-preview"`, `"ideogram/ideogram-4.5"`, `"imagineart/imagineart-1.5-pro"`, `"imagineart/imagineart-2.0"`, `"john6666/bismuth-illustrious-mix"`, `"klingai/kling-image-3.0"`, `"klingai/kling-image-o3"`, `"krea/krea-2-turbo"`, `"krea/krea-2-medium"`, `"krea/krea-2-large"`, `"luma/uni-1"`, `"luma/uni-1-max"`, `"maxfeifei8/one-obsession"`, `"meta/muse-image"`, `"microsoft/mai-image-2.6"`, `"microsoft/mai-image-2.6-flash"`, `"minimax/h3"`, `"openai/gpt-image-2"`, `"openai/gpt-image-2.5-flare"`, `"openai/gpt-image-2.5-sunburst"`, `"purplesmartai/pony-diffusion-v6-xl"`, `"recraft/recraft-v4"`, `"recraft/recraft-v4.1-flash"`, `"recraft/recraft-v4-pro"`, `"reve/reve"`, `"reve/reve-remix"`, `"sourceful/riverflow-2.0-pro"`, `"tongyi-mai/z-image"`, `"tongyi-mai/z-image-turbo"`, `"wan/wan2.6-image"`, `"wan/wan2.7-image"`, `"wan/wan2.7-image-pro"`, `"xai/grok-imagine-image"`, `"xai/grok-imagine-image-2.0"`, `"xai/grok-imagine-image-quality"`, `"auto"`. Example `"black-forest-labs/flux.2-pro"`.
      - `prompt` (required, string) — Positive prompt. ≥ 1 characters, ≤ 8192 characters. Example `"Cute Cat"`.
      - `negative_prompt` (string) — ≤ 8192 characters.
      - `magic_prompt` (boolean)
      - `count` (integer) — Default `1`. ≥ 1, ≤ 20.
      - `size` (object | string) — One of: `"auto"`, `"square"`, `"portrait"`, `"landscape"`, `"portrait_tall"`, `"landscape_wide"`, `"1:1"`, `"2:3"`, `"3:2"`, `"3:4"`, `"4:3"`, `"4:5"`, `"5:4"`, `"9:16"`, `"16:9"`, `"21:9"`, `"2:1"`, `"1:2"`, `"1:1_4k"`, `"2:3_4k"`, `"3:2_4k"`, `"3:4_4k"`, `"4:3_4k"`, `"4:5_4k"`, `"5:4_4k"`, `"9:16_4k"`, `"16:9_4k"`, `"21:9_4k"`, `"2:1_4k"`, `"1:2_4k"`.
        - …
      - `inputs` ((string | object)[]) — ≤ 20 items.
        - …
      - `rating` (object | boolean) — One of: `true`.
        - …
      - `output` (object)
        - …
      - `generate_public_access_token` (boolean) — Return a short-lived public access token as `public_access_token`, for polling this task from browser code without your API key. Defaults to false.
      - `webhook` (object)
        - …
      - `destination` (string) — ≥ 1 characters, ≤ 64 characters. Example `"bunny-prod"`.
      - `metadata` (object)
    - `result` (required, object)
      - `model` (required, string) — One of: `"alibaba/qwen-image-2.0"`, `"alibaba/qwen-image-2.0-pro"`, `"alibaba/qwen-image-2.1-pro"`, `"alibaba/qwen-image-3.0"`, `"alibaba/qwen-image-3.0-pro"`, `"bytedance/seedream-5.0-lite"`, `"bytedance/seedream-pro"`, `"bytedance/seedream-v5-flash"`, `"black-forest-labs/flux-1-schnell"`, `"black-forest-labs/flux.1-dev"`, `"black-forest-labs/flux.2-dev"`, `"black-forest-labs/flux.2-pro"`, `"black-forest-labs/flux.2-flex"`, `"black-forest-labs/flux.2-max"`, `"black-forest-labs/flux.2-klein-4b"`, `"black-forest-labs/flux-3"`, `"bria/fibo-edit-1.5"`, `"bria/fibo-generate-1.5"`, `"circlestone-labs/anima"`, `"goofy-ai/prefect-pony-xl-lora"`, `"google/gemini-3.1-flash-lite-image"`, `"google/gemini-3.1-flash-image"`, `"google/gemini-nano-banana-2.1"`, `"google/gemini-3-pro-image-preview"`, `"ideogram/ideogram-4.5"`, `"imagineart/imagineart-1.5-pro"`, `"imagineart/imagineart-2.0"`, `"john6666/bismuth-illustrious-mix"`, `"klingai/kling-image-3.0"`, `"klingai/kling-image-o3"`, `"krea/krea-2-turbo"`, `"krea/krea-2-medium"`, `"krea/krea-2-large"`, `"luma/uni-1"`, `"luma/uni-1-max"`, `"maxfeifei8/one-obsession"`, `"meta/muse-image"`, `"microsoft/mai-image-2.6"`, `"microsoft/mai-image-2.6-flash"`, `"minimax/h3"`, `"openai/gpt-image-2"`, `"openai/gpt-image-2.5-flare"`, `"openai/gpt-image-2.5-sunburst"`, `"purplesmartai/pony-diffusion-v6-xl"`, `"recraft/recraft-v4"`, `"recraft/recraft-v4.1-flash"`, `"recraft/recraft-v4-pro"`, `"reve/reve"`, `"reve/reve-remix"`, `"sourceful/riverflow-2.0-pro"`, `"tongyi-mai/z-image"`, `"tongyi-mai/z-image-turbo"`, `"wan/wan2.6-image"`, `"wan/wan2.7-image"`, `"wan/wan2.7-image-pro"`, `"xai/grok-imagine-image"`, `"xai/grok-imagine-image-2.0"`, `"xai/grok-imagine-image-quality"`.
      - `images` (required, object[])
        - …
      - `magic_prompt` (object)
        - …
    - `status` (required, "completed")
  - **image.rate · completed**
    - `id` (required, string)
    - `cost` (required, string | null) — USD charged. Set once the task completes; null while pending or failed.
    - `errors` (required, object[] | null) — Why the task failed. Null unless `status` is `failed`.
      - `code` (required, string)
      - `message` (string)
    - `user_id` (required, string)
    - `api_key_id` (required, string | null) — The API key that created the task. Null for tasks created without one.
    - `created_at` (required, string) — format: date-time.
    - `updated_at` (required, string) — format: date-time.
    - `type` (required, "image.rate")
    - `request` (required, object)
      - **nsfw_sfw**
        - `url` (required, string) — format: uri.
        - `mode` ("nsfw_sfw") — Default `"nsfw_sfw"`.
      - **custom**
        - `url` (required, string) — format: uri.
        - `mode` (required, "custom")
        - `levels` (required, object[]) — ≥ 2 items, ≤ 7 items.
          - …
    - `result` (required, object)
      - `level` (required, string) — The rating level ≥ 1 characters, ≤ 24 characters.
    - `status` (required, "completed")
  - **image.alt · completed**
    - `id` (required, string)
    - `cost` (required, string | null) — USD charged. Set once the task completes; null while pending or failed.
    - `errors` (required, object[] | null) — Why the task failed. Null unless `status` is `failed`.
      - `code` (required, string)
      - `message` (string)
    - `user_id` (required, string)
    - `api_key_id` (required, string | null) — The API key that created the task. Null for tasks created without one.
    - `created_at` (required, string) — format: date-time.
    - `updated_at` (required, string) — format: date-time.
    - `type` (required, "image.alt")
    - `request` (required, object)
      - `url` (required, string) — format: uri.
    - `result` (required, object)
      - `alt` (required, string) — ≥ 1 characters, ≤ 160 characters.
    - `status` (required, "completed")
  - **image.review · completed**
    - `id` (required, string)
    - `cost` (required, string | null) — USD charged. Set once the task completes; null while pending or failed.
    - `errors` (required, object[] | null) — Why the task failed. Null unless `status` is `failed`.
      - `code` (required, string)
      - `message` (string)
    - `user_id` (required, string)
    - `api_key_id` (required, string | null) — The API key that created the task. Null for tasks created without one.
    - `created_at` (required, string) — format: date-time.
    - `updated_at` (required, string) — format: date-time.
    - `type` (required, "image.review")
    - `request` (required, object)
      - `url` (required, string) — format: uri.
      - `effort` (string) — Reviewer panel to run. 'high' runs five strong vision models; 'low' runs three smaller ones for triage. Default `"high"`. One of: `"low"`, `"high"`.
    - `result` (required, object)
      - `score` (required, number) — Median of independent reviewer ballots. Higher is better, 1 to 4.
      - `summary` (required, string)
      - `findings` (required, object[])
        - …
      - `strengths` (required, object[])
        - …
    - `status` (required, "completed")
  - **image.remove_background · completed**
    - `id` (required, string)
    - `cost` (required, string | null) — USD charged. Set once the task completes; null while pending or failed.
    - `errors` (required, object[] | null) — Why the task failed. Null unless `status` is `failed`.
      - `code` (required, string)
      - `message` (string)
    - `user_id` (required, string)
    - `api_key_id` (required, string | null) — The API key that created the task. Null for tasks created without one.
    - `created_at` (required, string) — format: date-time.
    - `updated_at` (required, string) — format: date-time.
    - `type` (required, "image.remove_background")
    - `request` (required, object)
      - `url` (required, string) — format: uri.
      - `output` (object)
        - …
      - `generate_public_access_token` (boolean) — Return a short-lived public access token as `public_access_token`, for polling this task from browser code without your API key. Defaults to false.
      - `webhook` (object)
        - …
      - `destination` (string) — ≥ 1 characters, ≤ 64 characters. Example `"bunny-prod"`.
      - `metadata` (object)
    - `result` (required, object)
      - `image` (required, object)
        - …
    - `status` (required, "completed")
  - **image.upscale · completed**
    - `id` (required, string)
    - `cost` (required, string | null) — USD charged. Set once the task completes; null while pending or failed.
    - `errors` (required, object[] | null) — Why the task failed. Null unless `status` is `failed`.
      - `code` (required, string)
      - `message` (string)
    - `user_id` (required, string)
    - `api_key_id` (required, string | null) — The API key that created the task. Null for tasks created without one.
    - `created_at` (required, string) — format: date-time.
    - `updated_at` (required, string) — format: date-time.
    - `type` (required, "image.upscale")
    - `request` (required, object)
      - `url` (required, string) — format: uri.
      - `size` (required, object | string) — How much to enlarge each side. The upscaled image can be at most 4096x4096 pixels. One of: `"2x"`, `"4x"`.
        - …
      - `effort` (required, string) — Upscaler to run, and the price. 'low' is fast and sharp; 'high' rebuilds fine detail such as small text and faces. One of: `"low"`, `"high"`.
      - `output` (object)
        - …
      - `generate_public_access_token` (boolean) — Return a short-lived public access token as `public_access_token`, for polling this task from browser code without your API key. Defaults to false.
      - `webhook` (object)
        - …
      - `destination` (string) — ≥ 1 characters, ≤ 64 characters. Example `"bunny-prod"`.
      - `metadata` (object)
    - `result` (required, object)
      - `image` (required, object)
        - …
    - `status` (required, "completed")
  - **video.generate · completed**
    - `id` (required, string)
    - `cost` (required, string | null) — USD charged. Set once the task completes; null while pending or failed.
    - `errors` (required, object[] | null) — Why the task failed. Null unless `status` is `failed`.
      - `code` (required, string)
      - `message` (string)
    - `user_id` (required, string)
    - `api_key_id` (required, string | null) — The API key that created the task. Null for tasks created without one.
    - `created_at` (required, string) — format: date-time.
    - `updated_at` (required, string) — format: date-time.
    - `type` (required, "video.generate")
    - `request` (required, object)
      - `model` (required, string) — One of: `"bytedance/seedance-2.0-mini"`, `"google/gemini-omni-flash-1.1"`, `"prunaai/p-video"`, `"xai/grok-imagine-video-1.5"`. Example `"bytedance/seedance-2.0-mini"`.
      - `prompt` (required, string) — Positive prompt. ≥ 1 characters, ≤ 8192 characters. Example `"A cat surfing a wave at sunset"`.
      - `negative_prompt` (string) — ≤ 8192 characters.
      - `duration` (number) — Video duration in seconds. Defaults to the model's default duration. ≥ 1, ≤ 60.
      - `size` (object | string) — Aspect ratio and resolution tier. The aspect ratio is best effort: the closest one the model supports. With image inputs the first frame sets the shape. Defaults to "auto". One of: `"auto"`, `"square"`, `"portrait"`, `"landscape"`, `"portrait_tall"`, `"landscape_wide"`, `"1:1"`, `"2:3"`, `"3:2"`, `"3:4"`, `"4:3"`, `"4:5"`, `"5:4"`, `"9:16"`, `"16:9"`, `"21:9"`, `"2:1"`, `"1:2"`, `"auto_480p"`, `"auto_720p"`, `"auto_1080p"`, `"auto_4k"`, `"square_480p"`, `"square_720p"`, `"square_1080p"`, `"square_4k"`, `"portrait_480p"`, `"portrait_720p"`, `"portrait_1080p"`, `"portrait_4k"`, `"landscape_480p"`, `"landscape_720p"`, `"landscape_1080p"`, `"landscape_4k"`, `"portrait_tall_480p"`, `"portrait_tall_720p"`, `"portrait_tall_1080p"`, `"portrait_tall_4k"`, `"landscape_wide_480p"`, `"landscape_wide_720p"`, `"landscape_wide_1080p"`, `"landscape_wide_4k"`, `"1:1_480p"`, `"1:1_720p"`, `"1:1_1080p"`, `"1:1_4k"`, `"2:3_480p"`, `"2:3_720p"`, `"2:3_1080p"`, `"2:3_4k"`, `"3:2_480p"`, `"3:2_720p"`, `"3:2_1080p"`, `"3:2_4k"`, `"3:4_480p"`, `"3:4_720p"`, `"3:4_1080p"`, `"3:4_4k"`, `"4:3_480p"`, `"4:3_720p"`, `"4:3_1080p"`, `"4:3_4k"`, `"4:5_480p"`, `"4:5_720p"`, `"4:5_1080p"`, `"4:5_4k"`, `"5:4_480p"`, `"5:4_720p"`, `"5:4_1080p"`, `"5:4_4k"`, `"9:16_480p"`, `"9:16_720p"`, `"9:16_1080p"`, `"9:16_4k"`, `"16:9_480p"`, `"16:9_720p"`, `"16:9_1080p"`, `"16:9_4k"`, `"21:9_480p"`, `"21:9_720p"`, `"21:9_1080p"`, `"21:9_4k"`, `"2:1_480p"`, `"2:1_720p"`, `"2:1_1080p"`, `"2:1_4k"`, `"1:2_480p"`, `"1:2_720p"`, `"1:2_1080p"`, `"1:2_4k"`.
        - …
      - `audio` (boolean) — Enable model-native generated audio. Only supported by models with audio capability.
      - `inputs` ((string | object)[]) — ≤ 5 items.
        - …
      - `generate_public_access_token` (boolean) — Return a short-lived public access token as `public_access_token`, for polling this task from browser code without your API key. Defaults to false.
      - `webhook` (object)
        - …
      - `metadata` (object)
    - `result` (required, object)
      - `model` (required, string) — One of: `"bytedance/seedance-2.0-mini"`, `"google/gemini-omni-flash-1.1"`, `"prunaai/p-video"`, `"xai/grok-imagine-video-1.5"`.
      - `videos` (required, object[])
        - …
    - `status` (required, "completed")
  - **image.generate · failed**
    - `id` (required, string)
    - `cost` (required, string | null) — USD charged. Set once the task completes; null while pending or failed.
    - `errors` (required, object[])
      - `code` (required, string)
      - `message` (string)
    - `user_id` (required, string)
    - `api_key_id` (required, string | null) — The API key that created the task. Null for tasks created without one.
    - `created_at` (required, string) — format: date-time.
    - `updated_at` (required, string) — format: date-time.
    - `type` (required, "image.generate")
    - `request` (required, object)
      - `model` (string) — Default `"auto"`. One of: `"alibaba/qwen-image-2.0"`, `"alibaba/qwen-image-2.0-pro"`, `"alibaba/qwen-image-2.1-pro"`, `"alibaba/qwen-image-3.0"`, `"alibaba/qwen-image-3.0-pro"`, `"bytedance/seedream-5.0-lite"`, `"bytedance/seedream-pro"`, `"bytedance/seedream-v5-flash"`, `"black-forest-labs/flux-1-schnell"`, `"black-forest-labs/flux.1-dev"`, `"black-forest-labs/flux.2-dev"`, `"black-forest-labs/flux.2-pro"`, `"black-forest-labs/flux.2-flex"`, `"black-forest-labs/flux.2-max"`, `"black-forest-labs/flux.2-klein-4b"`, `"black-forest-labs/flux-3"`, `"bria/fibo-edit-1.5"`, `"bria/fibo-generate-1.5"`, `"circlestone-labs/anima"`, `"goofy-ai/prefect-pony-xl-lora"`, `"google/gemini-3.1-flash-lite-image"`, `"google/gemini-3.1-flash-image"`, `"google/gemini-nano-banana-2.1"`, `"google/gemini-3-pro-image-preview"`, `"ideogram/ideogram-4.5"`, `"imagineart/imagineart-1.5-pro"`, `"imagineart/imagineart-2.0"`, `"john6666/bismuth-illustrious-mix"`, `"klingai/kling-image-3.0"`, `"klingai/kling-image-o3"`, `"krea/krea-2-turbo"`, `"krea/krea-2-medium"`, `"krea/krea-2-large"`, `"luma/uni-1"`, `"luma/uni-1-max"`, `"maxfeifei8/one-obsession"`, `"meta/muse-image"`, `"microsoft/mai-image-2.6"`, `"microsoft/mai-image-2.6-flash"`, `"minimax/h3"`, `"openai/gpt-image-2"`, `"openai/gpt-image-2.5-flare"`, `"openai/gpt-image-2.5-sunburst"`, `"purplesmartai/pony-diffusion-v6-xl"`, `"recraft/recraft-v4"`, `"recraft/recraft-v4.1-flash"`, `"recraft/recraft-v4-pro"`, `"reve/reve"`, `"reve/reve-remix"`, `"sourceful/riverflow-2.0-pro"`, `"tongyi-mai/z-image"`, `"tongyi-mai/z-image-turbo"`, `"wan/wan2.6-image"`, `"wan/wan2.7-image"`, `"wan/wan2.7-image-pro"`, `"xai/grok-imagine-image"`, `"xai/grok-imagine-image-2.0"`, `"xai/grok-imagine-image-quality"`, `"auto"`. Example `"black-forest-labs/flux.2-pro"`.
      - `prompt` (required, string) — Positive prompt. ≥ 1 characters, ≤ 8192 characters. Example `"Cute Cat"`.
      - `negative_prompt` (string) — ≤ 8192 characters.
      - `magic_prompt` (boolean)
      - `count` (integer) — Default `1`. ≥ 1, ≤ 20.
      - `size` (object | string) — One of: `"auto"`, `"square"`, `"portrait"`, `"landscape"`, `"portrait_tall"`, `"landscape_wide"`, `"1:1"`, `"2:3"`, `"3:2"`, `"3:4"`, `"4:3"`, `"4:5"`, `"5:4"`, `"9:16"`, `"16:9"`, `"21:9"`, `"2:1"`, `"1:2"`, `"1:1_4k"`, `"2:3_4k"`, `"3:2_4k"`, `"3:4_4k"`, `"4:3_4k"`, `"4:5_4k"`, `"5:4_4k"`, `"9:16_4k"`, `"16:9_4k"`, `"21:9_4k"`, `"2:1_4k"`, `"1:2_4k"`.
        - …
      - `inputs` ((string | object)[]) — ≤ 20 items.
        - …
      - `rating` (object | boolean) — One of: `true`.
        - …
      - `output` (object)
        - …
      - `generate_public_access_token` (boolean) — Return a short-lived public access token as `public_access_token`, for polling this task from browser code without your API key. Defaults to false.
      - `webhook` (object)
        - …
      - `destination` (string) — ≥ 1 characters, ≤ 64 characters. Example `"bunny-prod"`.
      - `metadata` (object)
    - `result` (required, null)
    - `status` (required, "failed")
  - **image.rate · failed**
    - `id` (required, string)
    - `cost` (required, string | null) — USD charged. Set once the task completes; null while pending or failed.
    - `errors` (required, object[])
      - `code` (required, string)
      - `message` (string)
    - `user_id` (required, string)
    - `api_key_id` (required, string | null) — The API key that created the task. Null for tasks created without one.
    - `created_at` (required, string) — format: date-time.
    - `updated_at` (required, string) — format: date-time.
    - `type` (required, "image.rate")
    - `request` (required, object)
      - **nsfw_sfw**
        - `url` (required, string) — format: uri.
        - `mode` ("nsfw_sfw") — Default `"nsfw_sfw"`.
      - **custom**
        - `url` (required, string) — format: uri.
        - `mode` (required, "custom")
        - `levels` (required, object[]) — ≥ 2 items, ≤ 7 items.
          - …
    - `result` (required, null)
    - `status` (required, "failed")
  - **image.alt · failed**
    - `id` (required, string)
    - `cost` (required, string | null) — USD charged. Set once the task completes; null while pending or failed.
    - `errors` (required, object[])
      - `code` (required, string)
      - `message` (string)
    - `user_id` (required, string)
    - `api_key_id` (required, string | null) — The API key that created the task. Null for tasks created without one.
    - `created_at` (required, string) — format: date-time.
    - `updated_at` (required, string) — format: date-time.
    - `type` (required, "image.alt")
    - `request` (required, object)
      - `url` (required, string) — format: uri.
    - `result` (required, null)
    - `status` (required, "failed")
  - **image.review · failed**
    - `id` (required, string)
    - `cost` (required, string | null) — USD charged. Set once the task completes; null while pending or failed.
    - `errors` (required, object[])
      - `code` (required, string)
      - `message` (string)
    - `user_id` (required, string)
    - `api_key_id` (required, string | null) — The API key that created the task. Null for tasks created without one.
    - `created_at` (required, string) — format: date-time.
    - `updated_at` (required, string) — format: date-time.
    - `type` (required, "image.review")
    - `request` (required, object)
      - `url` (required, string) — format: uri.
      - `effort` (string) — Reviewer panel to run. 'high' runs five strong vision models; 'low' runs three smaller ones for triage. Default `"high"`. One of: `"low"`, `"high"`.
    - `result` (required, null)
    - `status` (required, "failed")
  - **image.remove_background · failed**
    - `id` (required, string)
    - `cost` (required, string | null) — USD charged. Set once the task completes; null while pending or failed.
    - `errors` (required, object[])
      - `code` (required, string)
      - `message` (string)
    - `user_id` (required, string)
    - `api_key_id` (required, string | null) — The API key that created the task. Null for tasks created without one.
    - `created_at` (required, string) — format: date-time.
    - `updated_at` (required, string) — format: date-time.
    - `type` (required, "image.remove_background")
    - `request` (required, object)
      - `url` (required, string) — format: uri.
      - `output` (object)
        - …
      - `generate_public_access_token` (boolean) — Return a short-lived public access token as `public_access_token`, for polling this task from browser code without your API key. Defaults to false.
      - `webhook` (object)
        - …
      - `destination` (string) — ≥ 1 characters, ≤ 64 characters. Example `"bunny-prod"`.
      - `metadata` (object)
    - `result` (required, null)
    - `status` (required, "failed")
  - **image.upscale · failed**
    - `id` (required, string)
    - `cost` (required, string | null) — USD charged. Set once the task completes; null while pending or failed.
    - `errors` (required, object[])
      - `code` (required, string)
      - `message` (string)
    - `user_id` (required, string)
    - `api_key_id` (required, string | null) — The API key that created the task. Null for tasks created without one.
    - `created_at` (required, string) — format: date-time.
    - `updated_at` (required, string) — format: date-time.
    - `type` (required, "image.upscale")
    - `request` (required, object)
      - `url` (required, string) — format: uri.
      - `size` (required, object | string) — How much to enlarge each side. The upscaled image can be at most 4096x4096 pixels. One of: `"2x"`, `"4x"`.
        - …
      - `effort` (required, string) — Upscaler to run, and the price. 'low' is fast and sharp; 'high' rebuilds fine detail such as small text and faces. One of: `"low"`, `"high"`.
      - `output` (object)
        - …
      - `generate_public_access_token` (boolean) — Return a short-lived public access token as `public_access_token`, for polling this task from browser code without your API key. Defaults to false.
      - `webhook` (object)
        - …
      - `destination` (string) — ≥ 1 characters, ≤ 64 characters. Example `"bunny-prod"`.
      - `metadata` (object)
    - `result` (required, null)
    - `status` (required, "failed")
  - **video.generate · failed**
    - `id` (required, string)
    - `cost` (required, string | null) — USD charged. Set once the task completes; null while pending or failed.
    - `errors` (required, object[])
      - `code` (required, string)
      - `message` (string)
    - `user_id` (required, string)
    - `api_key_id` (required, string | null) — The API key that created the task. Null for tasks created without one.
    - `created_at` (required, string) — format: date-time.
    - `updated_at` (required, string) — format: date-time.
    - `type` (required, "video.generate")
    - `request` (required, object)
      - `model` (required, string) — One of: `"bytedance/seedance-2.0-mini"`, `"google/gemini-omni-flash-1.1"`, `"prunaai/p-video"`, `"xai/grok-imagine-video-1.5"`. Example `"bytedance/seedance-2.0-mini"`.
      - `prompt` (required, string) — Positive prompt. ≥ 1 characters, ≤ 8192 characters. Example `"A cat surfing a wave at sunset"`.
      - `negative_prompt` (string) — ≤ 8192 characters.
      - `duration` (number) — Video duration in seconds. Defaults to the model's default duration. ≥ 1, ≤ 60.
      - `size` (object | string) — Aspect ratio and resolution tier. The aspect ratio is best effort: the closest one the model supports. With image inputs the first frame sets the shape. Defaults to "auto". One of: `"auto"`, `"square"`, `"portrait"`, `"landscape"`, `"portrait_tall"`, `"landscape_wide"`, `"1:1"`, `"2:3"`, `"3:2"`, `"3:4"`, `"4:3"`, `"4:5"`, `"5:4"`, `"9:16"`, `"16:9"`, `"21:9"`, `"2:1"`, `"1:2"`, `"auto_480p"`, `"auto_720p"`, `"auto_1080p"`, `"auto_4k"`, `"square_480p"`, `"square_720p"`, `"square_1080p"`, `"square_4k"`, `"portrait_480p"`, `"portrait_720p"`, `"portrait_1080p"`, `"portrait_4k"`, `"landscape_480p"`, `"landscape_720p"`, `"landscape_1080p"`, `"landscape_4k"`, `"portrait_tall_480p"`, `"portrait_tall_720p"`, `"portrait_tall_1080p"`, `"portrait_tall_4k"`, `"landscape_wide_480p"`, `"landscape_wide_720p"`, `"landscape_wide_1080p"`, `"landscape_wide_4k"`, `"1:1_480p"`, `"1:1_720p"`, `"1:1_1080p"`, `"1:1_4k"`, `"2:3_480p"`, `"2:3_720p"`, `"2:3_1080p"`, `"2:3_4k"`, `"3:2_480p"`, `"3:2_720p"`, `"3:2_1080p"`, `"3:2_4k"`, `"3:4_480p"`, `"3:4_720p"`, `"3:4_1080p"`, `"3:4_4k"`, `"4:3_480p"`, `"4:3_720p"`, `"4:3_1080p"`, `"4:3_4k"`, `"4:5_480p"`, `"4:5_720p"`, `"4:5_1080p"`, `"4:5_4k"`, `"5:4_480p"`, `"5:4_720p"`, `"5:4_1080p"`, `"5:4_4k"`, `"9:16_480p"`, `"9:16_720p"`, `"9:16_1080p"`, `"9:16_4k"`, `"16:9_480p"`, `"16:9_720p"`, `"16:9_1080p"`, `"16:9_4k"`, `"21:9_480p"`, `"21:9_720p"`, `"21:9_1080p"`, `"21:9_4k"`, `"2:1_480p"`, `"2:1_720p"`, `"2:1_1080p"`, `"2:1_4k"`, `"1:2_480p"`, `"1:2_720p"`, `"1:2_1080p"`, `"1:2_4k"`.
        - …
      - `audio` (boolean) — Enable model-native generated audio. Only supported by models with audio capability.
      - `inputs` ((string | object)[]) — ≤ 5 items.
        - …
      - `generate_public_access_token` (boolean) — Return a short-lived public access token as `public_access_token`, for polling this task from browser code without your API key. Defaults to false.
      - `webhook` (object)
        - …
      - `metadata` (object)
    - `result` (required, null)
    - `status` (required, "failed")

```json
{
  "data": {
    "id": "tsk_01KE7XWWEQ4MCGWKBQKJ1G47RP",
    "type": "image.generate",
    "status": "completed",
    "request": {
      "model": "black-forest-labs/flux.2-pro",
      "prompt": "A futuristic cityscape at sunset with flying cars",
      "count": 1,
      "size": "landscape",
      "output": {
        "format": "webp"
      }
    },
    "result": {
      "model": "black-forest-labs/flux.2-pro",
      "images": [
        {
          "status": "success",
          "id": "img_01KE7XWWEQ4MCGWKBQKJ1G47RP",
          "url": "https://cdn.example.com/generated/image1.webp",
          "mynth_url": "https://mynthcdn.example.com/generated/image1.webp",
          "size": "1536x1024",
          "format": "webp"
        }
      ]
    },
    "errors": null,
    "cost": "0.01250000",
    "user_id": "user_01KE7XWWEQ4MCGWKBQKJ1G47RP",
    "api_key_id": "ak_01KE7XWWEQ4MCGWKBQKJ1G47RP",
    "created_at": "2025-01-15T10:30:00.000Z",
    "updated_at": "2025-01-15T10:30:12.000Z"
  }
}
```

### 400 — The request was rejected before anything was queued. `error.message` says what to change. A field that failed the schema, or one the endpoint does not take, is also listed in `error.issues`.

- `error` (required, object)
  - `code` (required, string) — `validation_error` for a body that failed validation, `invalid_json` for one that is not JSON. One of: `"validation_error"`, `"invalid_json"`.
  - `message` (required, string) — Every problem, in one sentence each, led by the field it is about.
  - `issues` (object[]) — One entry per field that failed the schema, and one per field the endpoint does not take.
    - `path` (required, (string | integer)[]) — Where the problem is, e.g. `["inputs", 0, "source"]`. Empty for the body as a whole.
    - `message` (required, string)

```json
{
  "error": {
    "code": "validation_error",
    "message": "count: Too big: expected number to be <=20. colour: Unknown field.",
    "issues": [
      {
        "path": [
          "count"
        ],
        "message": "Too big: expected number to be <=20"
      },
      {
        "path": [
          "colour"
        ],
        "message": "Unknown field."
      }
    ]
  }
}
```

## Request samples

### cURL

```bash
curl https://api.mynth.io/tasks/tsk_01KE7XWWEQ4MCGWKBQKJ1G47RP \
  -H "Authorization: Bearer $MYNTH_API_KEY"
```

### JavaScript

```ts
const response = await fetch("https://api.mynth.io/tasks/tsk_01KE7XWWEQ4MCGWKBQKJ1G47RP", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.MYNTH_API_KEY}`,
  },
});

const { data } = await response.json();
```

The full schema for this endpoint is in the [OpenAPI document](https://api.mynth.io/openapi.json).
