> ## Documentation Index
> Fetch the complete documentation index at: https://docs.samsa.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Get an image edit

> Poll a Magic Edit job for status and, once completed, the edited images.

Retrieve the status of a Magic Edit job. While it is `pending` or `processing`,
keep polling; once `completed`, the response carries the edited images, each with a
presigned `url` valid for **24 hours**. Only edit jobs your organization created are
visible; any other id returns [`404 not_found`](/guides/errors#not_found).

<Tip>
  Pass a `webhook_url` on the original [edit request](/api-reference/edits/create) to
  receive a signed callback instead of polling. See [Webhooks](/guides/webhooks).
</Tip>


## OpenAPI

````yaml api-reference/openapi.json GET /images/edits/{edit_id}
openapi: 3.1.0
info:
  title: Samsa API
  description: >-
    The Samsa public REST API. Authenticate with an organization API key as a
    bearer token (`Authorization: Bearer samsa_sk_...`). Errors follow a single
    envelope shape; every response carries an `X-Request-ID`.
  version: 1.0.0
servers:
  - url: https://api.samsa.ai/public/v1
security:
  - BearerAuth: []
paths:
  /images/edits/{edit_id}:
    get:
      tags:
        - Images
      summary: Retrieve an image edit's status and results
      description: >-
        Returns the job status (`pending`, `processing`, `completed`, `failed`,
        `cancelled`), and — once `completed` — the edited images with presigned
        (24h) URLs. Only edit jobs your organization submitted through the
        public API are visible; anything else returns `404`. Requires the
        `images.edit` scope.
      operationId: get_image_edit_images_edits__edit_id__get
      parameters:
        - name: edit_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Edit Id
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicImageEditDetail'
        '401':
          description: Missing, invalid, expired, or revoked API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '403':
          description: The API key lacks the required scope for this operation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: Generation, or a referenced model/palette, not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '422':
          description: Request validation failed (prompt, engine, resolution, ...).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: Per-key rate limit or per-org concurrency cap exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
components:
  schemas:
    PublicImageEditDetail:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        status:
          $ref: '#/components/schemas/PublicImageStatus'
          description: '`pending`, `processing`, `completed`, `failed`, or `cancelled`.'
          examples:
            - completed
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the job was submitted.
        credits_used:
          anyOf:
            - type: integer
            - type: 'null'
          title: Credits Used
          description: Credits charged for this job.
          examples:
            - 5
        images:
          items:
            $ref: '#/components/schemas/PublicImageAsset'
          type: array
          title: Images
          description: Produced images (presigned URLs); empty until `completed`.
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: Failure detail when `status` is `failed`; otherwise null.
      type: object
      required:
        - id
        - status
        - created_at
      title: PublicImageEditDetail
      description: >-
        `GET /images/edits/{id}` body — same contract as image generation.


        Both are backed by `image_generation_tasks`; a distinct name for the
        docs.
    ErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
      type: object
      required:
        - error
      title: ErrorEnvelope
      description: The complete public error body — an ``error`` object wrapper (ADR §5).
    PublicImageStatus:
      type: string
      enum:
        - pending
        - processing
        - completed
        - failed
        - cancelled
      title: PublicImageStatus
      description: >-
        Public image-job status — the lower-cased internal ``TaskStatus``.


        Deliberately the plain lower-cased internal value (NOT the ADR §7.2

        ``PENDING -> queued`` remap): the ticket's 202 uses ``status:
        "pending"`` and

        its fixtures say ``pending/processing/completed/failed``, and this keeps
        the

        public surface consistent with the already-shipped models API

        (``PublicModelStatus``).
    PublicImageAsset:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        url:
          type: string
          title: Url
          description: Presigned, time-limited (24h) HTTPS URL of the full image.
          examples:
            - https://cdn.samsa.ai/user-.../abc.png?X-Amz-Signature=...
        thumbnail_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Thumbnail Url
          description: Presigned (24h) thumbnail URL, when available.
        width:
          anyOf:
            - type: integer
            - type: 'null'
          title: Width
          description: Pixel width, when known.
        height:
          anyOf:
            - type: integer
            - type: 'null'
          title: Height
          description: Pixel height, when known.
        seed:
          anyOf:
            - type: integer
            - type: 'null'
          title: Seed
          description: Seed used, when known.
      type: object
      required:
        - id
        - url
      title: PublicImageAsset
      description: One produced image on a completed job (ADR §7.2).
    ErrorDetail:
      properties:
        type:
          type: string
          title: Type
          examples:
            - authentication_error
        code:
          type: string
          title: Code
          examples:
            - invalid_api_key
        message:
          type: string
          title: Message
          examples:
            - The provided API key is invalid, expired, or revoked.
        request_id:
          type: string
          title: Request Id
          examples:
            - 8f14e45fceea167a5a36dedd4bea2543
        param:
          anyOf:
            - type: string
            - type: 'null'
          title: Param
          description: Present on validation errors — names the offending field.
          examples:
            - aspect_ratio
      type: object
      required:
        - type
        - code
        - message
        - request_id
      title: ErrorDetail
      description: The ``error`` object of the public envelope (ADR §5).
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Organization API key as a bearer token: `Authorization: Bearer
        samsa_sk_...`.

````