# LLM Gateway > LLM Gateway is an open-source, OpenAI-compatible API gateway that routes, manages, and analyzes LLM requests across 20+ providers (OpenAI, Anthropic, Google, and more) through a single unified API. Switch providers without changing code, manage API keys centrally, track usage and cost, add caching and guardrails, and self-host or use the managed cloud. ## Key facts - One OpenAI-compatible API for 20+ providers and 200+ models. - Migrate by changing only the base URL (`https://api.llmgateway.io/v1`) and your API key — no code rewrites. - Open source (AGPLv3 core) with a managed cloud option; self-hosting supported via Docker. - Built-in usage analytics, per-model/provider cost breakdowns, automatic routing, fallbacks, caching, and guardrails. - API base URL: `https://api.llmgateway.io/v1` · Docs: https://docs.llmgateway.io · Site: https://llmgateway.io ## Product pages - [Home](https://llmgateway.io): Unified API for multiple LLM providers. - [Models](https://llmgateway.io/models): Browse 200+ supported models with pricing and capabilities. - [Providers](https://llmgateway.io/providers): All supported LLM providers. - [Pricing](https://llmgateway.io/pricing): Plans and pricing. - [Enterprise](https://llmgateway.io/enterprise): Self-hosting, SSO, and team features. - [Token Cost Calculator](https://llmgateway.io/token-cost-calculator): Estimate and compare LLM costs across models. - [LLM Gateway vs LiteLLM](https://llmgateway.io/compare/litellm) - [LLM Gateway vs OpenRouter](https://llmgateway.io/compare/open-router) - [LLM Gateway vs Portkey](https://llmgateway.io/compare/portkey) ## Getting Started - [Introduction](https://docs.llmgateway.io/): LLM Gateway is an API gateway for Large Language Models. Route requests to multiple providers, manage API keys, track usage, and optimize costs. - [Overview](https://docs.llmgateway.io/overview): Introduction to LLM Gateway, an API gateway for LLMs. - [Quickstart](https://docs.llmgateway.io/quick-start): Fastest way to start using LLM Gateway in any language or framework. - [Self Host LLMGateway](https://docs.llmgateway.io/self-host): Simple guide to self-hosting LLMGateway using Docker. - [Prometheus metrics](https://docs.llmgateway.io/metrics): Prometheus metrics endpoint for scraping. - [介绍](https://docs.llmgateway.io/): LLM Gateway 是面向大语言模型的 API 网关。将请求路由到多个提供商、管理 API key、跟踪用量并优化成本。 - [概览](https://docs.llmgateway.io/overview): 了解 LLM Gateway:面向 LLM 的 API 网关。 - [快速开始](https://docs.llmgateway.io/quick-start): 在任意语言或框架中开始使用 LLM Gateway 的最快方式。 - [自托管 LLMGateway](https://docs.llmgateway.io/self-host): 使用 Docker 自托管 LLMGateway 的简明指南。 - [Prometheus metrics](https://docs.llmgateway.io/metrics): Prometheus metrics endpoint for scraping. ## Features - [Anthropic API Compatibility](https://docs.llmgateway.io/features/anthropic-endpoint): Use the Anthropic-compatible endpoint to access any LLM model through the familiar Anthropic API format. - [API Keys & IAM Rules](https://docs.llmgateway.io/features/api-keys): Comprehensive guide to API key management and Identity Access Management (IAM) rules for fine-grained access control - [Audit Logs](https://docs.llmgateway.io/features/audit-logs): Track all organization activity with comprehensive audit logs - [Coding Agents](https://docs.llmgateway.io/features/coding-agents): Supported coding agents for DevPass plans and how to configure your tool. - [Cost Breakdown](https://docs.llmgateway.io/features/cost-breakdown): Get real-time cost information for each API request directly in the response. - [Custom Providers](https://docs.llmgateway.io/features/custom-providers): Learn how to integrate custom OpenAI-compatible providers with LLMGateway for enhanced flexibility and control. - [Data Retention](https://docs.llmgateway.io/features/data-retention): Store and access your full request and response data for debugging, analytics, and compliance. - [Document Reading](https://docs.llmgateway.io/features/documents): Learn how to send PDFs and other document data to document-capable models. - [Embeddings](https://docs.llmgateway.io/features/embeddings): Generate vector embeddings using OpenAI-compatible embedding models. - [Guardrails](https://docs.llmgateway.io/features/guardrails): Protect your LLM usage with content guardrails that detect and block harmful content - [Image Generation](https://docs.llmgateway.io/features/image-generation): Generate images using AI models through the OpenAI-compatible images API or chat completions API - [LLM SDK](https://docs.llmgateway.io/features/llm-sdk): Embed AI and in-app credit purchases into your app like Stripe + Stripe Elements. Your end-users get their own wallet, buy credits, and chat with any model — billed through LLM Gateway, with your markup as margin. - [Master Keys](https://docs.llmgateway.io/features/master-keys): Provision projects and gateway API keys programmatically with org-scoped bearer tokens (Enterprise only) - [Metadata](https://docs.llmgateway.io/features/metadata): Send additional context and metadata to LLM Gateway using custom headers. - [Moderations](https://docs.llmgateway.io/features/moderations): Classify unsafe text and image inputs with the OpenAI-compatible moderations API - [Reasoning](https://docs.llmgateway.io/features/reasoning): Learn how to use reasoning-capable models that show their step-by-step thought process. - [Response Healing](https://docs.llmgateway.io/features/response-healing): Automatically repair malformed JSON responses from AI models. - [Routing](https://docs.llmgateway.io/features/routing): Learn how LLMGateway intelligently routes your requests to the best available models and providers. - [Service Tiers](https://docs.llmgateway.io/features/service-tiers): Trade latency against cost on supported OpenAI and Google models with Flex and Priority processing tiers. - [Sessions](https://docs.llmgateway.io/features/sessions): Group related requests into a session to keep provider routing sticky and to observe a conversation end-to-end in the activity log. - [Source Attribution](https://docs.llmgateway.io/features/source): Use the X-Source header to identify your domain for public usage statistics. - [Speech Generation](https://docs.llmgateway.io/features/speech-generation): Generate speech (text-to-speech) using ElevenLabs, Gemini, and OpenAI models through the OpenAI-compatible audio API - [Video Generation](https://docs.llmgateway.io/features/video-generation): Generate videos with an OpenAI-compatible async API and signed completion callbacks - [Vision Support](https://docs.llmgateway.io/features/vision): Learn how to send images to vision-enabled models using URLs or inline base64 data. - [Native Web Search](https://docs.llmgateway.io/features/web-search): Enable real-time web search capabilities to get up-to-date information from the internet. - [Gateway Caching](https://docs.llmgateway.io/features/caching/gateway-caching): Serve byte-identical requests entirely from LLM Gateway at $0 cost. - [Caching](https://docs.llmgateway.io/features/caching): Overview of the two types of caching available in LLM Gateway. - [Provider Cache Control](https://docs.llmgateway.io/features/caching/provider-cache-control): Use provider-side prompt caching to reduce the cost of long, reused prompts in chat and coding tools. - [Anthropic API Compatibility](https://docs.llmgateway.io/features/anthropic-endpoint): 使用 Anthropic-compatible endpoint,通过熟悉的 Anthropic API 格式访问任意 LLM 模型。 - [API Keys & IAM Rules](https://docs.llmgateway.io/features/api-keys): API key 管理和 Identity Access Management (IAM) rules 的完整指南,用于细粒度访问控制 - [Audit Logs](https://docs.llmgateway.io/features/audit-logs): 使用完整 audit logs 追踪所有组织活动 - [Coding Agents](https://docs.llmgateway.io/features/coding-agents): DevPass 套餐支持的 coding agents,以及如何配置你的工具。 - [Cost Breakdown](https://docs.llmgateway.io/features/cost-breakdown): 直接在响应中获取每个 API 请求的实时成本信息。 - [Custom Providers](https://docs.llmgateway.io/features/custom-providers): 了解如何将自定义 OpenAI-compatible provider 集成到 LLMGateway,以获得更强灵活性和控制力。 - [Data Retention](https://docs.llmgateway.io/features/data-retention): 存储并访问完整请求和响应数据,用于调试、分析和合规。 - [Document Reading](https://docs.llmgateway.io/features/documents): 了解如何把 PDF 和其他文档数据发送给支持文档输入的模型。 - [Embeddings](https://docs.llmgateway.io/features/embeddings): 使用 OpenAI-compatible embedding models 生成向量 embeddings。 - [Guardrails](https://docs.llmgateway.io/features/guardrails): 使用内容 guardrails 检测并阻止有害内容,保护你的 LLM 使用 - [Image Generation](https://docs.llmgateway.io/features/image-generation): 通过 OpenAI-compatible images API 或 chat completions API 使用 AI models 生成图片 - [LLM SDK](https://docs.llmgateway.io/features/llm-sdk): 像 Stripe + Stripe Elements 一样,把 AI 和应用内 credit purchase 嵌入你的 app。终端用户拥有自己的 wallet、购买 credits,并与任意模型聊天;通过 LLM Gateway 计费,你设置的 markup 成为 margin。 - [Master Keys](https://docs.llmgateway.io/features/master-keys): 使用 org-scoped bearer tokens 以编程方式 provision projects 和 gateway API keys(仅 Enterprise) - [Metadata](https://docs.llmgateway.io/features/metadata): 使用自定义 header 向 LLM Gateway 发送额外上下文和 metadata。 - [Moderations](https://docs.llmgateway.io/features/moderations): 使用 OpenAI-compatible moderations API 对不安全文本和图片输入进行分类 - [Reasoning](https://docs.llmgateway.io/features/reasoning): 了解如何使用能展示逐步思考过程的 reasoning-capable models。 - [Response Healing](https://docs.llmgateway.io/features/response-healing): 自动修复 AI 模型返回的格式错误 JSON 响应。 - [Routing](https://docs.llmgateway.io/features/routing): 了解 LLMGateway 如何智能地将请求路由到最佳可用模型和 provider。 - [Service Tiers](https://docs.llmgateway.io/features/service-tiers): 在支持的 OpenAI 和 Google 模型上,用 Flex 和 Priority processing tiers 在延迟与成本之间取舍。 - [Sessions](https://docs.llmgateway.io/features/sessions): 将相关请求归入同一个 session,以保持 provider 路由粘性,并在 activity log 中端到端观察一段对话。 - [Source Attribution](https://docs.llmgateway.io/features/source): 使用 X-Source header 标识你的域名,用于公开使用统计。 - [Speech Generation](https://docs.llmgateway.io/features/speech-generation): 通过 OpenAI-compatible audio API,使用 ElevenLabs、Gemini 和 OpenAI 模型生成 speech(text-to-speech) - [Video Generation](https://docs.llmgateway.io/features/video-generation): 使用 OpenAI-compatible async API 和 signed completion callbacks 生成视频 - [Vision Support](https://docs.llmgateway.io/features/vision): 了解如何使用 URL 或 inline base64 data 向 vision-enabled models 发送图片。 - [Native Web Search](https://docs.llmgateway.io/features/web-search): 启用实时 web search 能力,从互联网获取最新信息。 - [Gateway Caching](https://docs.llmgateway.io/features/caching/gateway-caching): 以 $0 成本从 LLM Gateway 完全返回逐字节相同的请求。 - [Caching](https://docs.llmgateway.io/features/caching): LLM Gateway 中两类可用缓存的概览。 - [Provider Cache Control](https://docs.llmgateway.io/features/caching/provider-cache-control): 使用 provider 侧 prompt caching 降低 chat 和编码工具中长而复用 prompt 的成本。 ## Guides & AI Tooling - [Agent Skills](https://docs.llmgateway.io/guides/agent-skills): Packaged instructions and guidelines for AI coding agents - [Autohand Code Integration](https://docs.llmgateway.io/guides/autohand): Use GPT-5, Claude, Gemini, or any model with Autohand Code's autonomous coding agent. Simple config, full cost tracking. - [Claude Code Integration](https://docs.llmgateway.io/guides/claude-code): Use GPT-5, Gemini, or any model with Claude Code. Three environment variables, full cost tracking. - [LLM Gateway CLI](https://docs.llmgateway.io/guides/cli): Command-line tool for scaffolding projects and managing keys, budgets, and usage - [Cline Integration](https://docs.llmgateway.io/guides/cline): Use LLM Gateway with Cline for AI-powered coding assistance in VS Code - [Codex CLI Integration](https://docs.llmgateway.io/guides/codex-cli): Use any model with OpenAI's Codex CLI through LLM Gateway. One config file, full cost tracking. - [Continue CLI Integration](https://docs.llmgateway.io/guides/continue): Use any model with Continue CLI through LLM Gateway. One config file, 210+ models, full cost tracking. - [Cursor Integration](https://docs.llmgateway.io/guides/cursor): Use LLM Gateway with Cursor IDE — supported in plan mode only. Cursor's coding agent does not work with external OpenAI-compatible endpoints. - [Hermes Agent Integration](https://docs.llmgateway.io/guides/hermes-agent): Use any model with Hermes Agent through LLM Gateway. One config change, full cost tracking, 210+ models. - [Kilo Code Integration](https://docs.llmgateway.io/guides/kilo-code): Use LLM Gateway with Kilo Code in VS Code. Built-in provider — just search, connect your API key, and start coding. - [Kimi Code Integration](https://docs.llmgateway.io/guides/kimi-code): Use GPT-5, Claude, Gemini, or any model with Kimi Code CLI. Custom provider configuration, full cost tracking. - [Model Context Protocol (MCP)](https://docs.llmgateway.io/guides/mcp): Use LLM Gateway as an MCP server for Claude Code, Cursor, and other MCP-compatible clients - [MiMo Code Integration](https://docs.llmgateway.io/guides/mimocode): Use GPT-5.5, Claude, Gemini, or any model with MiMo Code. Custom provider configuration, full cost tracking. - [N8n Integration](https://docs.llmgateway.io/guides/n8n): Connect n8n workflow automation to LLM Gateway for AI-powered workflows - [OpenClaw Integration](https://docs.llmgateway.io/guides/openclaw): Use GPT-5.4, Claude Opus, Gemini, or any model with OpenClaw across supported chat apps - [OpenCode Desktop Integration](https://docs.llmgateway.io/guides/opencode-desktop): Connect OpenCode Desktop to 210+ models through LLM Gateway. No config files — just open Settings, connect, and start building. - [OpenCode Integration](https://docs.llmgateway.io/guides/opencode): Connect OpenCode to 210+ models through LLM Gateway's built-in provider. No config files needed — just select, authenticate, and code. - [Pi Integration](https://docs.llmgateway.io/guides/pi): Use any model with Pi coding agent through LLM Gateway — GPT-5.5, Gemini, Claude, DeepSeek, and 200+ others in your terminal. - [Agent Skills](https://docs.llmgateway.io/guides/agent-skills): 面向 AI coding agents 的打包说明和规范 - [Autohand Code Integration](https://docs.llmgateway.io/guides/autohand): 在 Autohand Code 的 autonomous coding agent 中使用 GPT-5、Claude、Gemini 或任意模型。配置简单,完整成本追踪。 - [Claude Code Integration](https://docs.llmgateway.io/guides/claude-code): 在 Claude Code 中使用 GPT-5、Gemini 或任意模型。三个环境变量,完整成本追踪。 - [LLM Gateway CLI](https://docs.llmgateway.io/guides/cli): 用于脚手架项目,并管理 keys、budgets 和 usage 的 command-line tool - [Cline Integration](https://docs.llmgateway.io/guides/cline): 在 VS Code 中将 LLM Gateway 与 Cline 配合使用,获得 AI-powered coding assistance - [Codex CLI Integration](https://docs.llmgateway.io/guides/codex-cli): 通过 LLM Gateway 在 OpenAI Codex CLI 中使用任意模型。一个配置文件,完整成本追踪。 - [Continue CLI Integration](https://docs.llmgateway.io/guides/continue): 通过 LLM Gateway 在 Continue CLI 中使用任意模型。一个配置文件,210+ 模型,完整成本追踪。 - [Cursor Integration](https://docs.llmgateway.io/guides/cursor): 将 LLM Gateway 用于 Cursor IDE,仅支持 plan mode。Cursor 的 coding agent 不支持外部 OpenAI-compatible endpoints。 - [Hermes Agent Integration](https://docs.llmgateway.io/guides/hermes-agent): 通过 LLM Gateway 在 Hermes Agent 中使用任意模型。只需一次配置修改,完整成本追踪,210+ 模型可用。 - [Kilo Code Integration](https://docs.llmgateway.io/guides/kilo-code): 在 VS Code 中将 LLM Gateway 与 Kilo Code 配合使用。内置 provider,只需搜索、连接 API key,然后开始编码。 - [Kimi Code Integration](https://docs.llmgateway.io/guides/kimi-code): 在 Kimi Code CLI 中使用 GPT-5、Claude、Gemini 或任意模型。自定义 provider 配置,完整成本追踪。 - [Model Context Protocol (MCP)](https://docs.llmgateway.io/guides/mcp): 将 LLM Gateway 作为 MCP server,用于 Claude Code、Cursor 和其他 MCP-compatible clients - [MiMo Code Integration](https://docs.llmgateway.io/guides/mimocode): 在 MiMo Code 中使用 GPT-5.5、Claude、Gemini 或任意模型。自定义 provider 配置,完整成本追踪。 - [N8n Integration](https://docs.llmgateway.io/guides/n8n): 将 n8n workflow automation 连接到 LLM Gateway,构建 AI-powered workflows - [OpenClaw Integration](https://docs.llmgateway.io/guides/openclaw): 在支持的聊天应用中通过 OpenClaw 使用 GPT-5.4、Claude Opus、Gemini 或任意模型 - [OpenCode Desktop Integration](https://docs.llmgateway.io/guides/opencode-desktop): 通过 LLM Gateway 将 OpenCode Desktop 连接到 210+ 模型。不需要配置文件,只需打开 Settings、连接并开始构建。 - [OpenCode Integration](https://docs.llmgateway.io/guides/opencode): 通过 LLM Gateway 内置 provider 将 OpenCode 连接到 210+ 模型。不需要配置文件,只需选择、认证,然后开始编码。 - [Pi Integration](https://docs.llmgateway.io/guides/pi): 通过 LLM Gateway 在 Pi coding agent 中使用任意模型,包括 GPT-5.5、Gemini、Claude、DeepSeek 和终端里的 200+ 其他模型。 ## Provider Integrations - [AWS Bedrock Integration](https://docs.llmgateway.io/integrations/aws-bedrock): Connect AWS Bedrock to LLM Gateway for access to foundation models - [Azure Integration](https://docs.llmgateway.io/integrations/azure): Connect Azure to LLM Gateway for enterprise-grade OpenAI models - [Vertex AI Anthropic Integration](https://docs.llmgateway.io/integrations/vertex-anthropic): Connect Google Cloud Vertex AI to LLM Gateway to run Claude models on your own GCP project - [AWS Bedrock 集成](https://docs.llmgateway.io/integrations/aws-bedrock): 将 AWS Bedrock 接入 LLM Gateway,以访问 foundation models。 - [Azure 集成](https://docs.llmgateway.io/integrations/azure): 将 Azure 接入 LLM Gateway,以使用 enterprise-grade OpenAI models。 - [Vertex AI Anthropic 集成](https://docs.llmgateway.io/integrations/vertex-anthropic): 将 Google Cloud Vertex AI 接入 LLM Gateway,在你自己的 GCP project 上运行 Claude models。 ## Platform & Dashboard - [Activity](https://docs.llmgateway.io/learn/activity): View and inspect every API request made through LLM Gateway - [Agents](https://docs.llmgateway.io/learn/agents): Monitor your AI coding agents and their activity - [API Keys](https://docs.llmgateway.io/learn/api-keys): Create, limit, and control API keys for authenticating with LLM Gateway - [Audit Logs](https://docs.llmgateway.io/learn/audit-logs): Track every action taken within your organization - [Billing](https://docs.llmgateway.io/learn/billing): Manage your credits, subscription plan, and payment methods - [Chat Plans](https://docs.llmgateway.io/learn/chat-plans): Monthly subscription plans for the LLM Gateway chat playground - [Dashboard](https://docs.llmgateway.io/learn/dashboard): Your central hub for monitoring LLM usage, costs, and performance - [Guardrails](https://docs.llmgateway.io/learn/guardrails): Configure content safety rules to protect your LLM usage - [Introduction](https://docs.llmgateway.io/learn): Learn how to navigate and use the LLM Gateway dashboard - [Model Categories & Fair Use](https://docs.llmgateway.io/learn/model-categories): How models are categorized and how premium fair-use caps work - [Model Usage](https://docs.llmgateway.io/learn/model-usage): Track usage breakdown by individual model - [Org Preferences](https://docs.llmgateway.io/learn/org-preferences): Manage your organization's name, billing email, and billing details - [Group Chat](https://docs.llmgateway.io/learn/playground-group): Watch multiple AI models discuss and collaborate on your prompt - [Image Studio](https://docs.llmgateway.io/learn/playground-image): Generate and edit images using AI models - [Video Studio](https://docs.llmgateway.io/learn/playground-video): Generate videos using AI models - [Chat Playground](https://docs.llmgateway.io/learn/playground): Test LLM models interactively with a full-featured chat interface - [Policies](https://docs.llmgateway.io/learn/policies): Configure data retention and other organization policies - [Preferences](https://docs.llmgateway.io/learn/preferences): Configure project-level settings including caching and project mode - [Provider Keys](https://docs.llmgateway.io/learn/provider-keys): Bring your own provider API keys to use without additional fees - [Referrals](https://docs.llmgateway.io/learn/referrals): Earn credits by referring other users to LLM Gateway - [LLM SDK](https://docs.llmgateway.io/learn/sdk-settings): Configure end-user sessions and platform secret keys for the LLM SDK - [Security Events](https://docs.llmgateway.io/learn/security-events): Monitor guardrail violations and content policy events - [Team](https://docs.llmgateway.io/learn/team): Manage team members and their roles within your organization - [Transactions](https://docs.llmgateway.io/learn/transactions): View your complete payment and credit history - [Usage & Metrics](https://docs.llmgateway.io/learn/usage-metrics): Detailed analytics for requests, models, errors, caching, and costs - [Activity](https://docs.llmgateway.io/learn/activity): 查看并检查通过 LLM Gateway 发起的每一次 API 请求 - [Agents](https://docs.llmgateway.io/learn/agents): 监控你的 AI 编码 agent 及其活动 - [API Keys](https://docs.llmgateway.io/learn/api-keys): 创建、限制并控制用于 LLM Gateway 认证的 API key - [Audit Logs](https://docs.llmgateway.io/learn/audit-logs): 追踪组织内执行的每一个操作 - [Billing](https://docs.llmgateway.io/learn/billing): 管理你的额度、订阅套餐和支付方式 - [Chat Plans](https://docs.llmgateway.io/learn/chat-plans): 面向 LLM Gateway chat playground 的月度订阅套餐 - [Dashboard](https://docs.llmgateway.io/learn/dashboard): 监控 LLM 使用量、成本和性能的中心入口 - [Guardrails](https://docs.llmgateway.io/learn/guardrails): 配置内容安全规则以保护你的 LLM 使用 - [简介](https://docs.llmgateway.io/learn): 了解如何导航和使用 LLM Gateway 控制台 - [Model Categories & Fair Use](https://docs.llmgateway.io/learn/model-categories): 模型如何分类,以及 premium 公平使用上限如何工作 - [Model Usage](https://docs.llmgateway.io/learn/model-usage): 按单个模型追踪使用量拆分 - [Org Preferences](https://docs.llmgateway.io/learn/org-preferences): 管理组织名称、账单邮箱和账单详情 - [Group Chat](https://docs.llmgateway.io/learn/playground-group): 观察多个 AI 模型围绕你的 prompt 讨论和协作 - [Image Studio](https://docs.llmgateway.io/learn/playground-image): 使用 AI 模型生成和编辑图片 - [Video Studio](https://docs.llmgateway.io/learn/playground-video): 使用 AI 模型生成视频 - [Chat Playground](https://docs.llmgateway.io/learn/playground): 使用完整聊天界面交互式测试 LLM 模型 - [Policies](https://docs.llmgateway.io/learn/policies): 配置数据保留和其他组织策略 - [Preferences](https://docs.llmgateway.io/learn/preferences): 配置缓存和项目模式等项目级设置 - [Provider Keys](https://docs.llmgateway.io/learn/provider-keys): 接入你自己的 provider API key,无需额外费用 - [Referrals](https://docs.llmgateway.io/learn/referrals): 通过邀请其他用户使用 LLM Gateway 获得额度 - [LLM SDK](https://docs.llmgateway.io/learn/sdk-settings): 为 LLM SDK 配置 end-user session 和 platform secret key - [Security Events](https://docs.llmgateway.io/learn/security-events): 监控 guardrail 违规和内容策略事件 - [Team](https://docs.llmgateway.io/learn/team): 管理组织内的团队成员及其角色 - [Transactions](https://docs.llmgateway.io/learn/transactions): 查看完整付款和额度历史 - [Usage & Metrics](https://docs.llmgateway.io/learn/usage-metrics): 面向请求、模型、错误、缓存和成本的详细分析 ## Migration Guides - [Migrate from LiteLLM](https://docs.llmgateway.io/migrations/litellm): Switch from self-hosted LiteLLM to managed LLM Gateway. Same API format, zero infrastructure to maintain. - [Migrate from OpenRouter](https://docs.llmgateway.io/migrations/openrouter): Switch to LLM Gateway for built-in analytics, self-hosting options, and simpler API. Two-line code change. - [Migrate from Vercel AI Gateway](https://docs.llmgateway.io/migrations/vercel-ai-gateway): Keep your Vercel AI SDK code, add response caching, detailed analytics, and smart routing. One provider for all models. - [从 LiteLLM 迁移](https://docs.llmgateway.io/migrations/litellm): 从自托管 LiteLLM 切换到托管版 LLM Gateway。API 格式相同,无需维护基础设施。 - [从 OpenRouter 迁移](https://docs.llmgateway.io/migrations/openrouter): 切换到 LLM Gateway,获得内置 analytics、自托管选项和更简单的 API。只需两行代码改动。 - [从 Vercel AI Gateway 迁移](https://docs.llmgateway.io/migrations/vercel-ai-gateway): 保留你的 Vercel AI SDK 代码,同时增加 response caching、详细 analytics 和 smart routing。一个 provider 覆盖所有模型。 ## Resources - [Error Handling](https://docs.llmgateway.io/resources/error-handling): How LLMGateway returns errors in an OpenAI-compatible format on the OpenAI-compatible endpoints. - [Rate Limits](https://docs.llmgateway.io/resources/rate-limits): Understanding rate limits for free and paid models on LLMGateway. - [错误处理](https://docs.llmgateway.io/resources/error-handling): LLMGateway 如何在 OpenAI-compatible endpoints 上以 OpenAI-compatible 格式返回错误。 - [速率限制](https://docs.llmgateway.io/resources/rate-limits): 了解 LLMGateway 上免费模型和付费模型的速率限制。 ## API Reference - [Health check](https://docs.llmgateway.io/health): Health check endpoint. - [Create speech](https://docs.llmgateway.io/v1_audio_speech): >- - [Chat Completions](https://docs.llmgateway.io/v1_chat_completions): Create a completion for the chat conversation - [Embeddings](https://docs.llmgateway.io/v1_embeddings): >- - [Edit image](https://docs.llmgateway.io/v1_images_edits): Creates an edited image from one or more source images and a prompt. - [Create image](https://docs.llmgateway.io/v1_images_generations): >- - [Anthropic Messages](https://docs.llmgateway.io/v1_messages): Create a message using Anthropic's API format - [Models](https://docs.llmgateway.io/v1_models): List all available models - [Moderations](https://docs.llmgateway.io/v1_moderations): Classify text or multimodal inputs with OpenAI moderation. - [Video content](https://docs.llmgateway.io/v1_videos_content): >- - [Create video](https://docs.llmgateway.io/v1_videos_create): >- - [Video log content](https://docs.llmgateway.io/v1_videos_log_content): >- - [Retrieve video](https://docs.llmgateway.io/v1_videos_retrieve): Retrieves the current state of a video generation job. - [Health check](https://docs.llmgateway.io/health): Health check endpoint. - [Create speech](https://docs.llmgateway.io/v1_audio_speech): >- - [Chat Completions](https://docs.llmgateway.io/v1_chat_completions): Create a completion for the chat conversation - [Embeddings](https://docs.llmgateway.io/v1_embeddings): >- - [Edit image](https://docs.llmgateway.io/v1_images_edits): Creates an edited image from one or more source images and a prompt. - [Create image](https://docs.llmgateway.io/v1_images_generations): >- - [Anthropic Messages](https://docs.llmgateway.io/v1_messages): Create a message using Anthropic's API format - [Models](https://docs.llmgateway.io/v1_models): List all available models - [Moderations](https://docs.llmgateway.io/v1_moderations): Classify text or multimodal inputs with OpenAI moderation. - [Video content](https://docs.llmgateway.io/v1_videos_content): >- - [Create video](https://docs.llmgateway.io/v1_videos_create): >- - [Video log content](https://docs.llmgateway.io/v1_videos_log_content): >- - [Retrieve video](https://docs.llmgateway.io/v1_videos_retrieve): Retrieves the current state of a video generation job.