AI and media
AI agents that use OpenRouter
UtilitySpaces gives an AI agent scoped access to OpenRouter through its own encrypted connection, not your password. The agent can call 6 named OpenRouter tools, and the one that writes waits for a person's approval unless an admin has set the connection to run without asking. Every call is written to a hash-chained audit log with its arguments and its result.
What an agent can do in OpenRouter
One key for several hundred models from every major vendor, with per-model prices, a free tier, and the spend to date. An agent calls these by name, and matching is exact.
| Tool | What it does | Waits for approval by default |
|---|---|---|
| List models | List models OpenRouter serves, with context window, per-million prices and whether the model accepts tools. Filter with search (matches id and name) and freeOnly (models priced at zero on both sides). | No — read only |
| List model endpoints | The upstream providers serving one model, with each one's price, context window and uptime. This is what says whether a model that looks cheap is actually served by anybody right now. | No — read only |
| Chat completion | Send a chat completion to any model OpenRouter serves. Spends the connection's credit unless the model is one of the free ones. | Yes — it writes |
| Get credits | Total credit bought and total spent on this key's account, in USD. | No — read only |
| Get key status | This key's own limit, usage and free-tier status. The cheapest authenticated read on the API, and what the health check calls. | No — read only |
| Get generation cost | What one completed generation actually cost and how many tokens it used, by its id. The reply from chat_completion carries that id. The record is written a little after the completion finishes — measured here at more than 5 and less than 20 seconds — so a 404 straight afterwards means not yet, not no such generation. Wait and ask again. | No — read only |
5 read tools, 1 write tool. Generated from the connector catalogue the product runs on, so it cannot list a tool that does not exist.
What waits for a person
Reads run on their own. These do not — each one waits in Approvals for an owner or admin unless an admin has set this connection to run writes without asking, and every call toOpenRouter, approved, rejected or unattended, is logged.
- Chat completion POST
What connecting OpenRouter takes
OpenRouter uses an API key you create in OpenRouter and paste in once. A workspace admin sets the connection up; the fields are:
- API Key
Credentials are encrypted and bound to your workspace, never read back, and every outbound call passes one guarded fetch — the connector security posture sets out exactly how, and the security page covers the platform around it.
Where OpenRouter fits
Give an agent OpenRouter work by writing a message in the inbox, or put its tools in a scheduled flow. What the run cost is on the cost breakdown.
Other ai and media integrations: AnythingLLM, AssemblyAI, D-ID. Or see every application agents can connect to.
See it doing your actual work
Open a demo workspace, connect one app, and give an agent a real job. No card, no sales call.
We reply to every message within one business day.