> ## 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 for standard inference

> Get a list of models available for standard (OpenAI-compatible) inference

## Zero Data Retention catalog

This endpoint returns the models that your API key can use for [ZDR inference](https://docs.prem.io/zdr/overview.md). Use `GET /rvenc/models` for the confidential catalog.

The response uses the OpenAI models list format. It has `"object": "list"` and an array in `data`. Each entry has the standard `id`, `object`, `created`, and `owned_by` fields, and Prem adds more fields after them.

```bash theme={"system"}
curl "https://gateway.prem.io/openai/models?type=CHAT" \
  -H "Authorization: Bearer $PREM_API_KEY"
```

An OpenAI SDK reads this endpoint with its standard method:

```python theme={"system"}
for model in client.models.list():
    print(model.id)
```

The `regions` field of each entry shows the ZDR regions that give the model. See [Models & Pricing](https://docs.prem.io/models-and-pricing.md) for the full field reference.


## OpenAPI

````yaml get /openai/models
openapi: 3.1.0
info:
  title: Prem API
  description: Reference documentation for the Prem API.
  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: []
tags:
  - name: dev-api
    description: Developer API endpoints
  - name: Inference
    description: OpenAI-compatible inference endpoints
externalDocs:
  description: Full Prem API documentation
  url: https://docs.prem.io
paths:
  /openai/models:
    get:
      tags:
        - Models
      summary: List available models for standard inference
      description: >-
        Get a list of models available for standard (OpenAI-compatible)
        inference
      operationId: listOpenAiModels
      parameters:
        - name: type
          in: query
          description: Filter models by type
          required: false
          schema:
            type: string
            enum:
              - CHAT
              - DECISIONS
              - AUDIO_TRANSCRIPTION
              - AUDIO_SPEECH
              - IMAGE
      responses:
        '200':
          $ref: '#/components/responses/openAiModelsListResponse'
        '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
                      - 405
                      - 409
                      - 429
                      - 500
                      - 502
                      - 503
                    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:
                      - req_support_01923f4e-7b2a-7c3d-9e8f-0a1b2c3d4e5f
                    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
                      - 405
                      - 409
                      - 429
                      - 500
                      - 502
                      - 503
                    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:
                      - req_support_01923f4e-7b2a-7c3d-9e8f-0a1b2c3d4e5f
                    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
    openAiModelsListResponse:
      description: OpenAI-compatible models list retrieved successfully
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/openAiModelsList'
  schemas:
    openAiModelsList:
      type: object
      properties:
        object:
          type: string
        data:
          type: array
          items:
            $ref: '#/components/schemas/openAiModel'
      required:
        - object
        - data
    openAiModel:
      type: object
      properties:
        id:
          type: string
          description: Unique public model identifier (slug)
        object:
          type: string
          const: model
        created:
          type:
            - integer
            - 'null'
        owned_by:
          type:
            - string
            - 'null'
        model:
          type: string
          description: >-
            Model slug to pass in the `model` field of OpenAI-compatible chat
            completion requests to select this model
        name:
          type: string
        description:
          type: string
        type:
          type: string
        metadata:
          $ref: '#/components/schemas/modelMetadata'
        input_modalities:
          type: array
          items:
            type: string
        price_config:
          type: object
        regions:
          type: array
          description: >-
            Region codes the model can be served from for standard
            (OpenAI-compatible) inference.
          items:
            type: string
        requires_auth:
          type:
            - integer
            - 'null'
        usage_mode:
          type: string
        visible_in_dashboard:
          type:
            - integer
            - 'null'
        likes_count:
          type:
            - integer
            - 'null'
        dislikes_count:
          type:
            - integer
            - 'null'
        total_reviews:
          type:
            - integer
            - 'null'
        rating_percent:
          type:
            - number
            - 'null'
      required:
        - id
        - metadata
        - object
    modelMetadata:
      type: object
      description: Public model metadata.
      properties:
        attestation_version:
          type: string
          examples:
            - v2
          description: >-
            The standard attestation protocol is `v2`, which returns one
            confidential-VM report. See `/rvenc/models` for confidential
            availability.
      required:
        - attestation_version
      additionalProperties: false
  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.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.