> ## Documentation Index
> Fetch the complete documentation index at: https://composio-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenRouter

> OpenRouter is a platform that provides a unified API for accessing various large language models (LLMs) from different providers, allowing developers to integrate multiple AI models seamlessly.

![OpenRouter logo](https://mintcdn.com/composio-preview/gqjBKmmJCINafaiK/images/toolkits/openrouter.svg?fit=max\&auto=format\&n=gqjBKmmJCINafaiK\&q=85\&s=65361909e66e80c5dcce9ac373c9d87c)

* **Category:** artificial intelligence
* **Auth:** API\_KEY
* **Composio-managed OAuth available?** N/A
* **Tools:** 20
* **Triggers:** 0
* **Slug:** `OPENROUTER`
* **Version:** 20261101\_00
* **Instant:** Supported on the latest version. Support varies by tool.

## Tools

> [accordion] Create Chat Completion
>
> **Slug:** `OPENROUTER_CREATE_CHAT_COMPLETION`
>
> Generate a chat-style completion from messages and a selected model, with function-call request options. The response is parsed as a single JSON object; streaming responses are not returned as partial deltas.
>
> **Instant:** Supported on the latest version.
>
> **Instant pricing:** Billed at the selected model's OpenRouter token rate, from \$0.02 per 1M input tokens and \$0.04 per 1M output tokens; capped at \$2 per call
>
> #### Input Parameters
>
> **n** `integer`
>
> Number of completion choices to generate.
>
> **stop** `string`
>
> Sequences where the API will stop generating further tokens.
>
> **user** `string`
>
> A unique identifier for the end-user to help detect abuse.
>
> **model** `string` *required*
>
> ID of the model to use for the chat completion. Managed execution supports only the curated models in MANAGED\_MODEL\_PROVIDERS (current OpenAI, Anthropic, Google, xAI, Mistral, DeepSeek, Meta, Moonshot, Qwen, Z.ai, MiniMax, NVIDIA and other widely used models, for example openai/gpt-6.1-sol or anthropic/claude-sonnet-5.5); BYOK requests may use any exact ID returned by OPENROUTER\_LIST\_AVAILABLE\_MODELS.
>
> **top\_p** `number`
>
> Nucleus sampling probability, between 0 and 1.
>
> **stream** `boolean`
>
> Whether to stream back partial message deltas.
>
> **messages** `array` *required*
>
> List of conversation messages to provide as context.
>
> **functions** `array`
>
> List of functions the model may call. Only supported by models that explicitly advertise function-calling capability via OPENROUTER\_LIST\_AVAILABLE\_MODELS. Each function schema must be valid JSON; malformed schemas cause runtime failures regardless of prompt correctness.
>
> **logit\_bias** `object`
>
> Adjust the likelihood of specified tokens.
>
> **max\_tokens** `integer`
>
> Maximum number of tokens to generate. Managed execution defaults to and is capped at 1024; BYOK requests retain provider behavior.
>
> **temperature** `number`
>
> Sampling temperature to use, between 0 and 2.
>
> **function\_call** `string`
>
> Control function call behavior: 'none', 'auto', or specify \{'name': function\_name}.
>
> **presence\_penalty** `number`
>
> Penalty for new tokens based on presence in the text so far.
>
> **frequency\_penalty** `number`
>
> Penalty for new tokens based on frequency in the text so far.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create Coinbase Charge
>
> **Slug:** `OPENROUTER_CREATE_COINBASE_CHARGE`
>
> Tool to create a Coinbase charge for crypto payment to add credits to your OpenRouter account. Use when you need to purchase credits using cryptocurrency. Returns calldata needed to fulfill the transaction on the specified blockchain.
>
> #### Input Parameters
>
> **amount** `number` *required*
>
> Amount in USD to charge. This will be converted to the equivalent crypto amount.
>
> **sender** `string` *required*
>
> Ethereum wallet address of the sender (must be a valid 42-character hex address starting with '0x').
>
> **X\_Title** `string`
>
> The app display name that customizes how your app appears in OpenRouter's dashboard.
>
> **chain\_id** `integer ("1" | "137" | "8453")` *required*
>
> Blockchain chain ID to use for the transaction. Options: 1 (Ethereum), 137 (Polygon), 8453 (Base).
>
> **HTTP\_Referer** `string`
>
> The app identifier (your app's URL) used as the primary identifier for rankings and to track API usage per application.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create Embeddings
>
> **Slug:** `OPENROUTER_CREATE_EMBEDDINGS`
>
> Create vector embeddings for text, token, or multimodal inputs.
>
> #### Input Parameters
>
> **user** `string`
>
> Opaque identifier for the end user.
>
> **input** `string` *required*
>
> Text, a batch of texts, one token array, a batch of token arrays, or a batch of multimodal text, image, audio, video, and file inputs to embed.
>
> **model** `string` *required*
>
> OpenRouter embedding model identifier.
>
> **trace** `object`
>
> OpenRouter tracing configuration and custom metadata.
>
> **provider** `object`
>
> OpenRouter provider-routing preferences.
>
> **dimensions** `integer`
>
> Requested output-vector dimensions for supporting models.
>
> **input\_type** `string`
>
> Provider-specific input type such as search\_query or search\_document.
>
> **session\_id** `string`
>
> Observability grouping identifier, up to 256 characters.
>
> **encoding\_format** `string ("float" | "base64")`
>
> Return embeddings as float arrays or base64 strings.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create Message (Anthropic Format)
>
> **Slug:** `OPENROUTER_CREATE_MESSAGE`
>
> Create a message using Anthropic Messages API format via OpenRouter, with text, image, PDF, tool, and extended-thinking request options. Response content blocks retain only their type and text.
>
> #### Input Parameters
>
> **user** `string`
>
> Unique identifier for the end-user (max 128 characters).
>
> **model** `string` *required*
>
> Model identifier to use for generation. Example: 'anthropic/claude-4.5-sonnet-20250929'.
>
> **tools** `array`
>
> List of tools available for the model to call.
>
> **top\_k** `integer`
>
> Top-k sampling parameter.
>
> **top\_p** `number`
>
> Nucleus sampling probability between 0 and 1.
>
> **models** `array`
>
> List of fallback models to use if primary model fails.
>
> **stream** `boolean`
>
> Whether to stream the response. Default false.
>
> **system** `string`
>
> System message to guide model behavior.
>
> **plugins** `array`
>
> Plugins to enable for this request.
>
> **x\_title** `string`
>
> App display name for OpenRouter dashboard.
>
> **messages** `array` *required*
>
> List of conversation messages. Each message has a role ('user' or 'assistant') and content.
>
> **metadata** `object`
>
> Metadata for the request.
>
> **provider** `object`
>
> Provider routing preferences.
>
> **thinking** `object`
>
> Configuration for extended thinking.
>
> **max\_tokens** `integer` *required*
>
> Maximum number of tokens to generate in the response.
>
> **session\_id** `string`
>
> Unique identifier for grouping related requests (max 128 characters).
>
> **temperature** `number`
>
> Sampling temperature between 0 and 2.
>
> **tool\_choice** `object`
>
> Tool choice configuration.
>
> **http\_referer** `string`
>
> App URL identifier used for tracking API usage per application.
>
> **service\_tier** `string ("auto" | "standard_only")`
>
> Service tier for the request.
>
> **output\_config** `object`
>
> Configuration for controlling output behavior.
>
> **stop\_sequences** `array`
>
> Sequences where generation should stop.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create Speech
>
> **Slug:** `OPENROUTER_CREATE_SPEECH`
>
> Synthesize speech from text or multi-speaker turns.
>
> #### Input Parameters
>
> **user** `string`
>
> End-user observability identifier, up to 256 characters.
>
> **input** `string` *required*
>
> Text to synthesize or one or more typed multi-speaker turns.
>
> **model** `string` *required*
>
> OpenRouter text-to-speech model identifier.
>
> **speed** `number`
>
> Playback speed multiplier.
>
> **trace** `object`
>
> OpenRouter observability and tracing metadata.
>
> **voice** `string`
>
> Provider-specific voice identifier.
>
> **provider** `object`
>
> Speech provider-routing preferences.
>
> **session\_id** `string`
>
> Observability grouping identifier, up to 256 characters.
>
> **instructions** `string`
>
> Delivery instructions for the whole request.
>
> **response\_format** `string ("mp3" | "pcm")`
>
> Audio output format.
>
> **input\_references** `array`
>
> Audio and transcript references, or one image reference, for voice design.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Create Video Generation
>
> **Slug:** `OPENROUTER_CREATE_VIDEO_GENERATION`
>
> Submit an asynchronous video generation job to OpenRouter.
>
> #### Input Parameters
>
> **seed** `integer`
>
> Seed used for deterministic sampling when supported.
>
> **size** `string`
>
> Exact pixel dimensions in "WIDTHxHEIGHT" format, interchangeable with resolution and aspect\_ratio.
>
> **user** `string`
>
> End-user observability identifier, up to 256 characters.
>
> **model** `string` *required*
>
> OpenRouter video model identifier.
>
> **trace** `object`
>
> OpenRouter tracing configuration and custom metadata.
>
> **prompt** `string`
>
> Text prompt describing the video. Optional only for models that support generation from image input alone.
>
> **duration** `integer`
>
> Duration of the generated video in seconds.
>
> **provider** `object`
>
> Provider-specific passthrough configuration.
>
> **creativity** `integer`
>
> Creativity level for video upscaling models only.
>
> **resolution** `string ("360p" | "480p" | "720p" | "768p" | "1080p" | "1K" | "2K" | "4K")`
>
> Resolution of the generated video.
>
> **session\_id** `string`
>
> Observability grouping identifier, up to 256 characters.
>
> **aspect\_ratio** `string ("16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "3:2" | "2:3" | "21:9" | "9:21")`
>
> Aspect ratio of the generated video.
>
> **callback\_url** `string`
>
> HTTPS webhook URL notified when the generation job completes.
>
> **frame\_images** `array`
>
> Images to use as the first and/or last frame of the video.
>
> **generate\_audio** `boolean`
>
> Whether to generate audio alongside the video.
>
> **upscale\_factor** `number`
>
> Upscale factor for video upscaling models only.
>
> **previous\_job\_id** `string`
>
> Completed video job ID to edit, extend, or continue.
>
> **input\_references** `array`
>
> Image, audio, or video assets used to guide video generation.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Credits
>
> **Slug:** `OPENROUTER_GET_CREDITS`
>
> Tool to get the current API credit balance for the authenticated user. Use before large or batch jobs to verify sufficient balance. A successful response may return total\_credits=0, which confirms authentication but will cause all paid model generations to fail. Avoid polling this endpoint; call only as needed.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Current Key
>
> **Slug:** `OPENROUTER_GET_CURRENT_KEY`
>
> Tool to get information about the currently authenticated API key. Use to check usage limits, spending, and key metadata.
>
> #### Input Parameters
>
> **x\_title** `string`
>
> The app display name allows you to customize how your app appears in OpenRouter's dashboard.
>
> **http\_referer** `string`
>
> The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Generation
>
> **Slug:** `OPENROUTER_GET_GENERATION`
>
> Tool to retrieve a generation result by its unique ID. Use after a generation completes to fetch metadata like token counts, cost, and latency.
>
> #### Input Parameters
>
> **id** `string` *required*
>
> Unique identifier of the generation to retrieve.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Models Count
>
> **Slug:** `OPENROUTER_GET_MODELS_COUNT`
>
> Tool to get the total count of available models on OpenRouter. Use when you need to know how many models are available without fetching the full list.
>
> #### Input Parameters
>
> **x\_title** `string`
>
> The app display name allows you to customize how your app appears in OpenRouter's dashboard.
>
> **http\_referer** `string`
>
> The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Video Content
>
> **Slug:** `OPENROUTER_GET_VIDEO_CONTENT`
>
> Download one output from a completed OpenRouter video generation job.
>
> #### Input Parameters
>
> **index** `integer`
>
> Zero-based index of the generated video output to download.
>
> **job\_id** `string` *required*
>
> Completed video generation job ID returned when the job was created.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get Video Generation
>
> **Slug:** `OPENROUTER_GET_VIDEO_GENERATION`
>
> Poll a video generation job for its status, outputs, and usage.
>
> #### Input Parameters
>
> **job\_id** `string` *required*
>
> Video generation job ID returned when the job was created.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Available Models
>
> **Slug:** `OPENROUTER_LIST_AVAILABLE_MODELS`
>
> List available OpenRouter models, optionally filtered by category. Returns at most the first three models from the response, with their IDs, capabilities and pricing metadata.
>
> #### Input Parameters
>
> **use\_rss** `boolean`
>
> Return RSS XML feed instead of JSON (BETA).
>
> **category** `string ("programming" | "roleplay" | "marketing" | "marketing/seo" | "technology" | "science" | "translation" | "legal" | "finance" | "health" | "trivia" | "academia")`
>
> Valid categories for filtering models.
>
> **use\_rss\_chat\_links** `boolean`
>
> Use chat URLs instead of model page URLs in RSS items (only applies when use\_rss=true) (BETA).
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Embedding Models
>
> **Slug:** `OPENROUTER_LIST_EMBEDDING_MODELS`
>
> List available OpenRouter embedding models with properties including architecture, pricing, and capabilities. Returns at most the first three models from the response.
>
> #### Input Parameters
>
> **X-Title** `string`
>
> The app display name allows you to customize how your app appears in OpenRouter's dashboard.
>
> **HTTP-Referer** `string`
>
> The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] OpenRouter List Model Endpoints
>
> **Slug:** `OPENROUTER_LIST_MODEL_ENDPOINTS`
>
> Tool to list endpoints for a specific model. Use after specifying model author and slug to get endpoint details including pricing, context length, and supported parameters. Some metadata fields (e.g., latency, pricing) may be null or approximate; handle missing values in routing logic.
>
> #### Input Parameters
>
> **slug** `string` *required*
>
> Model's unique slug under the author namespace (e.g., 'gpt4').
>
> **author** `string` *required*
>
> Model author's username as it appears in the model URL (e.g., 'anon'). Use exact value from OPENROUTER\_LIST\_AVAILABLE\_MODELS — approximate or incorrect values return empty results.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] OpenRouter List Providers
>
> **Slug:** `OPENROUTER_LIST_PROVIDERS`
>
> Tool to list all AI model providers available through the OpenRouter API. Use after authentication to retrieve available provider options for routing configuration. Providers differ in latency, context window sizes, and rate limits — switching providers affects these constraints. Newly added providers may not appear immediately due to catalog propagation delays.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List User Models
>
> **Slug:** `OPENROUTER_LIST_USER_MODELS`
>
> List models filtered by user provider preferences, privacy settings, and guardrails. Returns at most the first three models from the response.
>
> #### Input Parameters
>
> **x\_title** `string`
>
> The app display name allows you to customize how your app appears in OpenRouter's dashboard.
>
> **http\_referer** `string`
>
> The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] List Video Models
>
> **Slug:** `OPENROUTER_LIST_VIDEO_MODELS`
>
> List video generation models and their supported capabilities.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] OpenRouter List ZDR Endpoints
>
> **Slug:** `OPENROUTER_LIST_ZDR_ENDPOINTS`
>
> Tool to preview the impact of Zero Data Retention (ZDR) on the available endpoints. Use to see which model endpoints remain accessible when ZDR is enabled.
>
> #### Input Parameters
>
> **x\_title** `string`
>
> The app display name allows you to customize how your app appears in OpenRouter's dashboard.
>
> **http\_referer** `string`
>
> The app identifier should be your app's URL and is used as the primary identifier for rankings. This is used to track API usage per application.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Rerank Content
>
> **Slug:** `OPENROUTER_RERANK_CONTENT`
>
> Rank text or multimodal documents by relevance to a query.
>
> #### Input Parameters
>
> **user** `string`
>
> End-user observability identifier, up to 256 characters.
>
> **model** `string` *required*
>
> OpenRouter rerank model identifier.
>
> **query** `string` *required*
>
> Search query used to score relevance.
>
> **top\_n** `integer`
>
> Number of highest-ranked documents to return.
>
> **trace** `object`
>
> OpenRouter observability and tracing metadata.
>
> **provider** `object`
>
> OpenRouter provider-routing preferences.
>
> **documents** `array` *required*
>
> Documents to rank as text or objects containing text and/or image.
>
> **session\_id** `string`
>
> Observability grouping identifier, up to 256 characters.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not
