Openrouter
openrouterOpenRouter 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.
Acciones disponibles (7)
Cada acción es una operación que el agente puede ejecutar contra este conector. Haz clic en una acción para ver sus parámetros.
Create Chat CompletionOPENROUTER_CREATE_CHAT_COMPLETIONAcciónTool to generate a chat-style completion. use after assembling messages and selecting a model. supports streaming and function calls.
OPENROUTER_CREATE_CHAT_COMPLETIONAcciónTool to generate a chat-style completion. use after assembling messages and selecting a model. supports streaming and function calls.
Parámetros de entrada
nintegerNumber of completion choices to generate.
stopstringSequences where the API will stop generating further tokens.
userstringA unique identifier for the end-user to help detect abuse.
modelstringObligatorioID of the model to use for the chat completion.
top_pnumberNucleus sampling probability, between 0 and 1.
streambooleanWhether to stream back partial message deltas.
messagesobject[]ObligatorioList of conversation messages to provide as context.
functionsobject[]List of functions the model may call.
logit_biasobjectAdjust the likelihood of specified tokens.
max_tokensintegerMaximum number of tokens to generate.
temperaturenumberSampling temperature to use, between 0 and 2.
function_callstringenumControl function call behavior: 'none', 'auto', or specify {'name': function_name}.
noneautopresence_penaltynumberPenalty for new tokens based on presence in the text so far.
frequency_penaltynumberPenalty for new tokens based on frequency in the text so far.
Parámetros de salida
dataobjectObligatorioData from the action execution
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Create CompletionOPENROUTER_CREATE_COMPLETIONAcciónTool to generate a text completion for a given prompt or set of messages. use when you need a model-generated response from a specified model.
OPENROUTER_CREATE_COMPLETIONAcciónTool to generate a text completion for a given prompt or set of messages. use when you need a model-generated response from a specified model.
Parámetros de entrada
stopstringUp to 4 sequences where the API will stop generating further tokens.
modelstringObligatorioIdentifier of the model to use, e.g., 'openai/gpt-3.5-turbo'.
top_kintegerTop-k sampling limit (>=1).
top_pnumberNucleus sampling probability threshold between 0 and 1.
promptstringPrompt text for completion. Either 'prompt' or 'messages' must be provided.
streambooleanIf true, stream back partial progress as SSE.
messagesobject[]List of chat messages. Either 'prompt' or 'messages' must be provided.
max_tokensintegerMaximum number of tokens to generate (>=1).
temperaturenumberSampling temperature between 0 and 2.
Parámetros de salida
dataobjectObligatorioData from the action execution
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Get CreditsOPENROUTER_GET_CREDITSAcciónTool to get the current api credit balance for the authenticated user. use after authenticating to monitor remaining credits before making further api calls.
OPENROUTER_GET_CREDITSAcciónTool to get the current api credit balance for the authenticated user. use after authenticating to monitor remaining credits before making further api calls.
Parámetros de entrada
Sin parámetros.
Parámetros de salida
dataobjectObligatorioContainer with total credits and usage information
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Get GenerationOPENROUTER_GET_GENERATIONAcciónTool to retrieve a generation result by its unique id. use after a generation completes to fetch metadata like token counts, cost, and latency.
OPENROUTER_GET_GENERATIONAcciónTool to retrieve a generation result by its unique id. use after a generation completes to fetch metadata like token counts, cost, and latency.
Parámetros de entrada
idstringObligatorioUnique identifier of the generation to retrieve.
Parámetros de salida
dataobjectObligatorioThe detailed generation metadata.
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
List Available ModelsOPENROUTER_LIST_AVAILABLE_MODELSAcciónTool to list available models via openrouter api. use after confirming authentication to fetch the model catalog.
OPENROUTER_LIST_AVAILABLE_MODELSAcciónTool to list available models via openrouter api. use after confirming authentication to fetch the model catalog.
Parámetros de entrada
use_rssbooleanReturn RSS XML feed instead of JSON (BETA).
categorystringFilter models by category (e.g., 'programming'). Sorted from most to least used.
use_rss_chat_linksbooleanUse chat URLs instead of model page URLs in RSS items (only applies when use_rss=true) (BETA).
Parámetros de salida
dataobject[]ObligatorioList of available models.
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
OpenRouter List Model EndpointsOPENROUTER_OPENROUTER_LIST_MODEL_ENDPOINTSAcciónTool 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.
OPENROUTER_OPENROUTER_LIST_MODEL_ENDPOINTSAcciónTool 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.
Parámetros de entrada
slugstringObligatorioModel's unique slug under the author namespace (e.g., 'gpt4').
authorstringObligatorioModel author's username as it appears in the model URL (e.g., 'anon').
Parámetros de salida
dataobjectObligatorioerrorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
OpenRouter List ProvidersOPENROUTER_OPENROUTER_LIST_PROVIDERSAcciónTool to list all ai model providers available through the openrouter api. use after authentication to retrieve available provider options for routing configuration.
OPENROUTER_OPENROUTER_LIST_PROVIDERSAcciónTool to list all ai model providers available through the openrouter api. use after authentication to retrieve available provider options for routing configuration.
Parámetros de entrada
Sin parámetros.
Parámetros de salida
dataobject[]ObligatorioList of available AI model providers
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not