> ## 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.

# List models

> List your organization's models, newest first, with category/status filters and paging.

Returns a page of the models owned by your organization, most recently created
first. Filter by `category` (`style`, `object`, `person`, `setting`) and/or `status`,
and paginate with `limit` and `offset`. The response includes a `pagination` object
(`limit`, `offset`, `has_more`). Requires the `models.read` scope.


## OpenAPI

````yaml api-reference/openapi.json GET /models
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:
    get:
      tags:
        - Models
      summary: List the organization's models
      description: >-
        Returns a page of the models owned by the API key's organization, most
        recently created first. Optionally filter by `category`
        (`style`|`object`|`person`|`setting`) and/or `status`
        (`pending`|`processing`|`completed`|`failed`). Soft-deleted,
        other-organization, and internal models are never returned. Requires the
        `models.read` scope.
      operationId: list_models_models_get
      parameters:
        - name: category
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/PublicModelCategory'
              - type: 'null'
            description: Filter to a single category.
            title: Category
          description: Filter to a single category.
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/PublicModelStatus'
              - type: 'null'
            description: Filter to a single creation status.
            title: Status
          description: Filter to a single creation status.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Maximum number of models to return (1-100).
            default: 20
            title: Limit
          description: Maximum number of models to return (1-100).
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
            description: Number of models to skip.
            default: 0
            title: Offset
          description: Number of models to skip.
        - 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/PublicModelList'
        '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:
    PublicModelCategory:
      type: string
      enum:
        - style
        - object
        - person
        - setting
      title: PublicModelCategory
      description: >-
        Public model category (ADR §8.2).


        Maps to the internal ``ModelType`` stored in ``models.type`` (NOT the
        separate

        ``models.category`` column). ``setting`` is the public name for internal

        ``SCENE``; the others are a straight upper/lower-case swap. Internal
        ``BASE`` is

        never exposed publicly.
    PublicModelStatus:
      type: string
      enum:
        - pending
        - processing
        - completed
        - failed
      title: PublicModelStatus
      description: >-
        Public model creation / readiness status — the lower-cased internal
        status.
    PublicModelList:
      properties:
        data:
          items:
            $ref: '#/components/schemas/PublicModelSummary'
          type: array
          title: Data
        pagination:
          $ref: '#/components/schemas/Pagination'
      type: object
      required:
        - data
        - pagination
      title: PublicModelList
      description: '``GET /models`` response — one page of the organization''s models.'
    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).
    PublicModelSummary:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
          examples:
            - Acme Brand Style
        category:
          anyOf:
            - $ref: '#/components/schemas/PublicModelCategory'
            - type: 'null'
          description: Model category — one of `style`, `object`, `person`, `setting`.
          examples:
            - style
        status:
          $ref: '#/components/schemas/PublicModelStatus'
          description: 'Creation status: `pending`, `processing`, `completed`, or `failed`.'
          examples:
            - completed
        is_ready:
          type: boolean
          title: Is Ready
          description: >-
            True when the model is `completed` AND active — usable for
            generation.
          examples:
            - true
        thumbnail_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Thumbnail Url
          description: >-
            Presigned, time-limited HTTPS thumbnail URL (null when the model has
            none).
          examples:
            - https://cdn.samsa.ai/models/…/thumbnail.webp?X-Amz-Signature=…
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - name
        - status
        - is_ready
        - created_at
        - updated_at
      title: PublicModelSummary
      description: >-
        A model in the organization's catalog — the ``GET /models`` list item
        (ADR §10).
    Pagination:
      properties:
        limit:
          type: integer
          title: Limit
          description: Page size that was applied (1-100).
          examples:
            - 20
        offset:
          type: integer
          title: Offset
          description: Number of items skipped.
          examples:
            - 0
        has_more:
          type: boolean
          title: Has More
          description: True when more items exist beyond this page.
          examples:
            - false
      type: object
      required:
        - limit
        - offset
        - has_more
      title: Pagination
      description: Offset-pagination metadata for list responses.
    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_...`.

````