Skip to main content
OpenRouter logo
  • 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

Slug: OPENROUTER_CREATE_CHAT_COMPLETIONGenerate 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

integer
Number of completion choices to generate.
string
Sequences where the API will stop generating further tokens.
string
A unique identifier for the end-user to help detect abuse.
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.
number
Nucleus sampling probability, between 0 and 1.
boolean
Whether to stream back partial message deltas.
array
required
List of conversation messages to provide as context.
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.
object
Adjust the likelihood of specified tokens.
integer
Maximum number of tokens to generate. Managed execution defaults to and is capped at 1024; BYOK requests retain provider behavior.
number
Sampling temperature to use, between 0 and 2.
string
Control function call behavior: ‘none’, ‘auto’, or specify {‘name’: function_name}.
number
Penalty for new tokens based on presence in the text so far.
number
Penalty for new tokens based on frequency in the text so far.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: OPENROUTER_CREATE_COINBASE_CHARGETool 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

number
required
Amount in USD to charge. This will be converted to the equivalent crypto amount.
string
required
Ethereum wallet address of the sender (must be a valid 42-character hex address starting with ‘0x’).
string
The app display name that customizes how your app appears in OpenRouter’s dashboard.
integer ("1" | "137" | "8453")
required
Blockchain chain ID to use for the transaction. Options: 1 (Ethereum), 137 (Polygon), 8453 (Base).
string
The app identifier (your app’s URL) used as the primary identifier for rankings and to track API usage per application.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: OPENROUTER_CREATE_EMBEDDINGSCreate vector embeddings for text, token, or multimodal inputs.

Input Parameters

string
Opaque identifier for the end user.
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.
string
required
OpenRouter embedding model identifier.
object
OpenRouter tracing configuration and custom metadata.
object
OpenRouter provider-routing preferences.
integer
Requested output-vector dimensions for supporting models.
string
Provider-specific input type such as search_query or search_document.
string
Observability grouping identifier, up to 256 characters.
string ("float" | "base64")
Return embeddings as float arrays or base64 strings.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: OPENROUTER_CREATE_MESSAGECreate 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

string
Unique identifier for the end-user (max 128 characters).
string
required
Model identifier to use for generation. Example: ‘anthropic/claude-4.5-sonnet-20250929’.
array
List of tools available for the model to call.
integer
Top-k sampling parameter.
number
Nucleus sampling probability between 0 and 1.
array
List of fallback models to use if primary model fails.
boolean
Whether to stream the response. Default false.
string
System message to guide model behavior.
array
Plugins to enable for this request.
string
App display name for OpenRouter dashboard.
array
required
List of conversation messages. Each message has a role (‘user’ or ‘assistant’) and content.
object
Metadata for the request.
object
Provider routing preferences.
object
Configuration for extended thinking.
integer
required
Maximum number of tokens to generate in the response.
string
Unique identifier for grouping related requests (max 128 characters).
number
Sampling temperature between 0 and 2.
object
Tool choice configuration.
string
App URL identifier used for tracking API usage per application.
string ("auto" | "standard_only")
Service tier for the request.
object
Configuration for controlling output behavior.
array
Sequences where generation should stop.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: OPENROUTER_CREATE_SPEECHSynthesize speech from text or multi-speaker turns.

Input Parameters

string
End-user observability identifier, up to 256 characters.
string
required
Text to synthesize or one or more typed multi-speaker turns.
string
required
OpenRouter text-to-speech model identifier.
number
Playback speed multiplier.
object
OpenRouter observability and tracing metadata.
string
Provider-specific voice identifier.
object
Speech provider-routing preferences.
string
Observability grouping identifier, up to 256 characters.
string
Delivery instructions for the whole request.
string ("mp3" | "pcm")
Audio output format.
array
Audio and transcript references, or one image reference, for voice design.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: OPENROUTER_CREATE_VIDEO_GENERATIONSubmit an asynchronous video generation job to OpenRouter.

Input Parameters

integer
Seed used for deterministic sampling when supported.
string
Exact pixel dimensions in “WIDTHxHEIGHT” format, interchangeable with resolution and aspect_ratio.
string
End-user observability identifier, up to 256 characters.
string
required
OpenRouter video model identifier.
object
OpenRouter tracing configuration and custom metadata.
string
Text prompt describing the video. Optional only for models that support generation from image input alone.
integer
Duration of the generated video in seconds.
object
Provider-specific passthrough configuration.
integer
Creativity level for video upscaling models only.
string ("360p" | "480p" | "720p" | "768p" | "1080p" | "1K" | "2K" | "4K")
Resolution of the generated video.
string
Observability grouping identifier, up to 256 characters.
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.
string
HTTPS webhook URL notified when the generation job completes.
array
Images to use as the first and/or last frame of the video.
boolean
Whether to generate audio alongside the video.
number
Upscale factor for video upscaling models only.
string
Completed video job ID to edit, extend, or continue.
array
Image, audio, or video assets used to guide video generation.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: OPENROUTER_GET_CREDITSTool 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

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: OPENROUTER_GET_CURRENT_KEYTool to get information about the currently authenticated API key. Use to check usage limits, spending, and key metadata.

Input Parameters

string
The app display name allows you to customize how your app appears in OpenRouter’s dashboard.
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

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: OPENROUTER_GET_GENERATIONTool 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

string
required
Unique identifier of the generation to retrieve.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: OPENROUTER_GET_MODELS_COUNTTool 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

string
The app display name allows you to customize how your app appears in OpenRouter’s dashboard.
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

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: OPENROUTER_GET_VIDEO_CONTENTDownload one output from a completed OpenRouter video generation job.

Input Parameters

integer
Zero-based index of the generated video output to download.
string
required
Completed video generation job ID returned when the job was created.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: OPENROUTER_GET_VIDEO_GENERATIONPoll a video generation job for its status, outputs, and usage.

Input Parameters

string
required
Video generation job ID returned when the job was created.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: OPENROUTER_LIST_AVAILABLE_MODELSList 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

boolean
Return RSS XML feed instead of JSON (BETA).
string ("programming" | "roleplay" | "marketing" | "marketing/seo" | "technology" | "science" | "translation" | "legal" | "finance" | "health" | "trivia" | "academia")
Valid categories for filtering models.
Use chat URLs instead of model page URLs in RSS items (only applies when use_rss=true) (BETA).

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: OPENROUTER_LIST_EMBEDDING_MODELSList available OpenRouter embedding models with properties including architecture, pricing, and capabilities. Returns at most the first three models from the response.

Input Parameters

string
The app display name allows you to customize how your app appears in OpenRouter’s dashboard.
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

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: OPENROUTER_LIST_MODEL_ENDPOINTSTool 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

string
required
Model’s unique slug under the author namespace (e.g., ‘gpt4’).
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

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: OPENROUTER_LIST_PROVIDERSTool 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

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: OPENROUTER_LIST_USER_MODELSList models filtered by user provider preferences, privacy settings, and guardrails. Returns at most the first three models from the response.

Input Parameters

string
The app display name allows you to customize how your app appears in OpenRouter’s dashboard.
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

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: OPENROUTER_LIST_VIDEO_MODELSList video generation models and their supported capabilities.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: OPENROUTER_LIST_ZDR_ENDPOINTSTool 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

string
The app display name allows you to customize how your app appears in OpenRouter’s dashboard.
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

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not
Slug: OPENROUTER_RERANK_CONTENTRank text or multimodal documents by relevance to a query.

Input Parameters

string
End-user observability identifier, up to 256 characters.
string
required
OpenRouter rerank model identifier.
string
required
Search query used to score relevance.
integer
Number of highest-ranked documents to return.
object
OpenRouter observability and tracing metadata.
object
OpenRouter provider-routing preferences.
array
required
Documents to rank as text or objects containing text and/or image.
string
Observability grouping identifier, up to 256 characters.

Output

string
required
Data from the action execution
string
Error if any occurred during the execution of the action
boolean
required
Whether or not the action execution was successful or not