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

# Models

> GET /v1/models — list available model slugs and capabilities.

```bash theme={null}
curl https://api.infery.ai/v1/models \
  -H "Authorization: Bearer $INFERY_API_KEY"
```

Returns OpenAI-compatible payload:

```json theme={null}
{
  "object": "list",
  "data": [
    {
      "id": "gpt-4o",
      "object": "model",
      "created": 1713000000,
      "owned_by": "openai"
    },
    ...
  ]
}
```

## Filter by modality

```bash theme={null}
curl "https://api.infery.ai/v1/models?modality=image" \
  -H "Authorization: Bearer $INFERY_API_KEY"
```

Supported values: `text`, `image`, `audio`, `video`, `music`, `embedding`, `rerank`.

## Capabilities

`GET /v1/models/{slug}` returns extended info including:

* `supportsChat` / `supportsStreaming` / `supportsVision` / `supportsPdf` / `supportsTools` / `supportsJsonMode`
* `maxContextTokens` / `maxOutputTokens`
* `allowedParams.supported_inputs` (MIME whitelist)
* `allowedParams.max_image_size_bytes`, `max_pdf_size_bytes`, etc.

Use this at app startup to learn what each model can do.

## Public catalog

No-auth version available at:

```
GET https://api.infery.ai/public/models
```

Rate-limited (30 rpm per IP). Used by our marketing site to show a live model list.


## OpenAPI

````yaml openapi.json GET /v1/models
openapi: 3.0.0
info:
  title: Infery Gateway
  description: >-
    Infery Inference Gateway — OpenAI-compatible API for LLMs, embeddings,
    images, audio, and video
  version: '1.0'
  contact: {}
servers:
  - url: https://api.infery.ai
    description: Production
  - url: http://localhost:3001
    description: Local
security: []
tags: []
paths:
  /v1/models:
    get:
      tags:
        - Models
      summary: List available models
      operationId: listModels
      parameters: []
      responses:
        '200':
          description: >-
            List of available models. OpenAI-compatible with an `_infery`
            extension exposing capabilities and pricing.
          content:
            application/json:
              schema:
                type: object
                properties:
                  object:
                    type: string
                    example: list
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: gpt-4o
                          description: Model slug used in /v1 requests
                        object:
                          type: string
                          example: model
                        created:
                          type: integer
                          example: 1713204900
                        owned_by:
                          type: string
                          example: openai
                        permission:
                          type: array
                          items: {}
                        root:
                          type: string
                          example: gpt-4o
                        parent:
                          type: string
                          nullable: true
                          example: null
                        _infery:
                          type: object
                          description: Infery-specific capabilities and pricing
                          properties:
                            provider:
                              type: string
                              example: openai
                            modality:
                              type: string
                              enum:
                                - text
                                - embedding
                                - image
                                - audio
                                - video
                                - music
                              example: text
                            supports_chat:
                              type: boolean
                            supports_embeddings:
                              type: boolean
                            supports_streaming:
                              type: boolean
                            supports_tools:
                              type: boolean
                            max_context_tokens:
                              type: integer
                              example: 128000
                            max_output_tokens:
                              type: integer
                              example: 16384
                            pricing:
                              type: object
                              nullable: true
                              properties:
                                input_per_million:
                                  type: number
                                  example: 2.5
                                output_per_million:
                                  type: number
                                  example: 10
                                currency:
                                  type: string
                                  example: USD
                            allowed_params:
                              type: object
                              nullable: true
                              description: >-
                                Model-specific allowed parameters (sizes,
                                voices, formats, etc.)
        '401':
          description: Unauthorized — invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
      security:
        - ApiKey: []
components:
  schemas:
    ErrorResponseDto:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetailDto'
      required:
        - error
    ErrorDetailDto:
      type: object
      properties:
        message:
          type: string
          example: Model not found
          description: Human-readable error message
        type:
          type: string
          example: invalid_request_error
          description: Error category
          enum:
            - invalid_request_error
            - authentication_error
            - permission_error
            - quota_exceeded
            - rate_limit_error
            - server_error
        code:
          type: object
          example: model_not_found
          nullable: true
          description: Stable machine-readable error code
        param:
          type: object
          example: model
          nullable: true
          description: >-
            Name of the request parameter that triggered the error, if
            applicable
      required:
        - message
        - type
        - code
        - param
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: Authorization
      description: 'API key in format: Bearer inf_***'

````