> ## 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 model status

> Poll a model's creation lifecycle status.

Poll a model's creation status. Returns the lifecycle `status`
(`pending`, `processing`, `completed`, or `failed`) and, on failure, the `error`
detail. Unknown or other-organization ids return
[`404 not_found`](/guides/errors#not_found). Requires the `models.read` scope.

Once `status` is `completed`, the model is ready to compose into
[image generation](/api-reference/images/generate),
[Magic Edit](/api-reference/edits/create), and
[styled video](/api-reference/videos/generate).


## OpenAPI

````yaml api-reference/openapi.json GET /models/{model_id}/status
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:
  /models/{model_id}/status:
    get:
      tags:
        - Models
      summary: Poll a model's creation status
      description: >-
        Returns the model's lifecycle status
        (`pending`|`processing`|`completed`|`failed`) and, on failure, the error
        detail. Unknown or other-organization ids return `404`. Requires the
        `models.read` scope.
      operationId: get_model_status_models__model_id__status_get
      parameters:
        - name: model_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Model 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/PublicModelStatusResponse'
        '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.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: >-
            Model not found (unknown id, another organization, deleted, or not
            public).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '422':
          description: Request validation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: Rate limit exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
components:
  schemas:
    PublicModelStatusResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        status:
          $ref: '#/components/schemas/PublicModelStatus'
          description: '`pending`, `processing`, `completed`, or `failed`.'
          examples:
            - processing
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: Failure detail when `status` is `failed`; otherwise null.
      type: object
      required:
        - id
        - status
      title: PublicModelStatusResponse
      description: '`GET /models/{id}/status` body (ADR §7.2).'
    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).
    PublicModelStatus:
      type: string
      enum:
        - pending
        - processing
        - completed
        - failed
      title: PublicModelStatus
      description: >-
        Public model creation / readiness status — the lower-cased internal
        status.
    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_...`.

````