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

# List available models

> Get a list of all available models



## OpenAPI

````yaml get /models
openapi: 3.1.0
info:
  title: Prem API
  description: Full description of private and dev-availble API endpoints
  version: 1.0.0
  termsOfService: https://prem.io/terms
  contact:
    name: API Support
    url: https://help.prem.io
    email: support@premai.io
servers:
  - url: https://gateway.prem.io
    description: Production API server
security: []
paths:
  /models:
    get:
      tags:
        - Models
      summary: List available models
      description: Get a list of all available models
      operationId: listModels
      parameters:
        - name: type
          in: query
          description: Filter models by type
          required: false
          schema:
            type: string
            enum:
              - CHAT
              - AUDIO_TRANSCRIPTION
              - AUDIO_SPEECH
              - IMAGE
      responses:
        '200':
          $ref: '#/components/responses/listModelsResponse'
        '401':
          $ref: '#/components/responses/401'
        '403':
          $ref: '#/components/responses/403'
      security:
        - BearerAuth: []
          ApiKeyAuth: []
components:
  responses:
    '401':
      description: Access token is missing or invalid
      content:
        application/json:
          schema:
            allOf:
              - type: object
                properties:
                  status:
                    type: integer
                    enum:
                      - 400
                      - 401
                      - 403
                      - 404
                    description: Status code of the response
                  data:
                    type:
                      - object
                      - 'null'
                    description: Response data containing the requested object
                  error:
                    type:
                      - string
                      - 'null'
                    examples:
                      - Some error message
                    description: Error message of the response, human readable
                  message:
                    type: 'null'
                  env:
                    type: string
                    enum:
                      - development
                      - production
                    description: API environment
                  log:
                    type:
                      - string
                      - object
                      - 'null'
                    examples:
                      - request_id: req_1234567890
                      - Some pertinent log message
                    description: >-
                      Useful informaiton, not always present, to debug the
                      response
                  validator:
                    type:
                      - object
                      - array
                      - 'null'
                    examples:
                      - email: Invalid email address
                        password: Password is required
                    description: >-
                      Validator response object, each key is the field name and
                      value is the error message
                  support_id:
                    type:
                      - string
                      - 'null'
                    format: uuid
                    examples:
                      - support_uuidv7-something-else
                    description: >-
                      Support ID linked to the response, used to identify it
                      when talking with our team
                required:
                  - status
                  - error
                  - message
                  - env
                  - log
                  - support_id
                additionalProperties: false
              - properties:
                  status:
                    type: integer
                    enum:
                      - 401
    '403':
      description: You do not have the required permissions to access this resource
      content:
        application/json:
          schema:
            allOf:
              - type: object
                properties:
                  status:
                    type: integer
                    enum:
                      - 400
                      - 401
                      - 403
                      - 404
                    description: Status code of the response
                  data:
                    type:
                      - object
                      - 'null'
                    description: Response data containing the requested object
                  error:
                    type:
                      - string
                      - 'null'
                    examples:
                      - Some error message
                    description: Error message of the response, human readable
                  message:
                    type: 'null'
                  env:
                    type: string
                    enum:
                      - development
                      - production
                    description: API environment
                  log:
                    type:
                      - string
                      - object
                      - 'null'
                    examples:
                      - request_id: req_1234567890
                      - Some pertinent log message
                    description: >-
                      Useful informaiton, not always present, to debug the
                      response
                  validator:
                    type:
                      - object
                      - array
                      - 'null'
                    examples:
                      - email: Invalid email address
                        password: Password is required
                    description: >-
                      Validator response object, each key is the field name and
                      value is the error message
                  support_id:
                    type:
                      - string
                      - 'null'
                    format: uuid
                    examples:
                      - support_uuidv7-something-else
                    description: >-
                      Support ID linked to the response, used to identify it
                      when talking with our team
                required:
                  - status
                  - error
                  - message
                  - env
                  - log
                  - support_id
                additionalProperties: false
              - properties:
                  status:
                    type: integer
                    enum:
                      - 403
    listModelsResponse:
      description: Models list retrieved successfully
      content:
        application/json:
          schema:
            allOf:
              - $ref: '#/components/schemas/Response200'
              - $ref: '#/components/schemas/listModelsResponse'
  schemas:
    Response200:
      type: object
      properties:
        status:
          type: integer
          enum:
            - 200
            - 201
            - 202
          description: Status code of the response
        data:
          type:
            - object
            - array
            - 'null'
          description: Response data containing the requested object
        error:
          type:
            - string
            - 'null'
          examples:
            - Invalid email address
          description: Error message of the response, human readable
        message:
          type:
            - string
            - 'null'
          examples:
            - Resource created successfully
          description: Message of the response, human readable
        env:
          type: string
          enum:
            - development
            - production
          description: API environment
        log:
          type:
            - string
            - object
            - 'null'
          examples:
            - request_id: req_1234567890
            - Some pertinent log message
          description: Useful informaiton, not always present, to debug the response
        validator:
          type:
            - object
            - array
            - 'null'
          examples:
            - email: Invalid email address
              password: Password is required
          description: >-
            Validator response object, each key is the field name and value is
            the error message
        support_id:
          type:
            - string
            - 'null'
          format: uuid
          examples:
            - support_uuidv7-something-else
          description: >-
            Support ID linked to the response, used to identify it when talking
            with our team
      required:
        - status
        - data
        - message
        - env
      examples:
        - status: 200
          data:
            id: '123'
          error: null
          log: null
          validator: null
          support_id: null
          message: Resource created successfully
          env: development
    listModelsResponse:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/chatsModel'
      required:
        - data
      examples:
        - data:
            - id: 3
              name: GPT OSS 120B
              model: openai/gpt-oss-120b
              enabled: 1
              created_at: '2025-10-23 22:57:28'
              description: >-
                A large 120B open-source model offering high-quality, adaptable
                conversational performance.
              requires_auth: 1
              input_modalities:
                - text
            - id: 4
              name: GLM 4.6 358B
              model: zai-org/GLM-4.6-FP8
              enabled: 1
              created_at: '2025-10-23 22:57:28'
              description: >-
                A massive 358B open-source model designed for powerful,
                flexible, and high-fidelity language generation.
              requires_auth: 1
              input_modalities:
                - text
    chatsModel:
      type: object
      properties:
        id:
          type: integer
          description: Model ID
        model:
          type: string
          description: Model identifier
        type:
          type: string
          description: Model type
          enum:
            - CHAT
            - AUDIO_TRANSCRIPTION
            - AUDIO_SPEECH
            - IMAGE
        name:
          type: string
          description: Human-readable model name
        description:
          type:
            - string
            - 'null'
          description: Model description
        requires_auth:
          type: integer
          description: Whether the model requires authentication (0 or 1)
          minimum: 0
          maximum: 1
        enabled:
          type: integer
          description: Whether the model is enabled (0 or 1)
          minimum: 0
          maximum: 1
        input_modalities:
          type: array
          description: Input modalities supported by the model
          items:
            type: string
        created_at:
          type: string
          format: mysql-date-time
          description: Timestamp when the model was created
        price_config:
          type:
            - object
            - 'null'
          description: Price configuration for the model
      required:
        - id
        - model
        - type
        - enabled
        - created_at
      additionalProperties: false
      examples:
        - id: 1
          model: gpt-4
          type: CHAT
          name: GPT-4
          description: Advanced language model
          requires_auth: 1
          enabled: 1
          created_at: '2024-01-01 00:00:00.123'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'Send your access token as header Authorization: Bearer {accessToken}'
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Your API key that starts with sk_live or sk_test. You can create yours
        at go.prem.io/api-keys.

````