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

# List models

> List available AI models in a workspace with optional filtering by modality, capabilities, and text search.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/workspaces/{workspace_id}/models
openapi: 3.1.0
info:
  title: Layer REST API
  description: >
    REST API for AI-powered game asset creation on the Layer platform.


    ## Authentication


    All endpoints require a Bearer token in the `Authorization` header:


    ```

    Authorization: Bearer <token>

    ```


    ### Personal Access Tokens (recommended)


    The simplest way to authenticate is with a Personal Access Token (PAT):


    1. Log in to [app.layer.ai](https://app.layer.ai)

    2. Go to **Settings > Personal Access Tokens**

    3. Click **Create Token**, give it a name, and copy the token value

    4. Pass it as `Authorization: Bearer <your-pat-token>`


    PATs are long-lived and ideal for scripts, CI pipelines, and partner
    integrations.


    ### OAuth2 (browser-based)


    For browser-based applications, use the Auth0 OAuth2 flow. Redirect users to

    the Layer login page, exchange the authorization code for a JWT access
    token,

    and use it as `Authorization: Bearer <jwt>`.


    ## Creative Units


    Generations consume Creative Units (CUs). Use the estimate endpoints to
    check

    cost before executing. Check workspace balance via `GET
    /v1/workspaces/{id}`.


    ## Pagination


    List endpoints support cursor-based pagination via `limit` and `cursor`
    query

    parameters. Responses include a `pagination` object with `next_cursor`,

    `has_more_results`, and `total_count`. Cursors are opaque — do not parse or

    construct them.


    ## Errors


    All errors return [RFC 7807 Problem
    Details](https://tools.ietf.org/html/rfc7807):


    ```json

    {
      "type": "https://api.layer.ai/errors/ERROR_CODE",
      "title": "Human-readable title",
      "status": 404,
      "detail": "Detailed description of what went wrong."
    }

    ```


    Common status codes: `401` (unauthenticated), `402` (insufficient balance),

    `403` (forbidden), `404` (not found), `422` (invalid input), `429` (rate
    limited).
  version: 1.0.0
servers:
  - url: https://api.app.layer.ai/api
    description: Production
  - url: /backend/rest
    description: Local development
security: []
paths:
  /v1/workspaces/{workspace_id}/models:
    get:
      tags:
        - Models
      summary: List models
      description: >-
        List available AI models in a workspace with optional filtering by
        modality, capabilities, and text search.
      operationId: listModels
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Workspace Id
        - name: modality
          in: query
          required: false
          schema:
            anyOf:
              - enum:
                  - image
                  - video
                  - three_d
                  - audio
                  - text
                type: string
              - type: 'null'
            description: Filter by modality
            title: Modality
          description: Filter by modality
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Full-text search on model name/description
            title: Search
          description: Full-text search on model name/description
        - name: supports_reference_images
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            description: Require reference image support
            title: Supports Reference Images
          description: Require reference image support
        - name: inpainting
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            description: Require inpainting support
            title: Inpainting
          description: Require inpainting support
        - name: outpainting
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            description: Require outpainting support
            title: Outpainting
          description: Require outpainting support
        - name: generate_audio
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            description: Require audio generation with video
            title: Generate Audio
          description: Require audio generation with video
        - name: text_to_3d
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            description: Require text-to-3D
            title: Text To 3D
          description: Require text-to-3D
        - name: image_to_3d
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            description: Require image-to-3D
            title: Image To 3D
          description: Require image-to-3D
        - name: text_to_speech
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            description: Require text-to-speech
            title: Text To Speech
          description: Require text-to-speech
        - name: sound_effect
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            description: Require sound effect generation
            title: Sound Effect
          description: Require sound effect generation
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 20
            title: Limit
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Cursor
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListModelsOutput'
        '401':
          description: Unauthenticated — missing or invalid Bearer token.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    example: https://api.layer.ai/errors/ERROR_CODE
                  title:
                    type: string
                    example: Error Title
                  status:
                    type: integer
                    example: 400
                  detail:
                    type: string
                    example: Human-readable description.
                required:
                  - type
                  - title
                  - status
                  - detail
        '402':
          description: Insufficient Creative Units balance.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    example: https://api.layer.ai/errors/ERROR_CODE
                  title:
                    type: string
                    example: Error Title
                  status:
                    type: integer
                    example: 400
                  detail:
                    type: string
                    example: Human-readable description.
                required:
                  - type
                  - title
                  - status
                  - detail
        '403':
          description: Forbidden — insufficient permissions.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    example: https://api.layer.ai/errors/ERROR_CODE
                  title:
                    type: string
                    example: Error Title
                  status:
                    type: integer
                    example: 400
                  detail:
                    type: string
                    example: Human-readable description.
                required:
                  - type
                  - title
                  - status
                  - detail
        '404':
          description: Resource not found.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    example: https://api.layer.ai/errors/ERROR_CODE
                  title:
                    type: string
                    example: Error Title
                  status:
                    type: integer
                    example: 400
                  detail:
                    type: string
                    example: Human-readable description.
                required:
                  - type
                  - title
                  - status
                  - detail
        '422':
          description: Invalid input parameters.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    example: https://api.layer.ai/errors/ERROR_CODE
                  title:
                    type: string
                    example: Error Title
                  status:
                    type: integer
                    example: 400
                  detail:
                    type: string
                    example: Human-readable description.
                required:
                  - type
                  - title
                  - status
                  - detail
        '429':
          description: Rate limited — too many concurrent requests.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    example: https://api.layer.ai/errors/ERROR_CODE
                  title:
                    type: string
                    example: Error Title
                  status:
                    type: integer
                    example: 400
                  detail:
                    type: string
                    example: Human-readable description.
                required:
                  - type
                  - title
                  - status
                  - detail
        '500':
          description: Internal server error.
          content:
            application/problem+json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    example: https://api.layer.ai/errors/ERROR_CODE
                  title:
                    type: string
                    example: Error Title
                  status:
                    type: integer
                    example: 400
                  detail:
                    type: string
                    example: Human-readable description.
                required:
                  - type
                  - title
                  - status
                  - detail
      security:
        - HTTPBearer: []
components:
  schemas:
    ListModelsOutput:
      properties:
        models:
          items:
            $ref: '#/components/schemas/ModelSummary'
          type: array
          title: Models
        pagination:
          $ref: '#/components/schemas/PaginationOutput'
      type: object
      required:
        - models
        - pagination
      title: ListModelsOutput
    ModelSummary:
      properties:
        model_id:
          type: string
          format: uuid
          title: Model Id
          description: >-
            Unique model identifier — use for generation or to fetch full
            details.
        name:
          type: string
          title: Name
        modality:
          $ref: '#/components/schemas/Modality'
          description: image, video, three_d, or audio
        base_model_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Base Model Id
          description: Base model identifier, e.g. flux_2_pro, kling_v3_pro
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Model description
        inference_timing:
          type: string
          title: Inference Timing
          description: Typical generation time range, e.g. '5-15s'
      type: object
      required:
        - model_id
        - name
        - modality
        - inference_timing
      title: ModelSummary
    PaginationOutput:
      properties:
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
          description: Cursor to use to get the next page
        has_more_results:
          type: boolean
          title: Has More Results
          description: If there are more results to page through
        total_count:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Count
          description: Total number of results matching the query
      type: object
      required:
        - has_more_results
      title: PaginationOutput
    Modality:
      type: string
      enum:
        - text
        - image
        - audio
        - video
        - three_d
      title: Modality
  securitySchemes:
    HTTPBearer:
      type: http
      description: >-
        Personal Access Token or OAuth2 JWT. Create a PAT at app.layer.ai →
        Settings → Personal Access Tokens.
      scheme: bearer

````