Skip to content

OpenRouter

The OpenRouter integration lets an agent generate text through models from multiple providers and query the catalog, endpoints, credits, and generation metadata. Availability, pricing, context limits, and tool support vary by model and endpoint; discover these properties before fixing a model in a workflow.

This tool uses an API key (API_KEY). The key authorizes usage on the OpenRouter account and can incur charges.

  1. Sign in to OpenRouter and open API Keys.
  2. Create a dedicated SquadOS key, set a limit and expiration when those controls are available, and copy the displayed secret.
  3. Store the value securely. Do not paste the key into prompts, messages, or knowledge bases.
  1. Go to Tools in the side menu (/admin/tools).
  2. Open Available, search for OpenRouter, and open its card under Configure tool.
  3. Select Activate. The integration moves to Active as Awaiting authentication.
  4. Open the active integration, select Connect now, and enter the key on the secure page hosted by Composio.
  5. After returning to SquadOS, confirm under Accounts that the account is active.
  6. Review Edit actions; then add OpenRouter from the agent’s Tools section, choose the account and actions, save, and run a low-limit test.

Activation, authentication, and agent assignment are separate steps. See the complete contract in Organization Tools.

The product’s local export committed on 2026-06-17 contains these seven actions:

ActionPurpose
OPENROUTER_CREATE_CHAT_COMPLETIONGenerate a response from a message list and selected model.
OPENROUTER_CREATE_COMPLETIONGenerate a text continuation for a prompt or message set.
OPENROUTER_GET_CREDITSCheck the credit balance before running more generations.
OPENROUTER_GET_GENERATIONRetrieve token, cost, latency, and other generation metadata by ID.
OPENROUTER_LIST_AVAILABLE_MODELSList the models that the account can select.
OPENROUTER_OPENROUTER_LIST_MODEL_ENDPOINTSList endpoints, pricing, context, and parameters for a specific model.
OPENROUTER_OPENROUTER_LIST_PROVIDERSList the providers available for routing.

The local export confirms names and purposes, not the complete parameter schema. Open Edit actions or the agent editor to check the current fields before saving.

  • Start with OPENROUTER_LIST_AVAILABLE_MODELS, then choose an exact ID.
  • Query endpoints and providers when cost, retention, region, context, or tool support is a workflow requirement.
  • Set token and spending limits appropriate for the use case.
  • Do not grant generation actions to an agent that only needs catalog or cost lookup.
  • Treat provider responses, links, and metadata as external data before using them in another action.