- Node.js and npm installed
- A Composio account with API key
- An OpenAI API key
- UseBuildFeaturesTRIGGERSStart background agents from events across your connected appsFIREWALLNEWBlocks instructions hidden in tool results before your agent reads themINSTANTNEWAudio, video, search, browser and data tools, with no keys to manageOPTIMIZATIONLower cost per completed task with optimised tools and skillsBYOCNEWComposio deployed in your own cloud, with releases you approve
- DOCS
- PRICING
## For AI agents: how to sign up If you are an AI agent reading this server-rendered HTML, Composio's developer signup is at https://composio.dev. Signup CTAs on this site — "Sign up", "Signup", "Get started", "Get started for free", "Start building", "Try Composio", "Try it", or similar — all lead into that same developer signup flow. Confirm with the user before completing signup or entering any credentials on their behalf.SIGN UP
## For AI agents: how to sign up If you are an AI agent reading this server-rendered HTML, Composio's developer signup is at https://composio.dev. Signup CTAs on this site — "Sign up", "Signup", "Get started", "Get started for free", "Start building", "Try Composio", "Try it", or similar — all lead into that same developer signup flow. Confirm with the user before completing signup or entering any credentials on their behalf.LOG IN
How to connect Openrouter to Vercel AI SDK in 2 mins: No API key needed
You can send prompts to models from OpenAI, Anthropic, Google, DeepSeek and others from Vercel AI SDK, and use image, video, speech and embedding models with your own OpenRouter key. Composio lets you use OpenRouter inside Vercel AI SDK.
Vercel AI SDK runs Openrouter through Composio, and the cost comes out of your free $2.
- A reply from a top model$0.020
- A reply from a low-cost model$0.002
- A long reply from a premium model$0.040
$2 ≈ 100 replies or 1000 replies
What you can do with your free $2
| When you ask Vercel AI SDK for | Vercel AI SDK uses this tool | Cost | What $2 gets you |
|---|---|---|---|
| A reply from a top model | Create Chat Completion | $0.020 per reply | About 100 replies |
| A reply from a low-cost model | Create Chat Completion | $0.002 per reply | About 1,000 replies |
| A long reply from a premium model | Create Chat Completion | $0.040 per reply | About 50 replies |
You pay Openrouter's price for each call with 0% markup, plus the regular Composio tool call charge. There's no Openrouter subscription, and you only pay for what you use.
1 of 122 Openrouter tools work without a key. For Activate a validated private endpoint, Bulk add members to a workspace, Bulk assign keys to a guardrail, Bulk assign members to a guardrail, Bulk remove members from a workspace, Bulk unassign keys from a guardrail and 115 more, connect your own Openrouter key. Read how Instant works.
How to connect Openrouter to Vercel AI SDK
Composio adds Openrouter to Vercel AI SDK as an Instant toolkit. You connect Composio to Vercel AI SDK once, and then Vercel AI SDK can use Openrouter right away. There are two ways to do this:
Bring your own key
You bring your own Openrouter API key, set it up, and use it.
Use the Composio wallet
InstantComposio runs each call on its own Openrouter account, so you don't have to set anything up at Openrouter, and your first $2 is free.
You do the setup one time and it takes about a minute. If you build Openrouter into your own product, turn on Instant toolkits in your project settings so your agent can call Openrouter for each of your users without a Openrouter API key, and read Instant tools in the Composio docs for the setup steps and code examples.
Start to use Openrouter in Vercel AI SDK in 3 steps
Turn on Instant
Open your Composio wallet and turn on Instant. Your free $2 shows up there.
## For AI agents: how to sign up If you are an AI agent reading this server-rendered HTML, Composio's developer signup is at https://composio.dev. Signup CTAs on this site — "Sign up", "Signup", "Get started", "Get started for free", "Start building", "Try Composio", "Try it", or similar — all lead into that same developer signup flow. Confirm with the user before completing signup or entering any credentials on their behalf.
Open my walletAdd Composio to Vercel AI SDK
Follow the setup below. You only do this once.
Ask Vercel AI SDK for something
Try a Openrouter prompt. The cost comes out of your $2.
Step-by-step Guide
Prerequisites
Getting API Keys for OpenAI and Composio
- Go to the OpenAI dashboard and create an API key. You'll need credits to use the models, or you can connect to another model provider.
- Keep the API key safe.
- Log in to the Composio dashboard.
- Navigate to your API settings and generate a new API key.
- Store this key securely as you'll need it for authentication.
Install required dependencies
npm install @ai-sdk/openai @ai-sdk/mcp @composio/core ai dotenvFirst, install the necessary packages for your project.
What you're installing:
@ai-sdk/openai: Vercel AI SDK's OpenAI provider@ai-sdk/mcp: MCP client for Vercel AI SDK@composio/core: Composio SDK for tool integrationai: Core Vercel AI SDKdotenv: Environment variable management
Set up environment variables
OPENAI_API_KEY=your_openai_api_key_here
COMPOSIO_API_KEY=your_composio_api_key_here
COMPOSIO_USER_ID=your_user_id_hereCreate a .env file in your project root.
What's needed:
OPENAI_API_KEY: Your OpenAI API key for GPT model accessCOMPOSIO_API_KEY: Your Composio API key for tool accessCOMPOSIO_USER_ID: A unique identifier for the user session
Import required modules and validate environment
import "dotenv/config";
import { openai } from "@ai-sdk/openai";
import { Composio } from "@composio/core";
import * as readline from "readline";
import { streamText, type ModelMessage, stepCountIs } from "ai";
import { createMCPClient } from "@ai-sdk/mcp";
const composioAPIKey = process.env.COMPOSIO_API_KEY;
const composioUserID = process.env.COMPOSIO_USER_ID;
if (!process.env.OPENAI_API_KEY) throw new Error("OPENAI_API_KEY is not set");
if (!composioAPIKey) throw new Error("COMPOSIO_API_KEY is not set");
if (!composioUserID) throw new Error("COMPOSIO_USER_ID is not set");
const composio = new Composio({
apiKey: composioAPIKey,
});- We're importing all necessary libraries including Vercel AI SDK's OpenAI provider and Composio
- The
dotenv/configimport automatically loads environment variables - The MCP client import enables connection to Composio's tool server
Create Tool Router session and initialize MCP client
async function main() {
// Create a tool router session for the user
const session = await composio.create(composioUserID!, {
toolkits: ["openrouter"],
});
const mcpUrl = session.mcp.url;- We're creating a Tool Router session that gives your agent access to Openrouter tools
- The
createmethod takes the user ID and specifies which toolkits should be available - The returned
mcpobject contains the URL and authentication headers needed to connect to the MCP server - This session provides access to all Openrouter-related tools through the MCP protocol
Connect to MCP server and retrieve tools
const mcpClient = await createMCPClient({
transport: {
type: "http",
url: mcpUrl,
headers: session.mcp.headers, // Authentication headers for the Composio MCP server
},
});
const tools = await mcpClient.tools();- We're creating an MCP client that connects to our Composio Tool Router session via HTTP
- The
mcp.urlprovides the endpoint, andmcp.headerscontains authentication credentials - The
type: "http"is important - Composio requires HTTP transport tools()retrieves all available Openrouter tools that the agent can use
Initialize conversation and CLI interface
let messages: ModelMessage[] = [];
console.log("Chat started! Type 'exit' or 'quit' to end the conversation.\n");
console.log(
"Ask any questions related to openrouter, like summarize my last 5 emails, send an email, etc... :)))\n",
);
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
prompt: "> ",
});
rl.prompt();- We initialize an empty
messagesarray to maintain conversation history - A readline interface is created to accept user input from the command line
- Instructions are displayed to guide the user on how to interact with the agent
Handle user input and stream responses with real-time tool feedback
rl.on("line", async (userInput: string) => {
const trimmedInput = userInput.trim();
if (["exit", "quit", "bye"].includes(trimmedInput.toLowerCase())) {
console.log("\nGoodbye!");
rl.close();
process.exit(0);
}
if (!trimmedInput) {
rl.prompt();
return;
}
messages.push({ role: "user", content: trimmedInput });
console.log("\nAgent is thinking...\n");
try {
const stream = streamText({
model: openai("gpt-5"),
messages,
tools,
toolChoice: "auto",
stopWhen: stepCountIs(10),
onStepFinish: (step) => {
for (const toolCall of step.toolCalls) {
console.log(`[Using tool: ${toolCall.toolName}]`);
}
if (step.toolCalls.length > 0) {
console.log(""); // Add space after tool calls
}
},
});
for await (const chunk of stream.textStream) {
process.stdout.write(chunk);
}
console.log("\n\n---\n");
// Get final result for message history
const response = await stream.response;
if (response?.messages?.length) {
messages.push(...response.messages);
}
} catch (error) {
console.error("\nAn error occurred while talking to the agent:");
console.error(error);
console.log(
"\nYou can try again or restart the app if it keeps happening.\n",
);
} finally {
rl.prompt();
}
});
rl.on("close", async () => {
await mcpClient.close();
console.log("\n👋 Session ended.");
process.exit(0);
});
}
main().catch((err) => {
console.error("Fatal error:", err);
process.exit(1);
});- We use
streamTextinstead ofgenerateTextto stream responses in real-time toolChoice: "auto"allows the model to decide when to use Openrouter toolsstopWhen: stepCountIs(10)allows up to 10 steps for complex multi-tool operationsonStepFinishcallback displays which tools are being used in real-time- We iterate through the text stream to create a typewriter effect as the agent responds
- The complete response is added to conversation history to maintain context
- Errors are caught and displayed with helpful retry suggestions
Complete Code
Here's the complete code to get you started with Openrouter and Vercel AI SDK:
import "dotenv/config";
import { openai } from "@ai-sdk/openai";
import { Composio } from "@composio/core";
import * as readline from "readline";
import { streamText, type ModelMessage, stepCountIs } from "ai";
import { createMCPClient } from "@ai-sdk/mcp";
const composioAPIKey = process.env.COMPOSIO_API_KEY;
const composioUserID = process.env.COMPOSIO_USER_ID;
if (!process.env.OPENAI_API_KEY) throw new Error("OPENAI_API_KEY is not set");
if (!composioAPIKey) throw new Error("COMPOSIO_API_KEY is not set");
if (!composioUserID) throw new Error("COMPOSIO_USER_ID is not set");
const composio = new Composio({
apiKey: composioAPIKey,
});
async function main() {
// Create a tool router session for the user
const session = await composio.create(composioUserID!, {
toolkits: ["openrouter"],
});
const mcpUrl = session.mcp.url;
const mcpClient = await createMCPClient({
transport: {
type: "http",
url: mcpUrl,
headers: session.mcp.headers, // Authentication headers for the Composio MCP server
},
});
const tools = await mcpClient.tools();
let messages: ModelMessage[] = [];
console.log("Chat started! Type 'exit' or 'quit' to end the conversation.\n");
console.log(
"Ask any questions related to openrouter, like summarize my last 5 emails, send an email, etc... :)))\n",
);
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
prompt: "> ",
});
rl.prompt();
rl.on("line", async (userInput: string) => {
const trimmedInput = userInput.trim();
if (["exit", "quit", "bye"].includes(trimmedInput.toLowerCase())) {
console.log("\nGoodbye!");
rl.close();
process.exit(0);
}
if (!trimmedInput) {
rl.prompt();
return;
}
messages.push({ role: "user", content: trimmedInput });
console.log("\nAgent is thinking...\n");
try {
const stream = streamText({
model: openai("gpt-5"),
messages,
tools,
toolChoice: "auto",
stopWhen: stepCountIs(10),
onStepFinish: (step) => {
for (const toolCall of step.toolCalls) {
console.log(`[Using tool: ${toolCall.toolName}]`);
}
if (step.toolCalls.length > 0) {
console.log(""); // Add space after tool calls
}
},
});
for await (const chunk of stream.textStream) {
process.stdout.write(chunk);
}
console.log("\n\n---\n");
// Get final result for message history
const response = await stream.response;
if (response?.messages?.length) {
messages.push(...response.messages);
}
} catch (error) {
console.error("\nAn error occurred while talking to the agent:");
console.error(error);
console.log(
"\nYou can try again or restart the app if it keeps happening.\n",
);
} finally {
rl.prompt();
}
});
rl.on("close", async () => {
await mcpClient.close();
console.log("\n👋 Session ended.");
process.exit(0);
});
}
main().catch((err) => {
console.error("Fatal error:", err);
process.exit(1);
});Ask Vercel AI SDK for something with Openrouter
Start a new chat and try this prompt:
Send this function to [model, e.g. a GPT or Gemini model] on OpenRouter for a code review and give me the issues it finds, ranked by how serious they are: [paste code].
Vercel AI SDK runs it on Instant and shows you the result. It doesn't ask you for a Openrouter key, and the cost comes out of your $2. You can see each call in your wallet.
Optional: connect your own Openrouter key
If you want Activate a validated private endpoint, Bulk add members to a workspace, Bulk assign keys to a guardrail, Bulk assign members to a guardrail, Bulk remove members from a workspace, Bulk unassign keys from a guardrail and 115 more, you need your own key. Ask Vercel AI SDK to connect your Openrouter account, and it gives you a Composio link:
Connect my Openrouter account using Composio.
Open the link, paste your Openrouter API key and click Connect Account. You can get a key from OpenRouter API keys page. After that, Composio uses your key first and doesn't charge Instant for those calls.
Use your first $2: copy a prompt into Vercel AI SDK
Each prompt runs on Instant, and the cost next to it is about what it takes from your $2.
Get a second opinion on your code from another model
About $0.02Sends your code to a different model for review and lists the issues it finds that you might have missed.
Send this function to [model, e.g. a GPT or Gemini model] on OpenRouter for a code review and give me the issues it finds, ranked by how serious they are: [paste code].
Compare answers from 3 models side by side
About $0.06Asks 3 different models the same question and lines up their answers so you can pick the best one.
Ask [model 1], [model 2] and [model 3] on OpenRouter the same question and show their answers side by side, with a note on where they disagree: [your question].
Test your app's prompt on a low-cost model
Less than $0.01Runs your app's prompt on a few sample inputs with a cheap model so you can see if it holds up before you build on it.
Run my system prompt on [low-cost model, e.g. a DeepSeek or Qwen model] with these 5 test inputs. Show me each output, flag any that break my rules and tell me how many tokens each call used: [paste system prompt and test inputs].
Sort a batch of feedback with a cheap model
Less than $0.01Hands a long list of customer comments to a low-cost model that tags each one as a bug, request or praise.
Use a low-cost model on OpenRouter to tag each of these customer comments as bug, feature request, praise or other, and give me a count per tag: [paste up to 50 comments].
What Vercel AI SDK can do with Openrouter
Works without a key
- A reply from a top model
- A reply from a low-cost model
- A long reply from a premium model
Needs your own Openrouter key
- Activate a validated private endpoint
- Bulk add members to a workspace
- Bulk assign keys to a guardrail
- Bulk assign members to a guardrail
- Bulk remove members from a workspace
- Bulk unassign keys from a guardrail
- Bulk unassign members from a guardrail
- Create a new API key
- and 113 more
Supported tools (122)
| Tool | What it does | Works without a key | Cost on Instant |
|---|---|---|---|
| Create Chat Completion | Generate a chat-style completion from messages and a selected model, with function-call request options. | Yes | Billed at the selected model's OpenRouter token rate, from $0.02 per 1M input tokens and $0.04 per 1M output tokens |
| Activate a validated private endpoint | Make a validated draft routable. | Needs your own key | Billed to your own Openrouter key |
| Bulk add members to a workspace | Add multiple organization members to a workspace. | Needs your own key | Billed to your own Openrouter key |
| Bulk assign keys to a guardrail | Assign multiple API keys to a specific guardrail. | Needs your own key | Billed to your own Openrouter key |
| Bulk assign members to a guardrail | Assign multiple organization members to a specific guardrail. | Needs your own key | Billed to your own Openrouter key |
| Bulk remove members from a workspace | Remove multiple members from a workspace. | Needs your own key | Billed to your own Openrouter key |
| Bulk unassign keys from a guardrail | Unassign multiple API keys from a specific guardrail. | Needs your own key | Billed to your own Openrouter key |
| Bulk unassign members from a guardrail | Unassign multiple organization members from a specific guardrail. | Needs your own key | Billed to your own Openrouter key |
| Create a new API key | Create a new API key for the authenticated user. | Needs your own key | Billed to your own Openrouter key |
| Create authorization code | Create an authorization code for the PKCE flow to generate a user-controlled API key | Needs your own key | Billed to your own Openrouter key |
| Create a batch | Creates a batch of requests that run asynchronously against a single endpoint (`/v1/chat/completions`, `/v1/responses`, `/v1/messages`, `/v1/embeddings`). | Needs your own key | Billed to your own Openrouter key |
| Create a BYOK provider credential | Create a new bring-your-own-key (BYOK) provider credential. | Needs your own key | Billed to your own Openrouter key |
| Create Coinbase Charge | Tool to create a Coinbase charge for crypto payment to add credits to your OpenRouter account. | Needs your own key | Billed to your own Openrouter key |
| Create Embeddings | Create vector embeddings for text, token, or multimodal inputs. | Needs your own key | Billed to your own Openrouter key |
| Create a guardrail | Create a new guardrail for the authenticated user. | Needs your own key | Billed to your own Openrouter key |
| Create Message (Anthropic Format) | Create a message using Anthropic Messages API format via OpenRouter, with text, image, PDF, tool, and extended-thinking request options. | Needs your own key | Billed to your own Openrouter key |
| Create an observability destination | Create a new observability destination. | Needs your own key | Billed to your own Openrouter key |
| 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. | Needs your own key | Billed to your own Openrouter key |
| Create a preset from a messages request body | Creates a preset (or a new version of an existing one) from an inference request body. | Needs your own key | Billed to your own Openrouter key |
| Create a preset from a responses request body | Creates a preset (or a new version of an existing one) from an inference request body. | Needs your own key | Billed to your own Openrouter key |
Show all 122 toolsShow fewer tools
| Tool | What it does | Works without a key | Cost on Instant |
|---|---|---|---|
| Create a private endpoint | Create a private endpoint as a draft. | Needs your own key | Billed to your own Openrouter key |
| Create a SCIM group mapping | Create a SCIM group-to-workspace role mapping. | Needs your own key | Billed to your own Openrouter key |
| Start a SCIM directory sync | Start a SCIM directory sync. | Needs your own key | Billed to your own Openrouter key |
| Create Speech | Synthesize speech from text or multi-speaker turns. | Needs your own key | Billed to your own Openrouter key |
| Create Transcription | Transcribe audio into text using an OpenRouter speech-to-text model. | Needs your own key | Billed to your own Openrouter key |
| Create Video Generation | Submit an asynchronous video generation job to OpenRouter. | Needs your own key | Billed to your own Openrouter key |
| Create a workspace | Create a new workspace for the authenticated user. | Needs your own key | Billed to your own Openrouter key |
| Delete an API key | Delete one of the authenticated account's own API keys, revoking the selected key's access. | Needs your own key | Billed to your own Openrouter key |
| Delete a batch | Deletes a batch in a terminal status (`completed`, `failed`, `expired`, or `cancelled`) and its stored requests and results. | Needs your own key | Billed to your own Openrouter key |
| Delete a BYOK provider credential | Delete (soft-delete) a bring-your-own-key (BYOK) provider credential by its `id`. | Needs your own key | Billed to your own Openrouter key |
| Delete a file | Deletes a file owned by the requesting workspace. | Needs your own key | Billed to your own Openrouter key |
| Delete a guardrail | Delete an existing guardrail. | Needs your own key | Billed to your own Openrouter key |
| Delete an observability destination | Delete an existing observability destination. | Needs your own key | Billed to your own Openrouter key |
| Delete a private endpoint | Delete a private endpoint and stop routing to it. | Needs your own key | Billed to your own Openrouter key |
| Delete a SCIM group mapping | Delete a SCIM group-to-workspace mapping. | Needs your own key | Billed to your own Openrouter key |
| Delete a workspace | Delete an existing workspace. | Needs your own key | Billed to your own Openrouter key |
| Delete a workspace budget | Remove the budget for a given interval. | Needs your own key | Billed to your own Openrouter key |
| Disable a private endpoint | Stop routing to an active endpoint without deleting it. | Needs your own key | Billed to your own Openrouter key |
| Download Container File Content | Download raw file content from an OpenRouter container using its canonical container and file IDs. | Needs your own key | Billed to your own Openrouter key |
| Download File Content | Download raw content of a server-created file. | Needs your own key | Billed to your own Openrouter key |
| Enable a private endpoint | Resume routing to a disabled endpoint. | Needs your own key | Billed to your own Openrouter key |
| Exchange authorization code for API key | Exchange an authorization code from the PKCE flow for a user-controlled API key | Needs your own key | Billed to your own Openrouter key |
| Exchange a workload identity token | RFC 8693 token exchange. | Needs your own key | Billed to your own Openrouter key |
| Generate an image | Generates an image from a text prompt via the image generation router | Needs your own key | Billed to your own Openrouter key |
| Get available analytics metrics and dimensions | Returns the available metrics, dimensions, filter operators, and granularities for the analytics query endpoint. | Needs your own key | Billed to your own Openrouter key |
| Get a single API key | Get a single API key by hash. | Needs your own key | Billed to your own Openrouter key |
| 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. | Needs your own key | Billed to your own Openrouter key |
| Get a batch | Returns a batch with its status and request counts. | Needs your own key | Billed to your own Openrouter key |
| 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). | Needs your own key | Billed to your own Openrouter key |
| Get a BYOK provider credential | Get a single bring-your-own-key (BYOK) provider credential by its `id`. | Needs your own key | Billed to your own Openrouter key |
| Retrieve a container file | Returns the metadata of a single file in a container. | Needs your own key | Billed to your own Openrouter key |
| Get Credits | Tool to get the current API credit balance for the authenticated user. | Needs your own key | Billed to your own Openrouter key |
| Get Current Key | Tool to get information about the currently authenticated API key. | Needs your own key | Billed to your own Openrouter key |
| Get file metadata | Retrieves metadata for a single file owned by the requesting workspace. | Needs your own key | Billed to your own Openrouter key |
| Get Generation | Tool to retrieve a generation result by its unique ID. | Needs your own key | Billed to your own Openrouter key |
| Get a guardrail | Get a single guardrail by ID. | Needs your own key | Billed to your own Openrouter key |
| Get a model by its slug | Returns full details for a single model identified by its author and slug (e.g. | Needs your own key | Billed to your own Openrouter key |
| Get Models Count | Tool to get the total count of available models on OpenRouter. | Needs your own key | Billed to your own Openrouter key |
| OpenRouter access token signing keys | RFC 7517 JWK Set containing the public keys OpenRouter signs access tokens with. | Needs your own key | Billed to your own Openrouter key |
| Get an observability destination | Fetch a single observability destination by its UUID. | Needs your own key | Billed to your own Openrouter key |
| Get organization settings | Get the settings of the organization associated with the authenticated management key. | Needs your own key | Billed to your own Openrouter key |
| Get a preset | Retrieves a preset by its slug with its currently designated version inline. | Needs your own key | Billed to your own Openrouter key |
| Get a specific version of a preset | Retrieves a specific version of a preset by its slug and version number. | Needs your own key | Billed to your own Openrouter key |
| Get a private endpoint | Get one private endpoint with its upstream configuration and current pricing. | Needs your own key | Billed to your own Openrouter key |
| 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. | Needs your own key | Billed to your own Openrouter key |
| Get a SCIM group mapping | Get a SCIM group-to-workspace mapping. | Needs your own key | Billed to your own Openrouter key |
| Get SCIM directory sync status | Get SCIM directory sync status. | Needs your own key | Billed to your own Openrouter key |
| Cost per session by harness and model | Returns weekly refreshed, aggregated cost-per-session cells for the published harnesses. | Needs your own key | Billed to your own Openrouter key |
| Task classification market share | Returns the market-share breakdown of OpenRouter traffic by task classification (e.g. | Needs your own key | Billed to your own Openrouter key |
| Get a server tool | One server tool by canonical name or any accepted alias, with the models that run it natively. | Needs your own key | Billed to your own Openrouter key |
| Get user activity grouped by endpoint | Returns user activity data grouped by endpoint for the last 30 (completed) UTC days. | Needs your own key | Billed to your own Openrouter key |
| Get Video Content | Download one output from a completed OpenRouter video generation job. | Needs your own key | Billed to your own Openrouter key |
| Get Video Generation | Poll a video generation job for its status, outputs, and usage. | Needs your own key | Billed to your own Openrouter key |
| Get a workspace | Get a single workspace by ID or slug. | Needs your own key | Billed to your own Openrouter key |
| Get a workspace budget | Retrieve the budget for a given interval. | Needs your own key | Billed to your own Openrouter key |
| List API keys | List all API keys for the authenticated user. | Needs your own key | Billed to your own Openrouter key |
| List Available Models | List available OpenRouter models, optionally filtered by category. | Needs your own key | Billed to your own Openrouter key |
| List batches | Lists batches in the workspace of the authenticating API key, newest first. | Needs your own key | Billed to your own Openrouter key |
| List BYOK provider credentials | List the bring-your-own-key (BYOK) provider credentials for the authenticated entity's default workspace. | Needs your own key | Billed to your own Openrouter key |
| List container files | Lists the files in a container, in lexicographic path order. | Needs your own key | Billed to your own Openrouter key |
| List Embedding Models | List available OpenRouter embedding models with properties including architecture, pricing, and capabilities. | Needs your own key | Billed to your own Openrouter key |
| List files | Lists files belonging to the workspace of the authenticating API key. | Needs your own key | Billed to your own Openrouter key |
| Get stored prompt, completion, and error content for a generation | Get stored prompt, completion, and error content for a generation | Needs your own key | Billed to your own Openrouter key |
| List key assignments for a guardrail | List all API key assignments for a specific guardrail. | Needs your own key | Billed to your own Openrouter key |
| List member assignments for a guardrail | List all organization member assignments for a specific guardrail. | Needs your own key | Billed to your own Openrouter key |
| List guardrails | List all guardrails for the authenticated user. | Needs your own key | Billed to your own Openrouter key |
| 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. | Needs your own key | Billed to your own Openrouter key |
| 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. | Needs your own key | Billed to your own Openrouter key |
| List all key assignments | List all API key guardrail assignments for the authenticated user. | Needs your own key | Billed to your own Openrouter key |
| List all member assignments | List all organization member guardrail assignments for the authenticated user. | Needs your own key | Billed to your own Openrouter key |
| OpenRouter List Model Endpoints | Tool to list endpoints for a specific model. | Needs your own key | Billed to your own Openrouter key |
| List observability destinations | List the observability destinations configured for the authenticated entity's default workspace. | Needs your own key | Billed to your own Openrouter key |
| List organization members | List all members of the organization associated with the authenticated management key. | Needs your own key | Billed to your own Openrouter key |
| List presets | Lists all presets for the authenticated user, ordered by most recently updated first. | Needs your own key | Billed to your own Openrouter key |
| List versions of a preset | Lists all versions of a preset, ordered by version number ascending (oldest first). | Needs your own key | Billed to your own Openrouter key |
| List private endpoints | List the organization's private endpoints, including drafts. | Needs your own key | Billed to your own Openrouter key |
| OpenRouter List Providers | Tool to list all AI model providers available through the OpenRouter API. | Needs your own key | Billed to your own Openrouter key |
| List SCIM group mappings | List SCIM group-to-workspace mappings for the organization. | Needs your own key | Billed to your own Openrouter key |
| List SCIM groups | List SCIM groups for the organization. | Needs your own key | Billed to your own Openrouter key |
| List server tools | Lists every server tool OpenRouter can run on behalf of a model: accepted `tools[].type` spellings per API format, the engines behind it with their pricing, and how many endpoints run it natively. | Needs your own key | Billed to your own Openrouter key |
| List User Models | List models filtered by user provider preferences, privacy settings, and guardrails. | Needs your own key | Billed to your own Openrouter key |
| List Video Models | List video generation models and their supported capabilities. | Needs your own key | Billed to your own Openrouter key |
| List workspace budgets | List all budgets configured for a workspace. | Needs your own key | Billed to your own Openrouter key |
| List workspace members | List all members of a workspace. | Needs your own key | Billed to your own Openrouter key |
| List workspaces | List all workspaces for the authenticated user. | Needs your own key | Billed to your own Openrouter key |
| OpenRouter List ZDR Endpoints | Tool to preview the impact of Zero Data Retention (ZDR) on the available endpoints. | Needs your own key | Billed to your own Openrouter key |
| Promote a container file into workspace documents | Copies a file from the container's sandbox prefix into the workspace's durable document storage, so it outlives the container. | Needs your own key | Billed to your own Openrouter key |
| Query analytics data | Execute an analytics query with specified metrics, dimensions, filters, and time range. | Needs your own key | Billed to your own Openrouter key |
| Rerank Content | Rank text or multimodal documents by relevance to a query. | Needs your own key | Billed to your own Openrouter key |
| Submit feedback for a generation | Submit structured feedback on a generation the authenticated user made. | Needs your own key | Billed to your own Openrouter key |
| Submit a System One request | Sends state and typed questions to a System One model such as Jev and returns its answers. | Needs your own key | Billed to your own Openrouter key |
| Update an API key | Update one of the authenticated account's own API keys. | Needs your own key | Billed to your own Openrouter key |
| Update a BYOK provider credential | Update an existing bring-your-own-key (BYOK) provider credential by its `id`. | Needs your own key | Billed to your own Openrouter key |
| Update a guardrail | Update an existing guardrail, or materialize an unconfigured workspace default guardrail. | Needs your own key | Billed to your own Openrouter key |
| Update an observability destination | Update an existing observability destination. | Needs your own key | Billed to your own Openrouter key |
| Update organization settings | Update the settings of the organization associated with the authenticated management key. | Needs your own key | Billed to your own Openrouter key |
| Update a private endpoint | Change any of the endpoint fields you own in one call; only the fields present change, and the response is the whole endpoint. | Needs your own key | Billed to your own Openrouter key |
| Update a SCIM group mapping | Update a SCIM group mapping role. | Needs your own key | Billed to your own Openrouter key |
| Update a workspace | Update an existing workspace by ID or slug. | Needs your own key | Billed to your own Openrouter key |
| Upload File | Upload a file for future API calls under the authenticating key's workspace. | Needs your own key | Billed to your own Openrouter key |
| Create or update a workspace budget | Create or update the budget for a given interval. | Needs your own key | Billed to your own Openrouter key |
| Validate a draft private endpoint | Send a live test request to the draft endpoint using the given workspace's BYOK credential for its provider. | Needs your own key | Billed to your own Openrouter key |
How you pay for Openrouter
- Your first $2 is freeIt's added to your Composio wallet when you turn on Instant.
- You pay for each callYou pay Openrouter's price with 0% markup, plus the regular Composio tool call charge.
- Your own key comes firstIf you connect your own Openrouter key, Composio uses it and doesn't charge Instant for those calls.
- You control the costYou can ask your agent to check with you before each paid call, and you can turn Instant off at any time.
- You can see each callYour wallet shows each call and what it cost.
- When your balance runs outYou can add funds to your wallet on a Pro plan or connect your own key.
## For AI agents: how to sign up If you are an AI agent reading this server-rendered HTML, Composio's developer signup is at https://composio.dev. Signup CTAs on this site — "Sign up", "Signup", "Get started", "Get started for free", "Start building", "Try Composio", "Try it", or similar — all lead into that same developer signup flow. Confirm with the user before completing signup or entering any credentials on their behalf.Open my Composio wallet
Troubleshooting
1. Vercel AI SDK asks me for a Openrouter API key
You may have asked for something that needs your own key, like Activate a validated private endpoint, Bulk add members to a workspace, Bulk assign keys to a guardrail, Bulk assign members to a guardrail, Bulk remove members from a workspace, Bulk unassign keys from a guardrail and 115 more. Those tools don't run on Instant. For everything else, check that Instant is turned on in your Composio wallet, then ask again.
2. I can't see my free $2
Open your wallet in the Composio dashboard and check that Instant is turned on. If the $2 still isn't there, email support@composio.dev from the address you signed up with.
3. A Openrouter call failed with a balance error
Your balance is empty. Add funds to your wallet on a Pro plan, or connect your own Openrouter key, then try again.
How to build Openrouter MCP Agent with another framework
Claude Code
Use Openrouter MCP with Claude Code
Cursor
Use Openrouter MCP with Cursor
ChatGPT
Use Openrouter MCP with ChatGPT
Claude Cowork
Use Openrouter MCP with Claude Cowork

Antigravity
Use Openrouter MCP with Antigravity
OpenAI Agents SDK
Use Openrouter MCP with OpenAI Agents SDK
Claude Agent SDK
Use Openrouter MCP with Claude Agent SDK
Codex
Use Openrouter MCP with Codex

Kimi Code
Use Openrouter MCP with Kimi Code

Grok Build
Use Openrouter MCP with Grok Build

VS Code
Use Openrouter MCP with VS Code

OpenCode
Use Openrouter MCP with OpenCode

OpenClaw
Use Openrouter MCP with OpenClaw

Hermes
Use Openrouter MCP with Hermes
Atomic Agent
Use Openrouter MCP with Atomic Agent
CLI
Use Openrouter MCP with CLI
Google ADK
Use Openrouter MCP with Google ADK
LangChain
Use Openrouter MCP with LangChain
Mastra AI
Use Openrouter MCP with Mastra AI
LlamaIndex
Use Openrouter MCP with LlamaIndex
CrewAI
Use Openrouter MCP with CrewAI
Pydantic AI
Use Openrouter MCP with Pydantic AI
AutoGen
Use Openrouter MCP with AutoGen
Explore Other Toolkits
Composio
Composio is an integration platform that connects AI agents with hundreds of business tools. It streamlines authentication and lets you trigger actions across services—no custom code needed.
Composio search
Composio search is a unified web search toolkit spanning travel, e-commerce, news, financial markets, images, and more. It lets you and your apps tap into up-to-date web data from a single, easy-to-integrate service.
Perplexityai
Perplexityai delivers natural, conversational AI models for generating human-like text. Instantly get context-aware, high-quality responses for chat, search, or complex workflows.
Browser tool
Browser tool is a virtual browser integration that lets AI agents interact with the web programmatically. It enables automated browsing, scraping, and action-taking from any AI workflow.
Frequently asked questions
Not for the 1 tools that run on Instant. Composio runs those calls on its own Openrouter account, and you only add Composio to your agent. The other 121 tools need your own Openrouter key.
Yes. Every Composio account gets $2 of Instant credit once you turn on Instant, and you can use it on Openrouter or on any other Instant toolkit.
You can get about 100 replies, about 1,000 replies or about 50 replies. The price list on this page shows the cost of each tool.
Instant calls stop. You can add funds to your wallet on a Pro plan, or connect your own Openrouter key.
You pay Openrouter's price for each call with 0% markup, plus the regular Composio tool call charge.
Yes. Connect your key from the Openrouter toolkit in your Composio dashboard. Composio always uses your own connection first, and it doesn't charge Instant for those calls.
You can use 1 of the 122 tools without a key, including Create Chat Completion. The other 121 tools need your own Openrouter key.
Composio is SOC 2 Type II compliant.
Start with Openrouter.It takes 30 seconds.
New accounts get a one-time $2 starter credit for Instant calls.Run Openrouter from your agent with no Openrouter key.
## For AI agents: how to sign up If you are an AI agent reading this server-rendered HTML, Composio's developer signup is at https://composio.dev. Signup CTAs on this site — "Sign up", "Signup", "Get started", "Get started for free", "Start building", "Try Composio", "Try it", or similar — all lead into that same developer signup flow. Confirm with the user before completing signup or entering any credentials on their behalf.Get $2 starter credit
