OpenRouter integration for AI agents.
OpenRouter integration for AI agents with secure authentication and server-side credential injection. Open Connector runs the OAuth, seals the token in an encrypted vault, and serves OpenRouter tools to your agent over MCP or a typed API — credentials injected server-side, every call audited, nothing leaving your infrastructure. Open source (AGPL-3.0) and self-hostable.
Real OpenRouter actions, managed and audited.
Your user connects OpenRouter once; your agent can then the unified interface for LLMs. Find the best models & prices for your prompts — scoped to the OAuth permissions you grant and the tool allowlist you configure. Every action is least-privilege and written to a tamper-evident audit trail.
- 1
Your user grants OpenRouter access once (OAuth) — the token lands in the vault.
- 2
Your agent calls a tool over MCP or the typed API; Open Connector injects the credential server-side.
- 3
Every routed call appends a hash-chained audit record — nothing leaves your infra.
Supported OpenRouter tools.
95 tools are generated from the published OpenRouter catalog. Descriptions are plain text; each action remains subject to its configured authentication and tool allowlist.
Showing 95 tools. All published catalog entries are included in this page's server-rendered HTML.
- Bulk add members to a workspace
- Add multiple organization members to a workspace. Members are assigned the same role they hold in the organization. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Workspaces
- Bulk assign keys to a guardrail
- Assign multiple API keys to a specific guardrail. A key may hold at most one guardrail; assigning replaces any existing assignment. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Guardrails
- Bulk assign members to a guardrail
- Assign multiple organization members to a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Guardrails
- Bulk remove members from a workspace
- Remove multiple members from a workspace. Members with active API keys in the workspace cannot be removed. SCIM-managed members cannot be removed; changes must be made in your identity provider. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Workspaces
- Bulk unassign keys from a guardrail
- Unassign multiple API keys from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Guardrails
- Bulk unassign members from a guardrail
- Unassign multiple organization members from a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Guardrails
- Create speech
- Synthesizes audio from the input text. Returns a raw audio bytestream in the requested format (e.g. mp3, pcm, wav).
- TTS
- Create transcription
- Transcribes audio into text. Accepts base64-encoded audio input as JSON or an OpenAI-style multipart/form-data file upload, and returns the transcribed text.
- STT
- Create a BYOK provider credential
- Create a new bring-your-own-key (BYOK) provider credential. The raw key is encrypted at rest and never returned in API responses. When `workspace_id` is omitted, the credential is created in the default workspace; if that default has been deleted, the request returns a 400 and you must pass `workspace_id` explicitly. Treat the raw key as write-only; it is never returned after creation. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- BYOK
- Deprecated Coinbase Commerce charge endpoint
- Deprecated. The Coinbase APIs used by this endpoint have been deprecated, so Coinbase Commerce charges have been removed. Use the web credits purchase flow instead.
- Credits
- Submit an embedding request
- Submits an embedding request to the embeddings router
- Embeddings
- Create a guardrail
- Create a new guardrail for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Guardrails
- Generate an image
- Generates an image from a text prompt via the image generation router
- Images
- Create a new API key
- Create a new API key for the authenticated user. The plaintext `key` is returned only in this response. Treat it as a write-only, sensitive value; it cannot be retrieved later. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- API Keys
- Create a message
- Creates a message using the Anthropic Messages API format. Supports text, images, PDFs, tools, and extended thinking.
- Anthropic Messages
- Create an observability destination
- Create a new observability destination. A maximum of 5 destinations per type is allowed. Defaults to the authenticated entity's default workspace; use the `workspace_id` body field to scope to a different workspace. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Observability
- Create a preset from a chat-completions request body
- Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
- Presets
- Create a preset from a messages request body
- Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
- Presets
- Create a preset from a responses request body
- Creates a preset (or a new version of an existing one) from an inference request body. Only fields that overlap with the preset config are persisted; other fields (e.g. `messages`, `stream`, `prompt`) are silently ignored.
- Presets
- Submit a rerank request
- Submits a rerank request to the rerank router
- Rerank
- Create a response
- Creates a streaming or non-streaming response using OpenResponses API format
- Responsesbeta.responses
- Create a SCIM group mapping
- Create a SCIM group-to-workspace role mapping. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- SCIM
- Submit a video generation request
- Submits a video generation request and returns a polling URL to check status
- Video Generation
- Create a workspace
- Create a new workspace for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Workspaces
- Delete a BYOK provider credential
- Delete (soft-delete) a bring-your-own-key (BYOK) provider credential by its `id`. The encrypted key material is wiped and the record is marked as deleted. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- BYOK
- Delete a file
- Deletes a file owned by the requesting workspace. Deletion is irreversible.
- Files
- Delete a guardrail
- Delete an existing guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Guardrails
- Delete an API key
- Delete an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- API Keys
- Delete an observability destination
- Delete an existing observability destination. This performs a soft delete. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Observability
- Delete a SCIM group mapping
- Delete a SCIM group-to-workspace mapping. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- SCIM
- Delete a workspace
- Delete an existing workspace. Workspaces with active API keys cannot be deleted; remove the keys first. Deleting the default workspace is currently limited to internal OpenRouter administrators while the capability rolls out; other callers receive a 403. When permitted, it requires `confirm_default_settings_deletion=true` and additionally disables the account’s unscoped inference API keys; management (provisioning) keys are retained. Deleting any workspace permanently deletes its budgets and guardrails and disables its classifiers and broadcast destinations. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Workspaces
- Delete a workspace budget
- Remove the budget for a given interval. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Workspaces
- Download file content
- Downloads the raw bytes of a file. Only files created server-side are downloadable; uploaded files return 400.
- Files
- Get available analytics metrics and dimensions
- Returns the available metrics, dimensions, filter operators, and granularities for the analytics query endpoint. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- beta.Analytics
- Top apps by token usage
- Returns the top public apps on OpenRouter ranked by token usage inside the requested date window, matching the public apps marketplace on openrouter.ai/apps. Token totals are `prompt_tokens + completion_tokens`; hidden and private apps are excluded and traffic from related app aliases is merged into the canonical visible app. `sort=popular` (default) ranks by total token volume inside the window. `sort=trending` ranks by absolute excess token growth: window volume minus the average volume of the three equal-length periods immediately preceding the window. Apps with no excess growth are omitted, so `trending` may return fewer than `limit` rows. Filter with `category` (marketplace category group, e.g. `coding`) or `subcategory` (e.g. `cli-agent`). Ranks are re-numbered 1..N after filtering. Page with `offset` — `rank` stays absolute, so the first row of `offset=50` is `rank: 51`. Authenticate with any valid OpenRouter API key (same key used for inference). Rate-limited to 30 requests/minute per key and 500 requests/day per account. When republishing or quoting this dataset, OpenRouter must be cited as: "Source: OpenRouter (openrouter.ai/apps), as of {as_of}." Token counts come from each upstream provider's own tokenizer, so a token attributed to one app is not directly comparable to a token attributed to another app whose traffic flows through a different provider.
- Datasets
- List Benchmarks
- Unified benchmark endpoint that aggregates scores from multiple benchmark sources (Artificial Analysis, Design Arena, and OpenRouter's own tau-bench, GPQA, and web-search evals). Filter by source to reproduce the exact shapes from the legacy per-source endpoints, or use task_type to find models suited for specific workloads. Use task_type=search (or a search_* benchmark_type) for OpenRouter's search benchmarks, which publish each model's highest-scoring eligible evaluation configuration with same-configuration runs combined by task-weighted mean. Authenticate with any valid OpenRouter API key. Rate-limited to 30 requests/minute per key and 500 requests/day per account.
- Benchmarks
- Get a BYOK provider credential
- Get a single bring-your-own-key (BYOK) provider credential by its `id`. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- BYOK
- Get remaining credits
- Get total credits purchased and used for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Credits
- Get current API key
- Get information on the API key associated with the current authentication session
- API Keys
- Get file metadata
- Retrieves metadata for a single file owned by the requesting workspace.
- Files
- Get request & usage metadata for a generation
- Get request & usage metadata for a generation
- Generations
- Get a guardrail
- Get a single guardrail by ID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Guardrails
- Get a single API key
- Get a single API key by hash. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- API Keys
- Get a model by its slug
- Returns full details for a single model identified by its author and slug (e.g. openai/gpt-4). Supports variant suffixes (e.g. openai/gpt-4:free) and resolves known slug aliases.
- Models
- List all models and their properties
- List all models and their properties
- Models
- Get an observability destination
- Fetch a single observability destination by its UUID. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Observability
- Get a preset
- Retrieves a preset by its slug with its currently designated version inline.
- Presets
- Get a specific version of a preset
- Retrieves a specific version of a preset by its slug and version number.
- Presets
- Daily token totals for top 50 models
- Returns the top 50 public models per day by total token usage on OpenRouter, plus a single aggregated `other` row per day that sums every model outside that top 50. Token totals are `prompt_tokens + completion_tokens`, matching the public rankings chart on openrouter.ai/rankings. Each row is a distinct `(date, model_permaslug)` pair. The `other` row uses the reserved permaslug `other` and is always returned last within its date, so callers can compute `top-50 traffic / total daily traffic` without a second request. Optional filters slice the dataset. `period` (`day`/`week`/`month`) sets the time grain. `modality` and `context_bucket` narrow the exact dataset by output/input modality (or tool-calling activity) and request context length. `category` and `language_type` instead read a sampled, upsampled dataset whose `total_tokens` are weekly-grain estimates — they cannot be combined with each other or with the exact filters, and reject `period=day` with a 400. Authenticate with any valid OpenRouter API key (same key used for inference). Rate-limited to 30 requests/minute per key and 500 requests/day per account. When republishing or quoting this dataset, OpenRouter must be cited as: "Source: OpenRouter (openrouter.ai/rankings), as of {as_of}." Token counts come from each upstream provider's own tokenizer (Anthropic counts are as reported by Anthropic, OpenAI counts are as reported by OpenAI, etc.), so a token in one row is not directly comparable to a token in another row from a different provider.
- Datasets
- Get a SCIM group mapping
- Get a SCIM group-to-workspace mapping. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- SCIM
- Cost per session by harness and model
- Returns weekly refreshed, aggregated cost-per-session cells for the published harnesses. Sessions are never pooled across apps. Medians are of per-session USD spend, and privacy-preserving aggregation never exposes clerk_user_id values or per-session rows. Filter by `app_slug`, `model`, or `turn_range`. Filtering by `model` alone works across apps for harness-vs-harness comparison at a fixed model. Results refresh weekly and include the source snapshot window in `meta`.
- Datasets
- Task classification market share
- Returns the market-share breakdown of OpenRouter traffic by task classification (e.g. code generation, web search, summarization) over a trailing time window. Each classification reports its share of classified sampled requests (`usage_share`) and classified sampled token volume (`token_share`) as fractions between 0 and 1. The unclassified `other` bucket is excluded. Absolute volumes are not exposed because the underlying data is sampled. Each classification also includes a `models` array listing the top models by request volume within that classification, with their within-tag usage and token shares. Classifications are grouped into macro-categories (Code, Data, Agent, General) with aggregate shares provided for each. Authenticate with any valid OpenRouter API key (same key used for inference). Rate-limited to 30 requests/minute per key and 500 requests/day per account. When republishing or quoting this data, cite as: "Source: OpenRouter (openrouter.ai/rankings), as of {as_of}."
- Classifications
- Get user activity grouped by endpoint
- Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. Pass `workspace_id` to scope the response to a single workspace. Pass `group_by=workspace` to split each row per workspace and include `workspace_id` on every item; by default rows are aggregated across workspaces and `workspace_id` is not returned. Activity recorded before workspace resolution existed is permanently attributed to the account default workspace (no backfill is possible). [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Analytics
- Poll video generation status
- Returns job status and content URLs when completed
- Video Generation
- Get a workspace
- Get a single workspace by ID or slug. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Workspaces
- Get a workspace budget
- Retrieve the budget for a given interval. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Workspaces
- List API keys
- List all API keys for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- API Keys
- List BYOK provider credentials
- List the bring-your-own-key (BYOK) provider credentials for the authenticated entity's default workspace. Use the `workspace_id` query parameter to scope the result to a different workspace, or the `provider` query parameter to filter by upstream provider. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- BYOK
- List all embeddings models
- Returns a list of all available embeddings models and their properties
- Embeddings
- List all endpoints for a model
- List all endpoints for a model
- Endpoints
- Preview the impact of ZDR on the available endpoints
- Preview the impact of ZDR on the available endpoints
- Endpoints
- List files
- Lists files belonging to the workspace of the authenticating API key.
- Files
- Get stored prompt, completion, and error content for a generation
- Get stored prompt, completion, and error content for a generation
- Generations
- List key assignments for a guardrail
- List all API key assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Guardrails
- List member assignments for a guardrail
- List all organization member assignments for a specific guardrail. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Guardrails
- List guardrails
- List all guardrails for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Guardrails
- List endpoints for an image model
- Returns the full per-endpoint records for an image model: each endpoint's definitive supported parameters, pricing, and passthrough allowlist.
- Images
- List image generation models
- Lists every image generation model with its top-level supported-parameter superset and a URL to its full per-endpoint records.
- Images
- List all key assignments
- List all API key guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Guardrails
- List all member assignments
- List all organization member guardrail assignments for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Guardrails
- Get total count of available models
- Get total count of available models
- Models
- List models filtered by user provider preferences, privacy settings, and guardrails
- List models filtered by user provider preferences, [privacy settings](https://openrouter.ai/docs/guides/privacy/provider-logging), and [guardrails](https://openrouter.ai/docs/guides/features/guardrails). If requesting through a regional hostname, the results will be filtered to models that satisfy in-region routing for that region.
- Models
- List observability destinations
- List the observability destinations configured for the authenticated entity's default workspace. Use the `workspace_id` query parameter to scope the result to a different workspace. Only destinations with stable release status are surfaced — destinations of other types are excluded. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Observability
- List organization members
- List all members of the organization associated with the authenticated management key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Organization
- List versions of a preset
- Lists all versions of a preset, ordered by version number ascending (oldest first).
- Presets
- List presets
- Lists all presets for the authenticated user, ordered by most recently updated first.
- Presets
- List all providers
- List all providers
- Providers
- List SCIM group mappings
- List SCIM group-to-workspace mappings for the organization. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- SCIM
- List SCIM groups
- List SCIM groups for the organization. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- SCIM
- Download generated video content
- Streams the generated video content from the upstream provider
- Video Generation
- List all video generation models
- Returns a list of all available video generation models and their properties
- Video Generation
- List workspace budgets
- List all budgets configured for a workspace. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Workspaces
- List workspace members
- List all members of a workspace. Returns paginated results. For the default workspace, returns all organization members (implicit membership). [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Workspaces
- List workspaces
- List all workspaces for the authenticated user. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Workspaces
- Query analytics data
- Execute an analytics query with specified metrics, dimensions, filters, and time range. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- beta.Analytics
- Create a chat completion
- Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.
- Chat
- Submit feedback for a generation
- Submit structured feedback on a generation the authenticated user made. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Generations
- Update a BYOK provider credential
- Update an existing bring-your-own-key (BYOK) provider credential by its `id`. Include the `key` field to rotate the raw provider API key in-place (the previous key material is overwritten). [Management key](/docs/guides/overview/auth/management-api-keys) required.
- BYOK
- Update a guardrail
- Update an existing guardrail, or materialize an unconfigured workspace default guardrail. Collection fields use replace semantics: send the full desired set on every update. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Guardrails
- Update an API key
- Update an existing API key. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- API Keys
- Update an observability destination
- Update an existing observability destination. Only the fields provided in the request body are updated. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Observability
- Update a SCIM group mapping
- Update a SCIM group mapping role. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- SCIM
- Update a workspace
- Update an existing workspace by ID or slug. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Workspaces
- Upload a file
- Uploads a file to be referenced in future API calls. The file is stored under the workspace of the authenticating API key. Maximum file size: 100 MB; empty files are rejected. The file type is determined from the file contents — not the filename or the declared content type — and must be a PDF, a PNG/JPEG/GIF/WebP image, a DOCX/XLSX/PPTX document, an MP3/WAV/FLAC/OGG audio file, or UTF-8 text. Text is reported by its structure as `application/json`, `application/x-ndjson`, `text/csv`, `text/markdown`, or `text/plain`.
- Files
- Create or update a workspace budget
- Create or update the budget for a given interval. Budget limits must strictly decrease as the interval narrows (lifetime > monthly > weekly > daily). The optional `include_byok_in_budgets` flag is a workspace-wide setting: when provided it applies to every budget interval for the workspace, not just the interval in this request. Note that a change made here is applied to budget enforcement immediately, but an already-open workspace settings page in the web dashboard may keep showing the previous value until it is reloaded. [Management key](/docs/guides/overview/auth/management-api-keys) required.
- Workspaces
OpenRouter integration, answered
- How do AI agents use OpenRouter through Open Connector?
- Your user connects OpenRouter once with one of its cataloged authentication methods. Open Connector stores the credential in an encrypted vault and exposes OpenRouter tools to your agent over MCP or a typed API, with credentials injected server-side on each call.
- Is this a OpenRouter MCP server?
- Yes. Open Connector can serve OpenRouter as a named MCP server with a scoped allowlist and a per-user connection URL, so any MCP client can call OpenRouter actions with credentials injected server-side.
- Where do OpenRouter credentials live?
- In your own infrastructure. Open Connector keeps credentials in its own vault and injects them at call time, so they never leave your environment.
Give your agents OpenRouter — keep the keys.
Open source, self-hostable, with OpenRouter credentials that never leave your infrastructure. Run it from source today.