---
title: "Get an AI generation job"
method: GET
path: "/ai/generate/{jobUid}"
tags: ["AI"]
---

# Get an AI generation job

`GET /ai/generate/{jobUid}`

## Request

- Base URL: `https://api.dynapictures.com`
- URL: `https://api.dynapictures.com/ai/generate/{jobUid}`
- Auth: HTTP bearer

Returns the state of a job, and the result URL once it is done.

## Path parameters

- `jobUid` string, required

## Response `200`

The job.

- AiJob
  - `jobUid` string, required: The ID of the job.
  - `status` 'queued' | 'running' | 'partial' | 'done' | 'error', required: The job state. `done` and `error` are final.
  - `partialUrl` string, uri, nullable: URL of an intermediate result, when the model produces one.
  - `resultUrl` string, uri, nullable: URL of the generated image, once `status` is `done`. Download it to keep it: the URL is not guaranteed to last.
  - `creditsCharged` integer: The AI credits this job used.
  - `creditsRemaining` integer, nullable: The remaining AI credit balance, once the job has finished.
  - `error` string, nullable: What went wrong, when `status` is `error`.

## Other responses

- `401`: The API key is missing or wrong.
- `404`: The resource does not exist, or the key has no access to it.

---

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