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

# Chat · overview

> Endpoint principal — 100% compatible con OpenAI

El endpoint `POST /v1/chat/completions` es **100% compatible con el SDK oficial de OpenAI** para Python y Node.js. Solo cambias `base_url` y `api_key`.

## ¿Qué modelos puedo usar?

28 modelos de chat de 6 proveedores (julio 2026). Todos namespaced como `<provider>/<model>`:

```
anthropic/claude-fable-5
anthropic/claude-opus-5
anthropic/claude-sonnet-5
anthropic/claude-haiku-4-5
anthropic/claude-opus-4-8            # legacy
anthropic/claude-sonnet-4-6          # legacy
google/gemini-3.6-flash
google/gemini-3.5-flash-lite
google/gemini-3.1-pro-preview
google/gemini-2.5-pro
google/gemini-2.5-flash              # +2-4x precio desde julio 2026
google/gemini-2.5-flash-lite
openai/gpt-5.6-sol
openai/gpt-5.6-terra
openai/gpt-5.6-luna
openai/gpt-5.5
openai/gpt-5.4-mini
openai/gpt-5.1
openai/gpt-5                          # legacy
openai/gpt-4.1-mini                   # legacy
openai/o3-mini
deepseek/deepseek-v4-flash
deepseek/deepseek-v4-pro
moonshot/kimi-k3
moonshot/kimi-k2.7-code
moonshot/kimi-k2.7-code-highspeed
xai/grok-4.5
xai/grok-4.3
xai/grok-4.20-reasoning
xai/grok-build
```

Ver [Modelos chat](/models/chat) para context length, precios y capacidades de cada uno.

## Funcionalidades

| Feature                                      | Soportado                                 |
| -------------------------------------------- | ----------------------------------------- |
| Mensajes `system`, `user`, `assistant`       | ✅                                         |
| Streaming SSE (`stream: true`)               | ✅                                         |
| `temperature`, `top_p`, `max_tokens`, `stop` | ✅                                         |
| Multi-turn (conversación)                    | ✅                                         |
| Function calling / tool use                  | ✅ (Anthropic, OpenAI, Gemini)             |
| Vision (image input)                         | ✅ (content array con `image_url`)         |
| Structured outputs (`response_format`)       | ✅ ([docs](/features/structured-outputs))  |
| Prompt caching automático                    | ✅ (Anthropic native + OpenAI passthrough) |
| Fallback / auto routing                      | ✅ ([docs](/features/fallbacks))           |
| Cost inline (`usage.cost_usd`, `cost_mxn`)   | ✅                                         |

## Routing

Detrás de cada model id, llamamos directo al proveedor con su SDK oficial:

| Provider  | SDK que usamos               |
| --------- | ---------------------------- |
| Anthropic | `@anthropic-ai/sdk`          |
| Google    | `@google/genai`              |
| OpenAI    | `openai`                     |
| DeepSeek  | `openai` (OpenAI-compatible) |
| Moonshot  | `openai` (OpenAI-compatible) |
| xAI       | `openai` (OpenAI-compatible) |

Esto significa que los **mismos errores y comportamientos del proveedor original** llegan tal cual a ti. Si OpenAI tiene rate limit, lo verás como `provider_unavailable` con el mensaje original.

## Próximos pasos

<Card title="POST /v1/chat/completions" icon="code" href="/api-reference/chat/completions">
  Referencia completa del endpoint con todos los parámetros.
</Card>
