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

# Modellix LLM Overview

> Get started with the Modellix LLM gateway—OpenAI-compatible Chat Completions and Responses, Anthropic-compatible Messages, and guides for SDKs and coding tools.

Modellix LLM is a model gateway at `https://llm.modellix.ai`. Use one Modellix API key to call OpenAI-compatible **Chat Completions** and **Responses**, or Anthropic-compatible **Messages**, with the same synchronous request model and optional streaming SSE. Some models accept image, audio, or video as **input**—see [Multimodal Inputs](/llm/api/api#multimodal-inputs).

<Note>
  This gateway returns text. Image, video, and speech generation use
  `https://api.modellix.ai` with async tasks—see [REST API](/ways-to-use/api).
</Note>

## What You Get

<Columns cols={2}>
  <Card title="Three protocols" icon="layers">
    Chat Completions, Responses, and Messages—each with its own URL and request
    body. Do not mix fields across protocols.
  </Card>

  <Card title="Drop-in clients" icon="plug">
    Point OpenAI or Anthropic SDKs, Codex, Claude Code, Cursor, and OpenCode at
    Modellix with a base URL override.
  </Card>

  <Card title="One API key" icon="key">
    Authenticate with Bearer or `x-api-key` using a Modellix key from the
    [console](https://modellix.ai/console/api-key)—not a vendor platform key.
  </Card>

  <Card title="provider/name models" icon="boxes">
    Pass model IDs like `openai/gpt-5.5`, `anthropic/claude-sonnet-5`, or
    `google/gemini-3.6-flash`. See [Modellix LLM](https://www.modellix.ai/llm)
    for current IDs and prices.
  </Card>
</Columns>

<h2 id="models-and-pricing">
  Models & Pricing
</h2>

Pass `model` as a `provider/name` ID (for example `openai/gpt-5.6-sol`). You can also use a Latest Model ID such as `~openai/gpt-latest` to always call the current flagship in that series—Modellix updates the routing when newer versions ship.

For the current Model ID list (including Latest Model IDs), Input Context tiers, discounts, and USD-per-1M-token rates, use the [Modellix LLM](https://www.modellix.ai/llm) page.

<Card title="LLM Models and Pricing" icon="tag" href="https://www.modellix.ai/llm">
  Filter by provider and input modality, compare official list prices with Modellix rates, and estimate a call with the cost calculator. Billing uses token `usage` on successful responses.
</Card>

## Quick Start

<Steps>
  <Step title="Get an API Key">
    Create a key in the [Modellix console](https://modellix.ai/console/api-key)
    and store it securely.
  </Step>

  <Step title="Pick a Protocol and Base URL">
    | Client type | Base URL | Protocol |
    | - | - | - |
    | OpenAI SDK, OpenAI Agents SDK, Microsoft Agent Framework, LangChain, Vercel AI SDK, Mastra, CrewAI, Agno, Codex, Cursor, OpenCode, OpenClaw, Hermes, Junie, Pi, CodeBuddy, WorkBuddy, Qwen Code, Kilo Code, DeepSeek Harness, Cline, CC Switch (Codex / OpenAI apps) | `https://llm.modellix.ai/v1` | Chat Completions (or Responses) |
    | Anthropic SDK, Claude Code, Claude Agent SDK, CC Switch (Claude) | `https://llm.modellix.ai` (no `/v1`) | Messages |
  </Step>

  <Step title="Send a Request">
    Use your SDK or a curl example from the [API guide](/llm/api/api). Always set
    `model` to a `provider/name` ID.
  </Step>
</Steps>

## Guides in This Section

Start with the API guide for protocols, auth, errors, and billing. Then open the client page that matches your stack.

<Columns cols={2}>
  <Card title="API guide" icon="book-open" href="/llm/api/api">
    Protocols, curl examples, session header, errors, rate limits, and billing.
  </Card>

  <Card title="OpenAI SDK" icon="code" href="/llm/sdk/openai-sdk">
    `OPENAI_BASE_URL` + Modellix key for Chat Completions and Responses.
  </Card>

  <Card title="Anthropic SDK" icon="code" href="/llm/sdk/anthropic-sdk">
    `ANTHROPIC_BASE_URL` without `/v1` for Messages.
  </Card>

  <Card title="LangChain" icon="code" href="/llm/framework/langchain">
    `ChatOpenAI` with `base_url` pointed at the LLM gateway.
  </Card>

  <Card title="Vercel AI SDK" icon="code" href="/llm/sdk/vercel-ai-sdk">
    `createOpenAICompatible` with `baseURL` pointed at the LLM gateway.
  </Card>

  <Card title="Mastra" icon="code" href="/llm/framework/mastra">
    Custom OpenAI-compatible `model.url` pointed at the LLM gateway.
  </Card>

  <Card title="CrewAI" icon="code" href="/llm/framework/crewai">
    `LLM` with `base_url` and `custom_openai` pointed at the LLM gateway.
  </Card>

  <Card title="Agno" icon="code" href="/llm/framework/agno">
    `OpenAILike` with `base_url` pointed at the LLM gateway.
  </Card>

  <Card title="OpenAI Agents SDK" icon="code" href="/llm/sdk/openai-agents">
    Custom `AsyncOpenAI` client + Chat Completions for agents.
  </Card>

  <Card title="Microsoft Agent Framework" icon="code" href="/llm/framework/microsoft-agent-framework">
    `OpenAIChatCompletionClient` with `base_url` pointed at the LLM gateway.
  </Card>

  <Card title="Claude Code" icon="terminal" href="/llm/agent/claude-code">
    Environment variables or `~/.claude/settings.json`.
  </Card>

  <Card title="CodeBuddy" icon="terminal" href="/llm/agent/codebuddy">
    Custom model Endpoint or `models.json` pointed at Chat Completions.
  </Card>

  <Card title="Codex" icon="terminal" href="/llm/agent/codex">
    `openai_base_url` in `~/.codex/config.toml`.
  </Card>

  <Card title="Claude Agent SDK" icon="code" href="/llm/sdk/claude-agent-sdk">
    `ANTHROPIC_BASE_URL` without `/v1` for the Agent SDK harness.
  </Card>

  <Card title="Cursor" icon="sparkles" href="/llm/ide/cursor">
    OpenAI-compatible provider pointed at the LLM gateway.
  </Card>

  <Card title="DeepSeek Harness" icon="terminal" href="/llm/agent/deepseek-harness">
    Custom provider in the Web UI or `settings.yaml` pointed at the LLM gateway.
  </Card>

  <Card title="Hermes" icon="terminal" href="/llm/agent/hermes">
    Custom Endpoint in `config.yaml` pointed at the LLM gateway.
  </Card>

  <Card title="Junie" icon="terminal" href="/llm/agent/junie">
    Custom LLM JSON profile pointed at Chat Completions.
  </Card>

  <Card title="Kilo Code" icon="terminal" href="/llm/agent/kilo-code">
    Custom OpenAI Compatible provider in `kilo.jsonc` pointed at the LLM gateway.
  </Card>

  <Card title="OpenClaw" icon="terminal" href="/llm/agent/openclaw">
    Custom `models.providers` entry pointed at the LLM gateway.
  </Card>

  <Card title="OpenCode" icon="terminal" href="/llm/agent/opencode">
    Provider `baseURL` for OpenAI- or Anthropic-compatible mode.
  </Card>

  <Card title="Pi" icon="terminal" href="/llm/agent/pi">
    Custom provider in `models.json` pointed at the LLM gateway.
  </Card>

  <Card title="Qwen Code" icon="terminal" href="/llm/agent/qwen-code">
    `OPENAI_BASE_URL` or `modelProviders` pointed at the LLM gateway.
  </Card>

  <Card title="WorkBuddy" icon="terminal" href="/llm/agent/workbuddy">
    Custom OpenAI-compatible model pointed at the LLM gateway.
  </Card>

  <Card title="Cline" icon="terminal" href="/llm/ide/cline">
    OpenAI Compatible provider pointed at the LLM gateway.
  </Card>

  <Card title="CC Switch" icon="terminal" href="/llm/tool/cc-switch">
    Custom provider for Claude Code, Codex, and OpenAI Compatible apps.
  </Card>
</Columns>

## API Reference

OpenAPI pages for the three endpoints live under **API Reference → LLM**:

| Endpoint | Docs |
| - | - |
| `POST /v1/chat/completions` | [Chat Completions](/llm/chat-completions) |
| `POST /v1/responses` | [Responses](/llm/responses) |
| `POST /v1/messages` | [Messages](/llm/messages) |

## Protocol Cheat Sheet

| | Chat Completions | Responses | Messages |
| - | - | - | - |
| Path | `/v1/chat/completions` | `/v1/responses` | `/v1/messages` |
| Main input | `messages` | `input` | `messages` + optional `system` |
| Length field | `max_tokens` / `max_completion_tokens` | `max_output_tokens` | `max_tokens` (required) |
| Best for | Most OpenAI-compatible tools | OpenAI Responses clients | Anthropic-native tools (`anthropic/...`) |

`google/...` (Gemini) models use Chat Completions or Responses, not Messages.

For full field tables and error codes, see the [LLM API guide](/llm/api/api).
