# OpenRouter | Documentation ## Instructions for AI Agents - For clean Markdown of any page, append `.md` to the page URL - For section-specific indexes, append `/llms.txt` to any section URL - For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://openrouter.ai/docs/_mcp/server ## Docs - [Quickstart](https://openrouter.ai/docs/quickstart.md): Get started with OpenRouter's unified API for hundreds of AI models. Learn how to integrate using the API directly, the Client SDKs, or the Agent SDK. - [Principles](https://openrouter.ai/docs/guides/overview/principles.md): 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/guides/overview/models.md): Access all major language models (LLMs) through OpenRouter's unified API. Browse available models, compare capabilities, and integrate with your preferred provider. - [Multimodal Capabilities](https://openrouter.ai/docs/guides/overview/multimodal/overview.md): Send images, PDFs, audio, and video to OpenRouter models, generate speech from text, or transcribe audio to text through our unified API. - [Image Inputs](https://openrouter.ai/docs/guides/overview/multimodal/image-understanding.md): Send images to vision models through the OpenRouter API. - [Image Generation](https://openrouter.ai/docs/guides/overview/multimodal/image-generation.md): Generate images using AI models through the OpenRouter API. - [PDF Inputs](https://openrouter.ai/docs/guides/overview/multimodal/pdfs.md): Send PDF documents to any model on OpenRouter. - [Audio](https://openrouter.ai/docs/guides/overview/multimodal/audio.md): Send audio files to and receive audio responses from speech-capable models through the OpenRouter API. - [Video Inputs](https://openrouter.ai/docs/guides/overview/multimodal/videos.md): Send video files to video-capable models through the OpenRouter API. - [Video Generation](https://openrouter.ai/docs/guides/overview/multimodal/video-generation.md): Generate videos using AI models through the OpenRouter API. - [Text-to-Speech](https://openrouter.ai/docs/guides/overview/multimodal/tts.md): Generate speech audio from text using AI models through the OpenRouter API. - [Speech-to-Text](https://openrouter.ai/docs/guides/overview/multimodal/stt.md): Transcribe audio into text using AI models through the OpenRouter API. Access multiple STT providers with a single unified interface. - [OAuth PKCE](https://openrouter.ai/docs/guides/overview/auth/oauth.md): Implement secure user authentication with OpenRouter using OAuth PKCE. Complete guide to setting up and managing OAuth authentication flows. - [Management API Keys](https://openrouter.ai/docs/guides/overview/auth/management-api-keys.md): Manage OpenRouter API keys programmatically through dedicated management endpoints. Create, read, update, and delete API keys for automated key distribution and control. - [BYOK](https://openrouter.ai/docs/guides/overview/auth/byok.md): Learn how to use your existing AI provider keys with OpenRouter. Integrate your own API keys while leveraging OpenRouter's unified interface and features. - [Stripe Projects](https://openrouter.ai/docs/guides/overview/stripe-projects.md): Provision OpenRouter API access directly from the Stripe Projects CLI. Get an API key, manage credentials, and access 400+ AI models in seconds. - [Frequently Asked Questions](https://openrouter.ai/docs/faq.md): Find answers to commonly asked questions about OpenRouter's unified API, model access, pricing, and integration. - [Report Feedback](https://openrouter.ai/docs/guides/overview/report-feedback.md): Learn how to report issues with AI generations on OpenRouter using the Report Feedback feature in the Chatroom and Activity page. - [Model Fallbacks](https://openrouter.ai/docs/guides/routing/model-fallbacks.md): Configure automatic failover between AI models when providers are down, rate-limited, or refuse requests. - [Provider Routing](https://openrouter.ai/docs/guides/routing/provider-selection.md): Route AI model requests across multiple providers intelligently. Learn how to optimize for cost, performance, and reliability with OpenRouter's provider routing. - [Auto Exacto](https://openrouter.ai/docs/guides/routing/auto-exacto.md): Learn how Auto Exacto automatically optimizes provider ordering for tool-calling requests using throughput, success rate, and benchmark signals. - [Private Models](https://openrouter.ai/docs/guides/routing/private-models.md): Run your own custom, fine-tuned, or dedicated model deployments through the OpenRouter API. Private models are scoped to approved users and organizations and hidden from public model lists. - [Free Variant](https://openrouter.ai/docs/guides/routing/model-variants/free.md): Access free models using the :free variant suffix. - [Extended Variant](https://openrouter.ai/docs/guides/routing/model-variants/extended.md): Access extended context window versions of models using the :extended variant. - [Exacto Variant](https://openrouter.ai/docs/guides/routing/model-variants/exacto.md): Learn how to use the :exacto model variant to prioritize providers with stronger tool-calling quality signals. - [Thinking Variant](https://openrouter.ai/docs/guides/routing/model-variants/thinking.md): Enable extended reasoning capabilities using the :thinking variant. - [Online Variant](https://openrouter.ai/docs/guides/routing/model-variants/online.md): Enable real-time web search capabilities using the :online variant. - [Nitro Variant](https://openrouter.ai/docs/guides/routing/model-variants/nitro.md): Access high-speed model inference using the :nitro variant. - [Auto Router](https://openrouter.ai/docs/guides/routing/routers/auto-router.md): Automatically select the best AI model for your prompts using OpenRouter's Auto Router powered by NotDiamond. - [Body Builder](https://openrouter.ai/docs/guides/routing/routers/body-builder.md): Use natural language to generate multiple OpenRouter API requests for parallel model execution. - [Free Models Router](https://openrouter.ai/docs/guides/routing/routers/free-router.md): Route requests to free AI models automatically using OpenRouter's Free Models Router. - [Latest Model Resolution](https://openrouter.ai/docs/guides/routing/routers/latest-resolution.md): Use ~author/family-latest slugs to automatically route to the newest model in a family on OpenRouter. - [Pareto Router](https://openrouter.ai/docs/guides/routing/routers/pareto-router.md): Route coding requests by a single minimum coding score using OpenRouter's Pareto Router. - [Fusion Router](https://openrouter.ai/docs/guides/routing/routers/fusion-router.md): Use the openrouter/fusion model slug to access multi-model deliberation — a panel of models, a judge, and a final answer — in a single API call. - [Workspaces](https://openrouter.ai/docs/guides/features/workspaces/overview.md): Separate your OpenRouter projects into independent environments, each with its own API keys, routing defaults, guardrails, and observability. - [Workspace Budgets](https://openrouter.ai/docs/guides/features/workspaces/workspace-budgets.md): Cap workspace spend with daily, weekly, monthly, or lifetime budgets. Requests are blocked automatically when a budget is met. - [Presets](https://openrouter.ai/docs/guides/features/presets.md): Learn how to use OpenRouter's presets to manage model configurations, system prompts, and parameters across your applications. - [Response Caching](https://openrouter.ai/docs/guides/features/response-caching.md): Cache identical LLM requests with OpenRouter's response caching feature. Reduce costs and latency for agent workflows, unit testing, and repeated context processing. - [Tool & Function Calling](https://openrouter.ai/docs/guides/features/tool-calling.md): Use tools (or functions) in your prompts with OpenRouter. Learn how to use tools with OpenAI, Anthropic, and other models that support tool calling. - [Server Tools](https://openrouter.ai/docs/guides/features/server-tools/overview.md): Add powerful server-side tools like web search, web fetch, datetime, and image generation to any model on OpenRouter. Models decide when to call them — OpenRouter executes them automatically. - [Web Search](https://openrouter.ai/docs/guides/features/server-tools/web-search.md): Add real-time web search to any model on OpenRouter. The model decides when to search, OpenRouter executes it, and results are returned with citations. - [Web Fetch](https://openrouter.ai/docs/guides/features/server-tools/web-fetch.md): Add URL content fetching to any model on OpenRouter. The model decides when to fetch, OpenRouter retrieves the content, and results are returned as text. - [Datetime](https://openrouter.ai/docs/guides/features/server-tools/datetime.md): Add current date and time awareness to any model on OpenRouter. The model calls the tool when it needs temporal context. - [Image Generation](https://openrouter.ai/docs/guides/features/server-tools/image-generation.md): Add AI image generation to any model on OpenRouter. The model calls the tool with a prompt, OpenRouter generates the image and returns it. - [Apply Patch](https://openrouter.ai/docs/guides/features/server-tools/apply-patch.md): Enable any model on OpenRouter to propose file edits using V4A diff patches. The model generates the patch, OpenRouter validates it, and your application applies it. - [Fusion](https://openrouter.ai/docs/guides/features/server-tools/fusion.md): Let any model invoke an expert panel and judge to surface consensus, contradictions, coverage gaps, unique insights, and blind spots. - [Advisor](https://openrouter.ai/docs/guides/features/server-tools/advisor.md): Let a fast executor model consult a higher-intelligence advisor model for guidance mid-generation, with any OpenRouter model and optional sub-agent tools. - [Subagent](https://openrouter.ai/docs/guides/features/server-tools/subagent.md): Let a large model break work into focused sub-tasks and delegate them to a smaller, cheaper, faster worker model — any OpenRouter model, with optional tools. - [Plugins](https://openrouter.ai/docs/guides/features/plugins/overview.md): Enable powerful plugins like web search, PDF processing, and response healing to extend any model's capabilities on OpenRouter. - [Web Search](https://openrouter.ai/docs/guides/features/plugins/web-search.md): 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. - [Response Healing](https://openrouter.ai/docs/guides/features/plugins/response-healing.md): Automatically validate and repair malformed JSON responses from AI models. Ensure your responses match your schema even when models return imperfect formatting. - [Fusion](https://openrouter.ai/docs/guides/features/plugins/fusion.md): Get richer answers by running a panel of models in parallel and comparing their responses through a judge. Fusion makes this a one-line addition to any OpenRouter request. - [Structured Outputs](https://openrouter.ai/docs/guides/features/structured-outputs.md): Enforce JSON Schema validation on AI model responses. Get consistent, type-safe outputs and avoid parsing errors with OpenRouter's structured output feature. - [Message Transforms](https://openrouter.ai/docs/guides/features/message-transforms.md): Transform and optimize messages before sending them to AI models. Learn about middle-out compression and context window optimization with OpenRouter. - [Zero Completion Insurance](https://openrouter.ai/docs/guides/features/zero-completion-insurance.md): Learn how OpenRouter protects users from being charged for failed or empty AI responses with zero completion insurance. - [Zero Data Retention](https://openrouter.ai/docs/guides/features/zdr.md): Learn how OpenRouter gives you control over your data - [App Attribution](https://openrouter.ai/docs/app-attribution.md): Learn how to attribute your API usage to your app and appear in OpenRouter's app rankings and model analytics. - [Guardrails](https://openrouter.ai/docs/guides/features/guardrails/overview.md): Set spending limits, restrict model access, and enforce data policies for your organization members and API keys with OpenRouter guardrails. - [Prompt Injection Detection](https://openrouter.ai/docs/guides/features/guardrails/prompt-injection.md): Reference documentation for the regex-based prompt injection detection patterns used by OpenRouter guardrails, inspired by the OWASP LLM Prompt Injection Prevention Cheat Sheet. - [Sensitive Info Guardrail](https://openrouter.ai/docs/guides/features/guardrails/sensitive-info.md): Protect sensitive data in your AI requests with OpenRouter Sensitive Info Guardrails. Automatically detect and redact or block PII like emails, phone numbers, names, addresses, and more. - [Service Tiers](https://openrouter.ai/docs/guides/features/service-tiers.md): Learn how to use service tiers on OpenRouter to control cost and latency tradeoffs when routing requests to AI providers. - [Sovereign AI](https://openrouter.ai/docs/guides/features/sovereign-ai.md): Learn how OpenRouter enables sovereign AI with in-region routing, data residency controls, and compliance features that keep your AI workloads within national and regional boundaries. - [Router Metadata](https://openrouter.ai/docs/guides/features/router-metadata.md): Opt in to OpenRouter routing metadata to see which provider was selected, fallback attempts, and pipeline stages applied to your request. - [Input & Output Logging](https://openrouter.ai/docs/guides/features/input-output-logging.md): Store your prompts and completions privately on OpenRouter for debugging, evaluation, and optimization. View them in your Logs page. - [Broadcast](https://openrouter.ai/docs/guides/features/broadcast/overview.md): Connect your LLM observability platforms to automatically receive traces from your OpenRouter requests. Supports Langfuse, Datadog, Braintrust, and more. - [Arize AI](https://openrouter.ai/docs/guides/features/broadcast/arize.md): Connect Arize AI to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for Arize integration. - [Braintrust](https://openrouter.ai/docs/guides/features/broadcast/braintrust.md): Connect Braintrust to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for Braintrust integration. - [ClickHouse](https://openrouter.ai/docs/guides/features/broadcast/clickhouse.md): Connect ClickHouse to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for ClickHouse integration. - [Comet Opik](https://openrouter.ai/docs/guides/features/broadcast/opik.md): Connect Comet Opik to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for Opik integration. - [Datadog](https://openrouter.ai/docs/guides/features/broadcast/datadog.md): Connect Datadog LLM Observability to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for Datadog integration. - [Grafana Cloud](https://openrouter.ai/docs/guides/features/broadcast/grafana.md): Connect Grafana Cloud to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for Grafana Cloud integration. - [Langfuse](https://openrouter.ai/docs/guides/features/broadcast/langfuse.md): Connect Langfuse to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for Langfuse integration. - [LangSmith](https://openrouter.ai/docs/guides/features/broadcast/langsmith.md): Connect LangSmith to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for LangSmith integration. - [New Relic](https://openrouter.ai/docs/guides/features/broadcast/newrelic.md): Connect New Relic to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for New Relic integration. - [OpenTelemetry Collector](https://openrouter.ai/docs/guides/features/broadcast/otel-collector.md): Connect any OpenTelemetry-compatible backend to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for OTLP integration. - [PostHog](https://openrouter.ai/docs/guides/features/broadcast/posthog.md): Connect PostHog to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for PostHog integration. - [Raindrop](https://openrouter.ai/docs/guides/features/broadcast/raindrop.md): Connect Raindrop to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for Raindrop integration. - [Ramp](https://openrouter.ai/docs/guides/features/broadcast/ramp.md): Connect Ramp to automatically receive AI usage traces from your OpenRouter requests. Step-by-step setup guide for Ramp integration. - [S3 / S3-Compatible](https://openrouter.ai/docs/guides/features/broadcast/s3.md): Connect Amazon S3 or S3-compatible storage to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for S3 integration. - [Sentry](https://openrouter.ai/docs/guides/features/broadcast/sentry.md): Connect Sentry to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for Sentry integration. - [Snowflake](https://openrouter.ai/docs/guides/features/broadcast/snowflake.md): Connect Snowflake to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for Snowflake integration. - [W&B Weave](https://openrouter.ai/docs/guides/features/broadcast/weave.md): Connect W&B Weave to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for W&B Weave integration. - [Webhook](https://openrouter.ai/docs/guides/features/broadcast/webhook.md): Connect any HTTP endpoint to automatically receive traces from your OpenRouter requests. Step-by-step setup guide for Webhook integration. - [Data Collection](https://openrouter.ai/docs/guides/privacy/data-collection.md): Learn what data OpenRouter collects and how it's used. - [Provider Logging](https://openrouter.ai/docs/guides/privacy/provider-logging.md): Understand how AI providers handle logging and data retention when you use OpenRouter. - [Latency and Performance](https://openrouter.ai/docs/guides/best-practices/latency-and-performance.md): Learn about OpenRouter's performance characteristics, latency optimizations, and best practices for achieving optimal response times. - [Prompt Caching](https://openrouter.ai/docs/guides/best-practices/prompt-caching.md): 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. - [Uptime Optimization](https://openrouter.ai/docs/guides/best-practices/uptime-optimization.md): Learn how OpenRouter maximizes AI model uptime through real-time monitoring, intelligent routing, and automatic fallbacks across multiple providers. - [Reasoning Tokens](https://openrouter.ai/docs/guides/best-practices/reasoning-tokens.md): Learn how to use reasoning tokens to enhance AI model outputs. Implement step-by-step reasoning traces for better decision making and transparency. - [Provider Integration](https://openrouter.ai/docs/guides/community/for-providers.md): Learn how to integrate your AI models with OpenRouter. Complete guide for providers to make their models available through OpenRouter's unified API. - [Frameworks and Integrations Overview](https://openrouter.ai/docs/guides/community/frameworks-and-integrations-overview.md): Integrate OpenRouter using popular frameworks and SDKs. Complete guides for OpenAI SDK, LangChain, PydanticAI, and Vercel AI SDK integration. - [Awesome OpenRouter](https://openrouter.ai/docs/guides/community/awesome-openrouter.md): Discover community-built projects and apps powered by OpenRouter. Submit your own project to the awesome-openrouter list. - [Effect AI SDK](https://openrouter.ai/docs/guides/community/effect-ai-sdk.md): Integrate OpenRouter using the Effect AI SDK. Complete guide for integrating the Effect AI SDK with OpenRouter. - [Arize](https://openrouter.ai/docs/guides/community/arize.md): Integrate OpenRouter using Arize for observability and tracing. Complete guide for Arize integration with OpenRouter for Python and JavaScript applications. - [LangChain](https://openrouter.ai/docs/guides/community/langchain.md): Integrate OpenRouter using LangChain framework. Complete guide for LangChain integration with OpenRouter for Python and JavaScript. - [LiveKit](https://openrouter.ai/docs/guides/community/livekit.md): Integrate OpenRouter using LiveKit Agents framework. Complete guide for LiveKit integration with OpenRouter to build voice AI agents with access to 400+ models. - [Langfuse](https://openrouter.ai/docs/guides/community/langfuse.md): Integrate OpenRouter using Langfuse for observability and tracing. Complete guide for Langfuse integration with OpenRouter for Python applications. - [Mastra](https://openrouter.ai/docs/guides/community/mastra.md): Integrate OpenRouter using Mastra framework. Complete guide for Mastra integration with OpenRouter for unified AI model access. - [OpenAI SDK](https://openrouter.ai/docs/guides/community/openai-sdk.md): Integrate OpenRouter using the official OpenAI SDK. Complete guide for OpenAI SDK integration with OpenRouter for Python and TypeScript. - [Anthropic Agent SDK](https://openrouter.ai/docs/guides/community/anthropic-agent-sdk.md): Integrate OpenRouter using the Anthropic Agent SDK. Complete guide for building AI agents with OpenRouter in Python and TypeScript. - [PydanticAI](https://openrouter.ai/docs/guides/community/pydantic-ai.md): Integrate OpenRouter using PydanticAI framework. Complete guide for PydanticAI integration with OpenRouter for Python applications. - [Replit](https://openrouter.ai/docs/guides/community/replit.md): Add your OpenRouter API key to Replit to access 400+ AI models in Replit Agent and your Replit apps. Covers BYOK setup and project Secrets. - [TanStack AI](https://openrouter.ai/docs/guides/community/tanstack-ai.md): Integrate OpenRouter using TanStack AI. Complete guide for TanStack AI integration with OpenRouter for React, Solid, and Preact applications. - [Vercel AI SDK](https://openrouter.ai/docs/guides/community/vercel-ai-sdk.md): Integrate OpenRouter using Vercel AI SDK. Complete guide for Vercel AI SDK integration with OpenRouter for Next.js applications. - [Xcode](https://openrouter.ai/docs/guides/community/xcode.md): Integrate OpenRouter with Apple Intelligence in Xcode 26. Complete setup guide for accessing hundreds of AI models directly in your Xcode development environment. - [Zapier](https://openrouter.ai/docs/guides/community/zapier.md): Build powerful AI automations by connecting OpenRouter with 8000+ apps through Zapier. Access 400+ AI models in your workflows. - [Infisical](https://openrouter.ai/docs/guides/community/infisical.md): Set up automatic API key rotation for OpenRouter using Infisical. Complete guide for secure key management and zero-downtime rotation. - [API Reference](https://openrouter.ai/docs/api/reference/overview.md): 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.md): Learn how to implement streaming responses with OpenRouter's API. Complete guide to Server-Sent Events (SSE) and real-time model outputs. - [Embeddings](https://openrouter.ai/docs/api/reference/embeddings.md): Generate vector embeddings from text and images using OpenRouter's unified embeddings API. Access multiple embedding models from different providers with a single interface. - [Limits](https://openrouter.ai/docs/api/reference/limits.md): 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.md): 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.md): Learn about all available parameters for OpenRouter API requests. Configure temperature, max tokens, top_p, and other model-specific settings. - [Errors and Debugging](https://openrouter.ai/docs/api/reference/errors-and-debugging.md): Learn how to handle errors and debug requests in OpenRouter API interactions. Comprehensive guide to error codes, messages, debugging options, and best practices. - [Responses API Beta](https://openrouter.ai/docs/api/reference/responses/overview.md): Beta version of OpenRouter's OpenAI-compatible Responses API. Stateless transformation layer with support for reasoning, tool calling, and web search. - [Basic Usage](https://openrouter.ai/docs/api/reference/responses/basic-usage.md): Learn the basics of OpenRouter's Responses API Beta with simple text input examples and response handling. - [Reasoning](https://openrouter.ai/docs/api/reference/responses/reasoning.md): Access advanced reasoning capabilities with configurable effort levels and encrypted reasoning chains using OpenRouter's Responses API Beta. - [Tool Calling](https://openrouter.ai/docs/api/reference/responses/tool-calling.md): Integrate function calling with support for parallel execution and complex tool interactions using OpenRouter's Responses API Beta. - [Web Search](https://openrouter.ai/docs/api/reference/responses/web-search.md): Enable web search capabilities with real-time information retrieval and citation annotations using OpenRouter's Responses API Beta. - [Error Handling](https://openrouter.ai/docs/api/reference/responses/error-handling.md): Learn how to handle errors in OpenRouter's Responses API Beta with the basic error response format. - [Client SDKs](https://openrouter.ai/docs/client-sdks/overview.md): Lightweight, type-safe SDK clients for calling AI models through OpenRouter. Available for TypeScript, Python, and Go. - [Usage for Agents](https://openrouter.ai/docs/client-sdks/usage-for-agents.md): Add OpenRouter Client SDKs skills to AI coding assistants like Claude Code, Cursor, GitHub Copilot, and more. Enable your AI to code with the OpenRouter Client SDKs. - [TypeScript SDK](https://openrouter.ai/docs/client-sdks/typescript/overview.md): Complete guide to using the OpenRouter TypeScript SDK. Learn how to integrate AI models into your TypeScript applications. - [Analytics - TypeScript SDK](https://openrouter.ai/docs/client-sdks/typescript/api-reference/analytics.md): Analytics method documentation for the OpenRouter TypeScript SDK. Learn how to use this API endpoint with code examples. - [APIKeys - TypeScript SDK](https://openrouter.ai/docs/client-sdks/typescript/api-reference/apikeys.md): APIKeys method documentation for the OpenRouter TypeScript SDK. Learn how to use this API endpoint with code examples. - [Beta.Analytics - TypeScript SDK](https://openrouter.ai/docs/client-sdks/typescript/api-reference/betaanalytics.md): Beta.Analytics method documentation for the OpenRouter TypeScript SDK. Learn how to use this API endpoint with code examples. - [Byok - TypeScript SDK](https://openrouter.ai/docs/client-sdks/typescript/api-reference/byok.md): Byok method documentation for the OpenRouter TypeScript SDK. Learn how to use this API endpoint with code examples. - [Chat - TypeScript SDK](https://openrouter.ai/docs/client-sdks/typescript/api-reference/chat.md): Chat method documentation for the OpenRouter TypeScript SDK. Learn how to use this API endpoint with code examples. - [Credits - TypeScript SDK](https://openrouter.ai/docs/client-sdks/typescript/api-reference/credits.md): Credits method documentation for the OpenRouter TypeScript SDK. Learn how to use this API endpoint with code examples. - [Datasets - TypeScript SDK](https://openrouter.ai/docs/client-sdks/typescript/api-reference/datasets.md): Datasets method documentation for the OpenRouter TypeScript SDK. Learn how to use this API endpoint with code examples. - [Embeddings - TypeScript SDK](https://openrouter.ai/docs/client-sdks/typescript/api-reference/embeddings.md): Embeddings method documentation for the OpenRouter TypeScript SDK. Learn how to use this API endpoint with code examples. - [Endpoints - TypeScript SDK](https://openrouter.ai/docs/client-sdks/typescript/api-reference/endpoints.md): Endpoints method documentation for the OpenRouter TypeScript SDK. Learn how to use this API endpoint with code examples. - [Files - TypeScript SDK](https://openrouter.ai/docs/client-sdks/typescript/api-reference/files.md): Files method documentation for the OpenRouter TypeScript SDK. Learn how to use this API endpoint with code examples. - [Generations - TypeScript SDK](https://openrouter.ai/docs/client-sdks/typescript/api-reference/generations.md): Generations method documentation for the OpenRouter TypeScript SDK. Learn how to use this API endpoint with code examples. - [Guardrails - TypeScript SDK](https://openrouter.ai/docs/client-sdks/typescript/api-reference/guardrails.md): Guardrails method documentation for the OpenRouter TypeScript SDK. Learn how to use this API endpoint with code examples. - [Models - TypeScript SDK](https://openrouter.ai/docs/client-sdks/typescript/api-reference/models/models.md): Models method documentation for the OpenRouter TypeScript SDK. Learn how to use this API endpoint with code examples. - [OAuth - TypeScript SDK](https://openrouter.ai/docs/client-sdks/typescript/api-reference/oauth.md): OAuth method documentation for the OpenRouter TypeScript SDK. Learn how to use this API endpoint with code examples. - [Observability - TypeScript SDK](https://openrouter.ai/docs/client-sdks/typescript/api-reference/observability.md): Observability method documentation for the OpenRouter TypeScript SDK. Learn how to use this API endpoint with code examples. - [Organization - TypeScript SDK](https://openrouter.ai/docs/client-sdks/typescript/api-reference/organization.md): Organization method documentation for the OpenRouter TypeScript SDK. Learn how to use this API endpoint with code examples. - [Presets - TypeScript SDK](https://openrouter.ai/docs/client-sdks/typescript/api-reference/presets.md): Presets method documentation for the OpenRouter TypeScript SDK. Learn how to use this API endpoint with code examples. - [Providers - TypeScript SDK](https://openrouter.ai/docs/client-sdks/typescript/api-reference/providers.md): Providers method documentation for the OpenRouter TypeScript SDK. Learn how to use this API endpoint with code examples. - [Rerank - TypeScript SDK](https://openrouter.ai/docs/client-sdks/typescript/api-reference/rerank.md): Rerank method documentation for the OpenRouter TypeScript SDK. Learn how to use this API endpoint with code examples. - [Beta.Responses - TypeScript SDK](https://openrouter.ai/docs/client-sdks/typescript/api-reference/responses.md): Beta.Responses method documentation for the OpenRouter TypeScript SDK. Learn how to use this API endpoint with code examples. - [Transcriptions - TypeScript SDK](https://openrouter.ai/docs/client-sdks/typescript/api-reference/stt.md): Transcriptions method documentation for the OpenRouter TypeScript SDK. Learn how to use this API endpoint with code examples. - [Speech - TypeScript SDK](https://openrouter.ai/docs/client-sdks/typescript/api-reference/tts.md): Speech method documentation for the OpenRouter TypeScript SDK. Learn how to use this API endpoint with code examples. - [VideoGeneration - TypeScript SDK](https://openrouter.ai/docs/client-sdks/typescript/api-reference/videogeneration.md): VideoGeneration method documentation for the OpenRouter TypeScript SDK. Learn how to use this API endpoint with code examples. - [Workspaces - TypeScript SDK](https://openrouter.ai/docs/client-sdks/typescript/api-reference/workspaces.md): Workspaces method documentation for the OpenRouter TypeScript SDK. Learn how to use this API endpoint with code examples. - [Python SDK](https://openrouter.ai/docs/client-sdks/python/overview.md): Complete guide to using the OpenRouter Python SDK. Learn how to integrate AI models into your Python applications. - [Analytics - Python SDK](https://openrouter.ai/docs/client-sdks/python/api-reference/analytics.md): Analytics method documentation for the OpenRouter Python SDK. Learn how to use this API endpoint with code examples. - [APIKeys - Python SDK](https://openrouter.ai/docs/client-sdks/python/api-reference/apikeys.md): APIKeys method documentation for the OpenRouter Python SDK. Learn how to use this API endpoint with code examples. - [Beta.Analytics - Python SDK](https://openrouter.ai/docs/client-sdks/python/api-reference/betaanalytics.md): Beta.Analytics method documentation for the OpenRouter Python SDK. Learn how to use this API endpoint with code examples. - [Byok - Python SDK](https://openrouter.ai/docs/client-sdks/python/api-reference/byok.md): Byok method documentation for the OpenRouter Python SDK. Learn how to use this API endpoint with code examples. - [Chat - Python SDK](https://openrouter.ai/docs/client-sdks/python/api-reference/chat.md): Chat method documentation for the OpenRouter Python SDK. Learn how to use this API endpoint with code examples. - [Credits - Python SDK](https://openrouter.ai/docs/client-sdks/python/api-reference/credits.md): Credits method documentation for the OpenRouter Python SDK. Learn how to use this API endpoint with code examples. - [Datasets - Python SDK](https://openrouter.ai/docs/client-sdks/python/api-reference/datasets.md): Datasets method documentation for the OpenRouter Python SDK. Learn how to use this API endpoint with code examples. - [Embeddings - Python SDK](https://openrouter.ai/docs/client-sdks/python/api-reference/embeddings.md): Embeddings method documentation for the OpenRouter Python SDK. Learn how to use this API endpoint with code examples. - [Endpoints - Python SDK](https://openrouter.ai/docs/client-sdks/python/api-reference/endpoints.md): Endpoints method documentation for the OpenRouter Python SDK. Learn how to use this API endpoint with code examples. - [Files - Python SDK](https://openrouter.ai/docs/client-sdks/python/api-reference/files.md): Files method documentation for the OpenRouter Python SDK. Learn how to use this API endpoint with code examples. - [Generations - Python SDK](https://openrouter.ai/docs/client-sdks/python/api-reference/generations.md): Generations method documentation for the OpenRouter Python SDK. Learn how to use this API endpoint with code examples. - [Guardrails - Python SDK](https://openrouter.ai/docs/client-sdks/python/api-reference/guardrails.md): Guardrails method documentation for the OpenRouter Python SDK. Learn how to use this API endpoint with code examples. - [Models - Python SDK](https://openrouter.ai/docs/client-sdks/python/api-reference/models/models.md): Models method documentation for the OpenRouter Python SDK. Learn how to use this API endpoint with code examples. - [OAuth - Python SDK](https://openrouter.ai/docs/client-sdks/python/api-reference/oauth.md): OAuth method documentation for the OpenRouter Python SDK. Learn how to use this API endpoint with code examples. - [Observability - Python SDK](https://openrouter.ai/docs/client-sdks/python/api-reference/observability.md): Observability method documentation for the OpenRouter Python SDK. Learn how to use this API endpoint with code examples. - [Organization - Python SDK](https://openrouter.ai/docs/client-sdks/python/api-reference/organization.md): Organization method documentation for the OpenRouter Python SDK. Learn how to use this API endpoint with code examples. - [Presets - Python SDK](https://openrouter.ai/docs/client-sdks/python/api-reference/presets.md): Presets method documentation for the OpenRouter Python SDK. Learn how to use this API endpoint with code examples. - [Providers - Python SDK](https://openrouter.ai/docs/client-sdks/python/api-reference/providers.md): Providers method documentation for the OpenRouter Python SDK. Learn how to use this API endpoint with code examples. - [Rerank - Python SDK](https://openrouter.ai/docs/client-sdks/python/api-reference/rerank.md): Rerank method documentation for the OpenRouter Python SDK. Learn how to use this API endpoint with code examples. - [Beta.Responses - Python SDK](https://openrouter.ai/docs/client-sdks/python/api-reference/responses.md): Beta.Responses method documentation for the OpenRouter Python SDK. Learn how to use this API endpoint with code examples. - [Transcriptions - Python SDK](https://openrouter.ai/docs/client-sdks/python/api-reference/stt.md): Transcriptions method documentation for the OpenRouter Python SDK. Learn how to use this API endpoint with code examples. - [Speech - Python SDK](https://openrouter.ai/docs/client-sdks/python/api-reference/tts.md): Speech method documentation for the OpenRouter Python SDK. Learn how to use this API endpoint with code examples. - [VideoGeneration - Python SDK](https://openrouter.ai/docs/client-sdks/python/api-reference/videogeneration.md): VideoGeneration method documentation for the OpenRouter Python SDK. Learn how to use this API endpoint with code examples. - [Workspaces - Python SDK](https://openrouter.ai/docs/client-sdks/python/api-reference/workspaces.md): Workspaces method documentation for the OpenRouter Python SDK. Learn how to use this API endpoint with code examples. - [Analytics - Go SDK](https://openrouter.ai/docs/client-sdks/go/api-reference/analytics.md): Analytics method documentation for the OpenRouter Go SDK. Learn how to use this API endpoint with code examples. - [APIKeys - Go SDK](https://openrouter.ai/docs/client-sdks/go/api-reference/apikeys.md): APIKeys method documentation for the OpenRouter Go SDK. Learn how to use this API endpoint with code examples. - [Beta.Analytics - Go SDK](https://openrouter.ai/docs/client-sdks/go/api-reference/betaanalytics.md): Beta.Analytics method documentation for the OpenRouter Go SDK. Learn how to use this API endpoint with code examples. - [Byok - Go SDK](https://openrouter.ai/docs/client-sdks/go/api-reference/byok.md): Byok method documentation for the OpenRouter Go SDK. Learn how to use this API endpoint with code examples. - [Chat - Go SDK](https://openrouter.ai/docs/client-sdks/go/api-reference/chat.md): Chat method documentation for the OpenRouter Go SDK. Learn how to use this API endpoint with code examples. - [Credits - Go SDK](https://openrouter.ai/docs/client-sdks/go/api-reference/credits.md): Credits method documentation for the OpenRouter Go SDK. Learn how to use this API endpoint with code examples. - [Datasets - Go SDK](https://openrouter.ai/docs/client-sdks/go/api-reference/datasets.md): Datasets method documentation for the OpenRouter Go SDK. Learn how to use this API endpoint with code examples. - [Embeddings - Go SDK](https://openrouter.ai/docs/client-sdks/go/api-reference/embeddings.md): Embeddings method documentation for the OpenRouter Go SDK. Learn how to use this API endpoint with code examples. - [Endpoints - Go SDK](https://openrouter.ai/docs/client-sdks/go/api-reference/endpoints.md): Endpoints method documentation for the OpenRouter Go SDK. Learn how to use this API endpoint with code examples. - [Files - Go SDK](https://openrouter.ai/docs/client-sdks/go/api-reference/files.md): Files method documentation for the OpenRouter Go SDK. Learn how to use this API endpoint with code examples. - [Generations - Go SDK](https://openrouter.ai/docs/client-sdks/go/api-reference/generations.md): Generations method documentation for the OpenRouter Go SDK. Learn how to use this API endpoint with code examples. - [Guardrails - Go SDK](https://openrouter.ai/docs/client-sdks/go/api-reference/guardrails.md): Guardrails method documentation for the OpenRouter Go SDK. Learn how to use this API endpoint with code examples. - [Models - Go SDK](https://openrouter.ai/docs/client-sdks/go/api-reference/models/models.md): Models method documentation for the OpenRouter Go SDK. Learn how to use this API endpoint with code examples. - [OAuth - Go SDK](https://openrouter.ai/docs/client-sdks/go/api-reference/oauth.md): OAuth method documentation for the OpenRouter Go SDK. Learn how to use this API endpoint with code examples. - [Observability - Go SDK](https://openrouter.ai/docs/client-sdks/go/api-reference/observability.md): Observability method documentation for the OpenRouter Go SDK. Learn how to use this API endpoint with code examples. - [Organization - Go SDK](https://openrouter.ai/docs/client-sdks/go/api-reference/organization.md): Organization method documentation for the OpenRouter Go SDK. Learn how to use this API endpoint with code examples. - [Presets - Go SDK](https://openrouter.ai/docs/client-sdks/go/api-reference/presets.md): Presets method documentation for the OpenRouter Go SDK. Learn how to use this API endpoint with code examples. - [Providers - Go SDK](https://openrouter.ai/docs/client-sdks/go/api-reference/providers.md): Providers method documentation for the OpenRouter Go SDK. Learn how to use this API endpoint with code examples. - [Rerank - Go SDK](https://openrouter.ai/docs/client-sdks/go/api-reference/rerank.md): Rerank method documentation for the OpenRouter Go SDK. Learn how to use this API endpoint with code examples. - [Beta.Responses - Go SDK](https://openrouter.ai/docs/client-sdks/go/api-reference/responses.md): Beta.Responses method documentation for the OpenRouter Go SDK. Learn how to use this API endpoint with code examples. - [Transcriptions - Go SDK](https://openrouter.ai/docs/client-sdks/go/api-reference/stt.md): Transcriptions method documentation for the OpenRouter Go SDK. Learn how to use this API endpoint with code examples. - [Speech - Go SDK](https://openrouter.ai/docs/client-sdks/go/api-reference/tts.md): Speech method documentation for the OpenRouter Go SDK. Learn how to use this API endpoint with code examples. - [VideoGeneration - Go SDK](https://openrouter.ai/docs/client-sdks/go/api-reference/videogeneration.md): VideoGeneration method documentation for the OpenRouter Go SDK. Learn how to use this API endpoint with code examples. - [Workspaces - Go SDK](https://openrouter.ai/docs/client-sdks/go/api-reference/workspaces.md): Workspaces method documentation for the OpenRouter Go SDK. Learn how to use this API endpoint with code examples. - [DevTools](https://openrouter.ai/docs/client-sdks/dev-tools/devtools.md): Comprehensive development tools for the OpenRouter SDK. Capture telemetry, visualize requests, and debug your AI applications with ease. - [Migrating to @openrouter/agent](https://openrouter.ai/docs/client-sdks/agent-migration.md): Step-by-step guide to migrating agent toolkit code from @openrouter/sdk to the new @openrouter/agent package. - [Agent SDK](https://openrouter.ai/docs/agent-sdk/overview.md): Build AI agents on OpenRouter with callModel, tool definitions, stop conditions, and automatic conversation state management. - [Usage for Agents](https://openrouter.ai/docs/agent-sdk/usage-for-agents.md): Add OpenRouter Agent SDK skills to AI coding assistants like Claude Code, Cursor, GitHub Copilot, and more. Enable your AI to code with the OpenRouter Agent SDK. - [Call Model (Typescript)](https://openrouter.ai/docs/agent-sdk/call-model/overview.md): Learn how to use callModel for text generation, streaming, and tool calling with automatic execution. Access 400+ LLMs through a single API. - [Working with Items](https://openrouter.ai/docs/agent-sdk/call-model/working-with-items.md): Learn the items-based streaming paradigm for callModel. Replace items by ID instead of accumulating chunks for simpler React state management. - [API Reference](https://openrouter.ai/docs/agent-sdk/call-model/api-reference.md): Complete API reference for callModel, ModelResult, tool types, and helper functions in the OpenRouter SDK. - [Dynamic Parameters](https://openrouter.ai/docs/agent-sdk/call-model/dynamic-parameters.md): Use async functions to dynamically compute callModel parameters. Adapt model selection, temperature, and instructions based on conversation state. - [Next Turn Params](https://openrouter.ai/docs/agent-sdk/call-model/next-turn-params.md): Build encapsulated, context-aware tools with nextTurnParams. Create skills systems, plugins, and adaptive multi-turn agents. - [Stop Conditions](https://openrouter.ai/docs/agent-sdk/call-model/stop-conditions.md): Control multi-turn execution with stopWhen. Use built-in helpers or custom conditions to stop by step count, tool calls, cost, or tokens. - [Streaming](https://openrouter.ai/docs/agent-sdk/call-model/streaming.md): Learn to stream LLM responses with callModel. Covers text streaming, reasoning streams, message updates, and concurrent consumers. - [Text Generation](https://openrouter.ai/docs/agent-sdk/call-model/text-generation.md): Learn how to generate text with callModel. Covers input formats, model selection, system instructions, and response handling. - [Message Formats](https://openrouter.ai/docs/agent-sdk/call-model/message-formats.md): Convert between OpenAI chat format, Anthropic Claude format, and OpenResponses format. Easy migration from other SDKs. - [Tools](https://openrouter.ai/docs/agent-sdk/call-model/tools.md): Create strongly-typed tools for LLMs with Zod schemas. Learn about regular tools, generator tools with progress, manual tools, human-in-the-loop tools, and automatic multi-turn execution. - [Tool Approval & State Persistence](https://openrouter.ai/docs/agent-sdk/call-model/tool-approval-state.md): Add human-in-the-loop approval for sensitive tool calls and persist conversation state across callModel runs. Supports approval gates, resumption, and interruption recovery. - [Weather Tool](https://openrouter.ai/docs/agent-sdk/call-model/examples/weather-tool.md): Build a weather tool with external API integration, Zod validation, error handling, and environment configuration. - [Skills Loader](https://openrouter.ai/docs/agent-sdk/call-model/examples/skills-loader.md): Build a complete skills system like Claude Code using nextTurnParams for context injection, idempotency, and multi-skill loading. - [Quickstart: Build a Chat App](https://openrouter.ai/docs/cookbook/get-started/quickstart.md): Build a working chat app in TypeScript that streams responses from any model on OpenRouter. Install the SDK, send a message, and handle multi-turn conversations. - [Migrate to OpenRouter](https://openrouter.ai/docs/cookbook/get-started/migrate-to-openrouter.md): Hand one prompt to your coding agent to migrate an existing app from the OpenAI SDK, Anthropic SDK, Vercel AI SDK, Vercel AI Gateway, Mastra, or raw HTTP calls to OpenRouter. - [Enterprise Quickstart](https://openrouter.ai/docs/cookbook/get-started/enterprise-quickstart.md): A comprehensive guide for enterprise customers to get started with OpenRouter. Learn about organizations, workspaces, API key management, security controls, and observability. - [Free Models Router](https://openrouter.ai/docs/cookbook/get-started/free-models-router-playground.md): Learn how to use the Free Models Router in the OpenRouter Chat Playground for zero-cost inference. - [Automatic Code Review](https://openrouter.ai/docs/cookbook/coding-agents/automatic-code-review.md): Set up automatic, non-blocking code reviews for Claude Code. A stop hook triggers a background reviewer agent via OpenRouter — observable, customizable, and cost-monitored. - [Claude Code](https://openrouter.ai/docs/cookbook/coding-agents/claude-code-integration.md): Learn how to use Claude Code with OpenRouter for improved reliability, provider failover, and organizational controls. - [Claude Desktop](https://openrouter.ai/docs/cookbook/coding-agents/claude-desktop-integration.md): Learn how to use Claude Desktop with OpenRouter through built-in third-party inference mode. - [Codex CLI](https://openrouter.ai/docs/cookbook/coding-agents/codex-cli.md): Learn how to configure Codex CLI to use OpenRouter for agentic coding with the latest GPT models and more. - [Cursor](https://openrouter.ai/docs/cookbook/coding-agents/cursor-integration.md): Learn how to configure Cursor to use OpenRouter for access to hundreds of AI models through a single API key. - [Hermes Agent](https://openrouter.ai/docs/cookbook/coding-agents/hermes-integration.md): Learn how to configure Hermes Agent to use OpenRouter for AI-powered coding, automation, and multi-platform messaging. - [Junie CLI](https://openrouter.ai/docs/cookbook/coding-agents/junie.md): Integrate OpenRouter with JetBrains Junie CLI. Complete setup guide for using hundreds of AI models with the Junie agentic coding tool. - [Using MCP Servers with OpenRouter](https://openrouter.ai/docs/cookbook/coding-agents/mcp-servers.md): Learn how to use MCP Servers with OpenRouter - [OpenClaw 🦞](https://openrouter.ai/docs/cookbook/coding-agents/openclaw-integration.md): Learn how to configure OpenClaw to use OpenRouter for AI agents across multiple messaging platforms. - [OpenCode](https://openrouter.ai/docs/cookbook/coding-agents/opencode-integration.md): Learn how to configure OpenCode to use OpenRouter for agentic coding with access to hundreds of AI models. - [Add Human-in-the-Loop Controls to an Agent SDK Agent](https://openrouter.ai/docs/cookbook/building-agents/hitl-tools.md): Add HITL controls to an existing OpenRouter Agent SDK agent so routine tool calls resolve automatically and high-stakes decisions pause for human review. - [Build a Long-Horizon Agent](https://openrouter.ai/docs/cookbook/building-agents/long-horizon-agents.md): Run agents for hours, not seconds. Cap cost and step count, persist state for resumability, stream progress, and drive the same loop from voice input. - [Build a Token-Efficient Review Agent](https://openrouter.ai/docs/cookbook/building-agents/advisor-server-tool.md): Build an agent workflow that keeps routine reasoning on a cheap model and uses OpenRouter Advisor only after the task is compressed into a short uncertainty packet. - [Build Your Own Agent TUI](https://openrouter.ai/docs/cookbook/building-agents/create-agent-harness-tui.md): Use the create-agent-tui skill to scaffold a custom AI agent in TypeScript with a customizable terminal UI, configurable tools, and streaming via @openrouter/agent. - [Build Your Own Headless Agent](https://openrouter.ai/docs/cookbook/building-agents/create-headless-agent.md): Use the create-headless-agent skill to scaffold a headless AI agent in TypeScript + Bun with configurable tools, output modes, and streaming via @openrouter/agent. - [Delegate Routine Work to Cheaper Models](https://openrouter.ai/docs/cookbook/building-agents/subagent-server-tool.md): Build a workflow where a large orchestrator model fans out routine subtasks to a smaller, cheaper worker model via the OpenRouter subagent server tool. - [Choose a Video Generation Model](https://openrouter.ai/docs/cookbook/video-generation/choose-video-model.md): Fetch OpenRouter video model metadata, filter by capability, and score models by speed, cost, and quality priorities before submitting a video job. - [Generate and Download a Video from Text](https://openrouter.ai/docs/cookbook/video-generation/text-to-video.md): Submit an OpenRouter text-to-video generation job, poll the job status, and download the finished video file. - [Get Video Results with Webhooks](https://openrouter.ai/docs/cookbook/video-generation/video-generation-webhooks.md): Receive OpenRouter video job results through webhooks, preserve the raw request body, and verify the webhook signature. - [Guide a Video with Reference Images](https://openrouter.ai/docs/cookbook/video-generation/reference-to-video.md): Submit an OpenRouter reference-to-video job with input_references when images should guide the generated result. - [Turn an Image into a Video](https://openrouter.ai/docs/cookbook/video-generation/image-to-video.md): Submit an OpenRouter image-to-video job with frame_images, poll for completion, and download the finished clip. - [Use Provider-Specific Video Options](https://openrouter.ai/docs/cookbook/video-generation/provider-specific-video-options.md): Use allowed_passthrough_parameters and provider.options to send model-specific video generation controls through OpenRouter. - [Distillation](https://openrouter.ai/docs/cookbook/evaluate-and-optimize/distillation.md): Learn how to use the distillable filter to ensure compliance with provider and model creator policies when using model outputs for training or distillation. - [Claude 4.7 Migration Guide](https://openrouter.ai/docs/cookbook/evaluate-and-optimize/model-migrations/claude-4-7.md): Learn about the breaking changes in Claude 4.7 Opus — removed sampling parameters, adaptive-only thinking, and the new xhigh effort level. - [Claude 4.6 Migration Guide](https://openrouter.ai/docs/cookbook/evaluate-and-optimize/model-migrations/claude-4-6.md): Learn about adaptive thinking and the new max effort level in Claude 4.6. - [GPT-5.4 Migration Guide](https://openrouter.ai/docs/cookbook/evaluate-and-optimize/model-migrations/gpt-5-4.md): Learn how to use the phase field for GPT-5.3 Codex, GPT-5.4, GPT-5.4 Pro, GPT-5.5, and GPT-5.5 Pro on OpenRouter. - [RAG with Embeddings & Rerank](https://openrouter.ai/docs/cookbook/evaluate-and-optimize/rag.md): Learn how to build RAG pipelines using OpenRouter embeddings for retrieval and rerank models for precision, then generate answers with LLMs — all through a single API. - [Red Teaming](https://openrouter.ai/docs/cookbook/evaluate-and-optimize/red-teaming.md): Understand OpenRouter policies on red teaming, jailbreaking, and adversarial model testing. Learn how to get approval for legitimate security research. - [Activity Export](https://openrouter.ai/docs/cookbook/administration/activity-export.md): Learn how to export your OpenRouter usage data as CSV or PDF reports, grouped by API key, model, or organization member. - [API Key Rotation](https://openrouter.ai/docs/cookbook/administration/api-key-rotation.md): Learn how to securely rotate your OpenRouter API keys using the key minting API. Includes best practices and BYOK advantages for simplified key management. - [Control Costs with the Analytics API](https://openrouter.ai/docs/cookbook/administration/analytics-cost-control.md): Use your coding agent, the beta Analytics API, and the openrouter-analytics skill to find wasted spend, drill into the keys causing it, and verify the fix. - [Crypto API](https://openrouter.ai/docs/cookbook/administration/crypto-api.md): Coinbase deprecated the APIs used by the legacy Coinbase Commerce crypto credits endpoint, which now returns 410 Gone. - [Organization Management](https://openrouter.ai/docs/cookbook/administration/organization-management.md): Learn how to create and manage organizations on OpenRouter for team collaboration, shared credits, and centralized API management. - [Usage Accounting](https://openrouter.ai/docs/cookbook/administration/usage-accounting.md): Learn how to track AI model usage including prompt tokens, completion tokens, and cached tokens without additional API calls. - [User Tracking](https://openrouter.ai/docs/cookbook/administration/user-tracking.md): Learn how to use the user parameter to track your own user IDs with OpenRouter. Get detailed reporting and analytics on your sub-users. ## API Docs - API Reference > Responses [Create a response](https://openrouter.ai/docs/api/api-reference/responses/create-responses.md) - API Reference > OAuth [Exchange authorization code for API key](https://openrouter.ai/docs/api/api-reference/o-auth/exchange-auth-code-for-api-key.md) - API Reference > OAuth [Create authorization code](https://openrouter.ai/docs/api/api-reference/o-auth/create-auth-keys-code.md) - API Reference > Speech [Create speech](https://openrouter.ai/docs/api/api-reference/speech/create-audio-speech.md) - API Reference > Transcriptions [Create transcription](https://openrouter.ai/docs/api/api-reference/transcriptions/create-audio-transcriptions.md) - API Reference > Analytics [Get user activity grouped by endpoint](https://openrouter.ai/docs/api/api-reference/analytics/get-user-activity.md) - API Reference > Beta Analytics [Get available analytics metrics and dimensions](https://openrouter.ai/docs/api/api-reference/beta-analytics/get-analytics-meta.md) - API Reference > Beta Analytics [Query analytics data](https://openrouter.ai/docs/api/api-reference/beta-analytics/query-analytics.md) - API Reference > Byok [List BYOK provider credentials](https://openrouter.ai/docs/api/api-reference/byok/list-byok-keys.md) - API Reference > Byok [Create a BYOK provider credential](https://openrouter.ai/docs/api/api-reference/byok/create-byok-key.md) - API Reference > Byok [Get a BYOK provider credential](https://openrouter.ai/docs/api/api-reference/byok/get-byok-key.md) - API Reference > Byok [Delete a BYOK provider credential](https://openrouter.ai/docs/api/api-reference/byok/delete-byok-key.md) - API Reference > Byok [Update a BYOK provider credential](https://openrouter.ai/docs/api/api-reference/byok/update-byok-key.md) - API Reference > Chat [Create a chat completion](https://openrouter.ai/docs/api/api-reference/chat/send-chat-completion-request.md) - API Reference > Credits [Get remaining credits](https://openrouter.ai/docs/api/api-reference/credits/get-credits.md) - API Reference > Datasets [Top apps by token usage](https://openrouter.ai/docs/api/api-reference/datasets/get-app-rankings.md) - API Reference > Datasets [Artificial Analysis Benchmark Indices](https://openrouter.ai/docs/api/api-reference/datasets/get-benchmarks-artificial-analysis.md) - API Reference > Datasets [Design Arena Benchmark Rankings](https://openrouter.ai/docs/api/api-reference/datasets/get-benchmarks-design-arena.md) - API Reference > Datasets [Daily token totals for top 50 models](https://openrouter.ai/docs/api/api-reference/datasets/get-rankings-daily.md) - API Reference > Embeddings [Submit an embedding request](https://openrouter.ai/docs/api/api-reference/embeddings/create-embeddings.md) - API Reference > Embeddings [List all embeddings models](https://openrouter.ai/docs/api/api-reference/embeddings/list-embeddings-models.md) - API Reference > Endpoints [Preview the impact of ZDR on the available endpoints](https://openrouter.ai/docs/api/api-reference/endpoints/list-endpoints-zdr.md) - API Reference > Endpoints [List all endpoints for a model](https://openrouter.ai/docs/api/api-reference/endpoints/list-endpoints.md) - API Reference > Files [List files](https://openrouter.ai/docs/api/api-reference/files/list-files.md) - API Reference > Files [Upload a file](https://openrouter.ai/docs/api/api-reference/files/upload-file.md) - API Reference > Files [Get file metadata](https://openrouter.ai/docs/api/api-reference/files/get-file-metadata.md) - API Reference > Files [Delete a file](https://openrouter.ai/docs/api/api-reference/files/delete-file.md) - API Reference > Files [Download file content](https://openrouter.ai/docs/api/api-reference/files/download-file-content.md) - API Reference > Generations [Get request & usage metadata for a generation](https://openrouter.ai/docs/api/api-reference/generations/get-generation.md) - API Reference > Generations [Get stored prompt and completion content for a generation](https://openrouter.ai/docs/api/api-reference/generations/list-generation-content.md) - API Reference > Guardrails [List guardrails](https://openrouter.ai/docs/api/api-reference/guardrails/list-guardrails.md) - API Reference > Guardrails [Create a guardrail](https://openrouter.ai/docs/api/api-reference/guardrails/create-guardrail.md) - API Reference > Guardrails [Get a guardrail](https://openrouter.ai/docs/api/api-reference/guardrails/get-guardrail.md) - API Reference > Guardrails [Delete a guardrail](https://openrouter.ai/docs/api/api-reference/guardrails/delete-guardrail.md) - API Reference > Guardrails [Update a guardrail](https://openrouter.ai/docs/api/api-reference/guardrails/update-guardrail.md) - API Reference > Guardrails [List key assignments for a guardrail](https://openrouter.ai/docs/api/api-reference/guardrails/list-guardrail-key-assignments.md) - API Reference > Guardrails [Bulk assign keys to a guardrail](https://openrouter.ai/docs/api/api-reference/guardrails/bulk-assign-keys-to-guardrail.md) - API Reference > Guardrails [Bulk unassign keys from a guardrail](https://openrouter.ai/docs/api/api-reference/guardrails/bulk-unassign-keys-from-guardrail.md) - API Reference > Guardrails [List member assignments for a guardrail](https://openrouter.ai/docs/api/api-reference/guardrails/list-guardrail-member-assignments.md) - API Reference > Guardrails [Bulk assign members to a guardrail](https://openrouter.ai/docs/api/api-reference/guardrails/bulk-assign-members-to-guardrail.md) - API Reference > Guardrails [Bulk unassign members from a guardrail](https://openrouter.ai/docs/api/api-reference/guardrails/bulk-unassign-members-from-guardrail.md) - API Reference > Guardrails [List all key assignments](https://openrouter.ai/docs/api/api-reference/guardrails/list-key-assignments.md) - API Reference > Guardrails [List all member assignments](https://openrouter.ai/docs/api/api-reference/guardrails/list-member-assignments.md) - API Reference > API Keys [Get current API key](https://openrouter.ai/docs/api/api-reference/api-keys/get-current-key.md) - API Reference > API Keys [List API keys](https://openrouter.ai/docs/api/api-reference/api-keys/list.md) - API Reference > API Keys [Create a new API key](https://openrouter.ai/docs/api/api-reference/api-keys/create-keys.md) - API Reference > API Keys [Get a single API key](https://openrouter.ai/docs/api/api-reference/api-keys/get-key.md) - API Reference > API Keys [Delete an API key](https://openrouter.ai/docs/api/api-reference/api-keys/delete-keys.md) - API Reference > API Keys [Update an API key](https://openrouter.ai/docs/api/api-reference/api-keys/update-keys.md) - API Reference > Anthropic Messages [Create a message](https://openrouter.ai/docs/api/api-reference/anthropic-messages/create-messages.md) - API Reference > Models [Get a model by its slug](https://openrouter.ai/docs/api/api-reference/models/get-model.md) - API Reference > Models [List all models and their properties](https://openrouter.ai/docs/api/api-reference/models/get-models.md) - API Reference > Models [Get total count of available models](https://openrouter.ai/docs/api/api-reference/models/list-models-count.md) - API Reference > Models [List models filtered by user provider preferences, privacy settings, and guardrails](https://openrouter.ai/docs/api/api-reference/models/list-models-user.md) - API Reference > Observability [List observability destinations](https://openrouter.ai/docs/api/api-reference/observability/list-observability-destinations.md) - API Reference > Observability [Create an observability destination](https://openrouter.ai/docs/api/api-reference/observability/create-observability-destination.md) - API Reference > Observability [Get an observability destination](https://openrouter.ai/docs/api/api-reference/observability/get-observability-destination.md) - API Reference > Observability [Delete an observability destination](https://openrouter.ai/docs/api/api-reference/observability/delete-observability-destination.md) - API Reference > Observability [Update an observability destination](https://openrouter.ai/docs/api/api-reference/observability/update-observability-destination.md) - API Reference > Organization [List organization members](https://openrouter.ai/docs/api/api-reference/organization/list-organization-members.md) - API Reference > Presets [List presets](https://openrouter.ai/docs/api/api-reference/presets/list-presets.md) - API Reference > Presets [Get a preset](https://openrouter.ai/docs/api/api-reference/presets/get-preset.md) - API Reference > Presets [Create a preset from a chat-completions request body](https://openrouter.ai/docs/api/api-reference/presets/create-presets-chat-completions.md) - API Reference > Presets [Create a preset from a messages request body](https://openrouter.ai/docs/api/api-reference/presets/create-presets-messages.md) - API Reference > Presets [Create a preset from a responses request body](https://openrouter.ai/docs/api/api-reference/presets/create-presets-responses.md) - API Reference > Presets [List versions of a preset](https://openrouter.ai/docs/api/api-reference/presets/list-preset-versions.md) - API Reference > Presets [Get a specific version of a preset](https://openrouter.ai/docs/api/api-reference/presets/get-preset-version.md) - API Reference > Providers [List all providers](https://openrouter.ai/docs/api/api-reference/providers/list-providers.md) - API Reference > Rerank [Submit a rerank request](https://openrouter.ai/docs/api/api-reference/rerank/create-rerank.md) - API Reference > Video Generation [Submit a video generation request](https://openrouter.ai/docs/api/api-reference/video-generation/create-videos.md) - API Reference > Video Generation [Poll video generation status](https://openrouter.ai/docs/api/api-reference/video-generation/get-videos.md) - API Reference > Video Generation [Download generated video content](https://openrouter.ai/docs/api/api-reference/video-generation/list-videos-content.md) - API Reference > Video Generation [List all video generation models](https://openrouter.ai/docs/api/api-reference/video-generation/list-videos-models.md) - API Reference > Workspaces [List workspaces](https://openrouter.ai/docs/api/api-reference/workspaces/list-workspaces.md) - API Reference > Workspaces [Create a workspace](https://openrouter.ai/docs/api/api-reference/workspaces/create-workspace.md) - API Reference > Workspaces [Get a workspace](https://openrouter.ai/docs/api/api-reference/workspaces/get-workspace.md) - API Reference > Workspaces [Delete a workspace](https://openrouter.ai/docs/api/api-reference/workspaces/delete-workspace.md) - API Reference > Workspaces [Update a workspace](https://openrouter.ai/docs/api/api-reference/workspaces/update-workspace.md) - API Reference > Workspaces [List workspace budgets](https://openrouter.ai/docs/api/api-reference/workspaces/list-workspace-budgets.md) - API Reference > Workspaces [Create or update a workspace budget](https://openrouter.ai/docs/api/api-reference/workspaces/upsert-workspace-budget.md) - API Reference > Workspaces [Delete a workspace budget](https://openrouter.ai/docs/api/api-reference/workspaces/delete-workspace-budget.md) - API Reference > Workspaces [Bulk add members to a workspace](https://openrouter.ai/docs/api/api-reference/workspaces/bulk-add-workspace-members.md) - API Reference > Workspaces [Bulk remove members from a workspace](https://openrouter.ai/docs/api/api-reference/workspaces/bulk-remove-workspace-members.md) ## OpenAPI Specification The raw OpenAPI 3.1 specification for this API is available at: - [OpenAPI JSON](https://openrouter.ai/openapi.json) - [OpenAPI YAML](https://openrouter.ai/openapi.yaml)