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

# Models

> Discover and use the current x6.ai model catalog across supported vendors and provider channels through a unified API.

# Models

x6.ai exposes the current model catalog from its live registry. The catalog size changes as models and provider channels are added, updated, or deprecated, so use the `total` field from `GET /api/v1/models` as the source of truth instead of hardcoding a model count.

Browse the full catalog at [**https://x6.ai/models**](https://x6.ai/models).

***

## API Reference

### List Models

Retrieves a paginated list of logical models with metadata, capability tags, provider-channel aliases, and context/output limits.

```http theme={null}
GET /api/v1/models
```

#### Parameters

| Parameter | Type | Default | Description |
| - | - | - | - |
| `page` | `int` | `1` | Page number |
| `page_size` | `int` | `20` | Items per page (max `100`) |
| `model_name` | `string` | - | Case-insensitive fuzzy search on the model display name |
| `provider` | `string` | - | Filter by a single provider-channel alias (backward compatible) |
| `providers` | `string[]` | - | Multi-select provider-channel filter (max 20 values) |
| `vendor` | `string` | - | Filter by a single vendor/model owner (backward compatible) |
| `vendors` | `string[]` | - | Multi-select vendor filter (max 20 values) |
| `label` | `string` | - | Filter by label: `Recommended`, `Flagship`, `Free for Now`, or `Deprecated` |
| `tags` | `string[]` | - | Capability/modality filter (max 10 values), e.g. `Text`, `Image`, `File`, `Audio`, `Video` |
| `show_deprecated` | `bool` | `true` | Include deprecated models in results |
| `context_min` | `int` | - | Minimum context window length in tokens |
| `context_max` | `int` | - | Maximum context window length in tokens |
| `output_min` | `int` | - | Minimum max output length in tokens |
| `output_max` | `int` | - | Maximum max output length in tokens |

For array parameters, pass repeated query keys, for example `vendors=OpenAI&vendors=Google`.

#### Example

```bash theme={null}
curl "https://api.x6.ai/v1/models?page=1&page_size=20"
```

#### Response

```json theme={null}
{
  "total": 66,
  "page": 1,
  "page_size": 1,
  "items": [
    {
      "id": 58,
      "model_name": "Gemini 3.1 Pro Preview",
      "vendor": "Google",
      "providers": "Default",
      "description": "Gemini 3.1 Pro Preview is Google's frontier reasoning model...",
      "label": "Recommended",
      "tags": "Text, Image, File, Audio, Video",
      "total_context": 1050000,
      "max_output": 65500,
      "is_free": false,
      "created_at": "2026-03-31T15:18:37",
      "updated_at": "2026-03-31T15:18:37"
    }
  ]
}
```

The values above are an example response shape. The live catalog can change.

***

### Model Group

Returns the provider-channel implementations for a given logical model, grouped by x6.ai format standard and provider-channel alias. This powers model detail pages where users can see which channels can serve a model.

```http theme={null}
GET /api/v1/models/group?model_name=Gemini%203.1%20Pro%20Preview
```

#### Response Shape

```json theme={null}
{
  "Gemini 3.1 Pro Preview": {
    "OpenAI": {
      "Default": [
        {
          "model_id": 1097,
          "model_name": "gemini-3.1-pro-preview",
          "display_name": "Gemini 3.1 Pro Preview",
          "model_standard": "OpenAI",
          "provider": "Default",
          "endpoint": "https://api.x6.ai",
          "vendor": "Google",
          "total_context": 1050000,
          "max_output": 65500,
          "pricing": {
            "input": [
              {
                "token_min": 0,
                "token_max": 200000,
                "price_usd": "2.20000000000000",
                "price_wai_credit": 2200
              }
            ],
            "output": [
              {
                "token_min": 0,
                "token_max": 200000,
                "price_usd": "13.20000000000000",
                "price_wai_credit": 13200
              }
            ]
          }
        }
      ]
    }
  }
}
```

Currently, the public `GET /api/v1/{model_standard}/models` route accepts x6.ai format standards such as `OpenAI` and `Anthropic`. Use `/api/v1/models/group` when you need the grouped view for a logical model.

***

### Providers List

Returns all available provider-channel aliases, sorted alphabetically. Provider-channel aliases are routing channels, not necessarily model vendors.

```http theme={null}
GET /api/v1/models/providers
```

```bash theme={null}
curl "https://api.x6.ai/v1/models/providers"
```

Example values include `OpenAI Channel`, `Anthropic Channel`, `GCP Vertex`, `Default`, and `Default`.

***

### Vendors List

Returns all unique vendor names, sorted alphabetically. Vendors are the model owners or model families, such as `OpenAI`, `Anthropic`, `Google`, `DeepSeek`, `Qwen`, and others.

```http theme={null}
GET /api/v1/models/vendors
```

```bash theme={null}
curl "https://api.x6.ai/v1/models/vendors"
```

***

## Model Labels

Models on **x6.ai/models** are tagged with labels to help you choose the right one:

| Label | Meaning |
| - | - |
| `Recommended` | Best overall value for most use cases |
| `Flagship` | Top-tier capability models from a vendor or model family |
| `Free for Now` | Currently free to test (pricing subject to change) |
| `Deprecated` | End-of-life models retained for backward compatibility |

***

## Pricing

x6.ai stores pricing as per-model, per-provider-channel, per-token-type tiers in the `model_pricing` table. Pricing is returned by endpoints that expose model implementations, such as `GET /api/v1/models/group` and `GET /api/v1/{model_standard}/models?with_price=true`.

Each pricing entry contains:

| Field | Description |
| - | - |
| `token_min` | Inclusive lower bound for the usage tier |
| `token_max` | Inclusive upper bound for the usage tier; `null` means unlimited |
| `price_usd` | USD price per 1,000,000 tokens for this tier |
| `price_wai_credit` | x6.ai credit price per 1,000,000 tokens for this tier |

Supported token types are defined by the registry and currently include:

| Token Type | Description |
| - | - |
| `input` | Input text tokens |
| `output` | Output text tokens |
| `cache_read` | Cached input tokens read |
| `cache_write` | Cached input tokens written |
| `input_audio` / `output_audio` | Audio input or output tokens |
| `input_image` / `output_image` | Image input or output units/tokens |
| `input_video` / `output_video` | Video input or output units/tokens |
| `input_audio_cache` / `input_image_cache` / `input_video_cache` | Cached modality-specific input |
| `output_per_audio` / `output_per_image` / `output_per_video` | Per-output media unit pricing |

A price of `0` means the tier is free.

***

## Chat Completion Request Parameters

When calling `POST /api/v1/chat/completions`, supported parameters depend on the target model and provider channel. Common OpenAI-compatible parameters include:

| Parameter | Description |
| - | - |
| `model` | Target x6.ai model identifier |
| `messages` | Conversation array |
| `temperature` | Output randomness |
| `top_p` | Nucleus sampling |
| `n` | Number of completions to generate |
| `max_tokens` / `max_completion_tokens` | Maximum completion length |
| `stop` | Custom stop sequences |
| `stream` / `stream_options` | Streaming controls |
| `presence_penalty` | Encourage topic diversity |
| `frequency_penalty` | Reduce repetition |
| `logit_bias` | Adjust token likelihoods |
| `logprobs` / `top_logprobs` | Token log probability controls |
| `tools` | Function/tool definitions |
| `tool_choice` | Control tool selection behavior |
| `parallel_tool_calls` | Allow or disable parallel tool calls |
| `response_format` | Response format control, including JSON/schema-style outputs on supporting models |
| `modalities` / `audio` | Multimodal output controls on supporting models |
| `reasoning_effort` | Reasoning effort on supporting models |
| `web_search_options` | Web search options on supporting models |
| `metadata` | Caller-provided metadata |
| `service_tier` | Provider-specific service tier |
| `store` | Provider-side storage preference where supported |
| `verbosity` | Verbosity control where supported |

Provider-specific extra fields may be accepted by some channels, but portable behavior should be based on the parameters above and the target model's capabilities.

***

## Data Model

x6.ai maintains a unified MySQL registry across three core tables:

| Table | Purpose |
| - | - |
| `model` | Provider-channel implementation rows: model identifiers, provider channel, format standard, endpoint, context window, output limit, and active state |
| `model_pricing` | Per-provider-channel, per-token-type pricing tiers |
| `model_metadata` | Logical model metadata: vendor, provider list, tags, labels, descriptions, and display names |

A fourth table, **`model_fallback_chains`**, defines provider failover behavior. When a primary provider is exhausted, the gateway can try the next enabled fallback entry ordered by `priority`.

***

## Providers and Vendors

x6.ai separates provider channels from vendors:

| Concept | Meaning | Example |
| - | - | - |
| Provider channel | The routing channel that serves a request | `Default`, `GCP Vertex`, `OpenAI Channel` |
| Vendor | The model owner or model family | `OpenAI`, `Anthropic`, `Google`, `DeepSeek`, `Qwen` |
| Format standard | The API compatibility shape used by a model implementation | `OpenAI`, `Anthropic` |

Use `GET /api/v1/models/providers` and `GET /api/v1/models/vendors` to retrieve the current live lists.


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