Skip to main content
GET
/
images
/
generations
/
{generation_id}
Retrieve an image generation's status and results
curl --request GET \
  --url https://api.samsa.ai/public/v1/images/generations/{generation_id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "credits_used": 5,
  "images": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "url": "<string>",
      "thumbnail_url": "<string>",
      "width": 123,
      "height": 123,
      "seed": 123
    }
  ],
  "error": "<string>"
}
Retrieve the status of a generation job. While it is pending or processing, keep polling; once completed, the response carries the produced images, each with a presigned url valid for 24 hours — download the assets before they expire. Only jobs your organization created are visible; any other id returns 404 not_found.
Prefer push over polling? Pass a webhook_url on the original generation request to receive a signed callback the moment the job reaches a terminal status. See Webhooks.

Authorizations

Authorization
string
header
required

Organization API key as a bearer token: Authorization: Bearer samsa_sk_....

Headers

authorization
string | null

Path Parameters

generation_id
string<uuid>
required

Response

Successful Response

GET /images/generations/{id} body (ADR §7.2).

created_at is the job's submit time, sourced from the credit ledger — the image_generation_tasks table has no created_at column.

id
string<uuid>
required
status
enum<string>
required

pending, processing, completed, failed, or cancelled.

Available options:
pending,
processing,
completed,
failed,
cancelled
Example:

"completed"

created_at
string<date-time>
required

When the job was submitted.

credits_used
integer | null

Credits charged for this job.

Example:

5

images
PublicImageAsset · object[]

Produced images (presigned URLs); empty until completed.

error
string | null

Failure detail when status is failed; otherwise null.