---
title: "Get Job Status"
method: GET
path: "/v2/phota/jobs/{job_id}"
tags: ["Studio"]
---

# Get Job Status

`GET /v2/phota/jobs/{job_id}`

## Request

- Base URL: `https://api.photalabs.com`
- URL: `https://api.photalabs.com/v2/phota/jobs/{job_id}`
- Auth: API key in header `X-API-Key`

Poll an async edit/generate/enhance/remix job's status.

## Path parameters

- `job_id` string, required

## Response `200`

Successful Response

- JobStatus: Status of an async edit/generate job (GET /v1/jobs/{job_id}).
  - `job_id` string, required
  - `status` 'pending' | 'running' | 'succeeded' | 'failed', required
  - `operation` 'edit' | 'generate' | 'enhance' | 'remix', required
  - `result` EditResponse: Response returned by the edit, generate, and enhance endpoints.
    - `images` string[]: Output image(s) as raw base64-encoded strings. Format matches the requested output_format. Populated when response_mode='bytes', empty otherwise.
    - `download_urls` string[]: Signed download URLs for each output image (24-hour expiry). Populated when response_mode='urls', empty otherwise.
    - `known_subjects` KnownGeneratedSubjectCounts, required: Counts of known subjects generated, keyed by profile ID.
      - `counts` object: Mapping of profile ID to the number of times that subject was generated.
  - `error` JobError: Failure detail surfaced on a failed job. ``code`` is one of the synchronous customer-facing categories (:class:`PhotaErrorCode`, so an async pipeline failure surfaces the same stable code as its sync twin) or a job-infrastructure-specific code (:class:`~database.models.EditJobErrorCode`, for a run that was lost or never started, which have no synchronous equivalent).
    - `code` union, required: Machine-readable error code (a PhotaErrorCode or job-infra EditJobErrorCode).
      - 'CONTENT_MODERATION' | 'SERVICE_UNAVAILABLE' | 'INPUT_IMAGE_FETCH_FAILED' | 'NOT_FOUND' | 'PROFILE_NOT_FOUND' | 'PROFILE_NOT_READY' | 'INVALID_REQUEST' | 'NO_IMAGE_GENERATED' | 'TIMEOUT' | 'INTERNAL_ERROR' | 'MIXED_PROFILE_MODEL_VERSIONS': Machine-readable error codes returned by the Phota API. Clients can use these codes to programmatically react to specific error types without parsing human-readable messages. Attributes: CONTENT_MODERATION: Content was blocked by a safety filter. SERVICE_UNAVAILABLE: Upstream resource exhaustion or rate limit. INPUT_IMAGE_FETCH_FAILED: A caller-supplied input image URL could not be downloaded after retries because the URL's host/CDN kept failing (timeouts or 5xx from the image host). Retryable, but the failure is upstream of Phota — the URL's host, not this service. NOT_FOUND: Generic resource not found or no longer available (unknown route, unknown job, or an expired job result). PROFILE_NOT_FOUND: The requested profile does not exist. PROFILE_NOT_READY: The profile exists but training has not completed. INVALID_REQUEST: Malformed input, missing fields, or bad parameters. NO_IMAGE_GENERATED: The model completed without producing an image (a soft refusal or transient glitch — no safety verdict). The request is not charged; retrying may succeed. TIMEOUT: The request exceeded its synchronous time budget; resubmit with ``async: true`` and poll for the result. INTERNAL_ERROR: An unexpected internal error (genuine bug). MIXED_PROFILE_MODEL_VERSIONS: The request references profiles trained on different model versions (``v1`` and ``v2``); a request may only use profiles of one model version.
      - 'instance_died' | 'dispatch_failed': Job-infrastructure failure codes with no synchronous-pipeline equivalent. Pipeline failures reuse the synchronous customer-facing taxonomy (``api.schema.phota.PhotaErrorCode``) so an async failure surfaces the same stable code as its sync twin. These members cover the job-infrastructure failure modes the sync path never produces: Attributes: INSTANCE_DIED: A started (``RUNNING``) job's run was lost: its worker died, or it ran past its attempt timeout, on both attempts. DISPATCH_FAILED: No worker started a ``PENDING`` job within its start timeout.
    - `message` string, required: Human-readable error description.
  - `created_at` string, date-time, required
  - `completed_at` string, date-time, nullable

## Other responses

- `401`: Invalid API key in the X-API-Key header.
- `403`: Missing X-API-Key header (no API key provided).
- `404`: Resource not found.
- `410`: Job result has expired.
- `422`: Validation Error
- `500`: Internal error.
- `503`: Service temporarily unavailable.

---

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