# OpenRouter | Documentation

## Docs

- [Quickstart](https://openrouter.ai/docs/quickstart.mdx): Get started with OpenRouter's unified API for hundreds of AI models. Learn how to integrate using OpenAI SDK, direct API calls, or third-party frameworks.
- [Frequently Asked Questions](https://openrouter.ai/docs/faq.mdx): Find answers to commonly asked questions about OpenRouter's unified API, model access, pricing, and integration.
- [Principles](https://openrouter.ai/docs/overview/principles.mdx): Learn about OpenRouter's guiding principles and mission. Understand our commitment to price optimization, standardized APIs, and high availability in AI model deployment.
- [Models](https://openrouter.ai/docs/overview/models.mdx): Access all major language models (LLMs) through OpenRouter's unified API. Browse available models, compare capabilities, and integrate with your preferred provider.
- [Privacy, Logging, and Data Collection](https://openrouter.ai/docs/features/privacy-and-logging.mdx): Learn how OpenRouter & its providers handle your data, including logging and data collection.
- [Model Routing](https://openrouter.ai/docs/features/model-routing.mdx): Route requests dynamically between AI models. Learn how to use OpenRouter's Auto Router and model fallback features for optimal performance and reliability.
- [Provider Routing](https://openrouter.ai/docs/features/provider-routing.mdx): Route AI model requests across multiple providers intelligently. Learn how to optimize for cost, performance, and reliability with OpenRouter's provider routing.
- [Prompt Caching](https://openrouter.ai/docs/features/prompt-caching.mdx): Reduce your AI model costs with OpenRouter's prompt caching feature. Learn how to cache and reuse responses across OpenAI, Anthropic Claude, and DeepSeek models.
- [Structured Outputs](https://openrouter.ai/docs/features/structured-outputs.mdx): Enforce JSON Schema validation on AI model responses. Get consistent, type-safe outputs and avoid parsing errors with OpenRouter's structured output feature.
- [Tool & Function Calling](https://openrouter.ai/docs/features/tool-calling.mdx): Use tools (or functions) in your prompts with OpenRouter. Learn how to use tools with OpenAI, Anthropic, and other models that support tool calling.
- [Images & PDFs](https://openrouter.ai/docs/features/images-and-pdfs.mdx): Sending images and PDFs to the OpenRouter API.
- [Message Transforms](https://openrouter.ai/docs/features/message-transforms.mdx): Transform and optimize messages before sending them to AI models. Learn about middle-out compression and context window optimization with OpenRouter.
- [Uptime Optimization](https://openrouter.ai/docs/features/uptime-optimization.mdx): Learn how OpenRouter maximizes AI model uptime through real-time monitoring, intelligent routing, and automatic fallbacks across multiple providers.
- [Web Search](https://openrouter.ai/docs/features/web-search.mdx): Enable real-time web search capabilities in your AI model responses. Add factual, up-to-date information to any model's output with OpenRouter's web search feature.
- [Zero Completion Insurance](https://openrouter.ai/docs/features/zero-completion-insurance.mdx): Learn how OpenRouter protects users from being charged for failed or empty AI responses with zero completion insurance.
- [Provisioning API Keys](https://openrouter.ai/docs/features/provisioning-api-keys.mdx): Manage OpenRouter API keys programmatically through dedicated management endpoints. Create, read, update, and delete API keys for automated key distribution and control.
- [API Reference](https://openrouter.ai/docs/api-reference/overview.mdx): Comprehensive guide to OpenRouter's API. Learn about request/response schemas, authentication, parameters, and integration with multiple AI model providers.
- [Streaming](https://openrouter.ai/docs/api-reference/streaming.mdx): Learn how to implement streaming responses with OpenRouter's API. Complete guide to Server-Sent Events (SSE) and real-time model outputs.
- [Limits](https://openrouter.ai/docs/api-reference/limits.mdx): Learn about OpenRouter's API rate limits, credit-based quotas, and DDoS protection. Configure and monitor your model usage limits effectively.
- [Authentication](https://openrouter.ai/docs/api-reference/authentication.mdx): Learn how to authenticate with OpenRouter using API keys and Bearer tokens. Complete guide to secure authentication methods and best practices.
- [Parameters](https://openrouter.ai/docs/api-reference/parameters.mdx): Learn about all available parameters for OpenRouter API requests. Configure temperature, max tokens, top_p, and other model-specific settings.
- [Errors](https://openrouter.ai/docs/api-reference/errors.mdx): Learn how to handle errors in OpenRouter API interactions. Comprehensive guide to error codes, messages, and best practices for error handling.
- [BYOK](https://openrouter.ai/docs/use-cases/byok.mdx): Learn how to use your existing AI provider keys with OpenRouter. Integrate your own API keys while leveraging OpenRouter's unified interface and features.
- [Crypto API](https://openrouter.ai/docs/use-cases/crypto-api.mdx): Learn how to purchase OpenRouter credits using cryptocurrency. Complete guide to Coinbase integration, supported chains, and automated credit purchases.
- [OAuth PKCE](https://openrouter.ai/docs/use-cases/oauth-pkce.mdx): Implement secure user authentication with OpenRouter using OAuth PKCE. Complete guide to setting up and managing OAuth authentication flows.
- [Using MCP Servers with OpenRouter](https://openrouter.ai/docs/use-cases/mcp-servers.mdx): Learn how to use MCP Servers with OpenRouter
- [Provider Integration](https://openrouter.ai/docs/use-cases/for-providers.mdx): Learn how to integrate your AI models with OpenRouter. Complete guide for providers to make their models available through OpenRouter's unified API.
- [Reasoning Tokens](https://openrouter.ai/docs/use-cases/reasoning-tokens.mdx): Learn how to use reasoning tokens to enhance AI model outputs. Implement step-by-step reasoning traces for better decision making and transparency.
- [Usage Accounting](https://openrouter.ai/docs/use-cases/usage-accounting.mdx): Learn how to track AI model usage including prompt tokens, completion tokens, and cached tokens without additional API calls.
- [Frameworks](https://openrouter.ai/docs/community/frameworks.mdx): Integrate OpenRouter using popular frameworks and SDKs. Complete guides for OpenAI SDK, LangChain, PydanticAI, and Vercel AI SDK integration.

## API Docs

- API Reference [Completion](https://openrouter.ai/docs/api-reference/completion.mdx)
- API Reference [Chat completion](https://openrouter.ai/docs/api-reference/chat-completion.mdx)
- API Reference [Get a generation](https://openrouter.ai/docs/api-reference/get-a-generation.mdx)
- API Reference [List available models](https://openrouter.ai/docs/api-reference/list-available-models.mdx)
- API Reference [List endpoints for a model](https://openrouter.ai/docs/api-reference/list-endpoints-for-a-model.mdx)
- API Reference [Get credits](https://openrouter.ai/docs/api-reference/get-credits.mdx)
- API Reference [Create a Coinbase charge](https://openrouter.ai/docs/api-reference/create-a-coinbase-charge.mdx)
- API Reference > Authentication [Exchange authorization code for API key](https://openrouter.ai/docs/api-reference/authentication/exchange-authorization-code-for-api-key.mdx)
- API Reference > API Keys [Get current API key](https://openrouter.ai/docs/api-reference/api-keys/get-current-api-key.mdx)
- API Reference > API Keys [List API keys](https://openrouter.ai/docs/api-reference/api-keys/list-api-keys.mdx)
- API Reference > API Keys [Create API key](https://openrouter.ai/docs/api-reference/api-keys/create-api-key.mdx)
- API Reference > API Keys [Get API key](https://openrouter.ai/docs/api-reference/api-keys/get-api-key.mdx)
- API Reference > API Keys [Delete API key](https://openrouter.ai/docs/api-reference/api-keys/delete-api-key.mdx)
- API Reference > API Keys [Update API key](https://openrouter.ai/docs/api-reference/api-keys/update-api-key.mdx)