For Agents
Send chat, responses, messages, and embedding requests to a unified OpenAI-compatible API that routes across many language model providers.
Install Jentic One Beta
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the OpenRouter API, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.
Step 1: Jentic One Host machine
# On the machine that will host your Jentic One instance:
curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | shStep 2: Agent machine
# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with OpenRouter API.
Generate chat completions across providers via the OpenAI-compatible /chat/completions endpoint
Use the /responses endpoint for stateful, structured agent loops
Send Anthropic-format /messages requests through the same gateway
GET STARTED
Use for: Generate a chat completion using a specific model on OpenRouter, Send an Anthropic-style messages request through OpenRouter, Create text embeddings for a list of documents, List the embedding models I can call
Not supported: Does not handle image generation, speech synthesis, or fine-tuning workflows in this surface — use for chat, responses, messages, and embeddings routing only.
Jentic publishes the only available OpenAPI specification for OpenRouter API, keeping it validated and agent-ready. OpenRouter exposes an OpenAI-compatible inference surface that fans out to many language model providers behind a single bearer-token API, including chat completions, the responses API, the messages format, and embeddings. The 36-endpoint surface also covers credits, activity, and account management so applications can route, meter, and observe LLM traffic without negotiating contracts with each underlying provider.
Create text and code embeddings via /embeddings with selectable models
List available embedding models with /embeddings/models
Inspect remaining account credits via /credits and top up via /credits/coinbase
Pull request-level activity history for cost and usage reporting
Patterns agents use OpenRouter API for, with concrete tasks.
★ Provider-agnostic chat completions
An application that already speaks the OpenAI Chat API can switch to OpenRouter by changing the base URL and key, then specify any supported model — Anthropic, Mistral, Llama, Gemini, and so on — by name. This avoids vendor lock-in and lets the team A/B different models for cost and quality without rewriting client code.
POST to /chat/completions with model='anthropic/claude-3.5-sonnet' and a messages array, then read choices[0].message.content.
Embeddings for retrieval pipelines
A retrieval pipeline calls /embeddings to convert documents into vectors, choosing among models listed by /embeddings/models. Keeping embeddings on OpenRouter lets the team swap to a cheaper model later without touching the storage layer, and keeps billing in one place.
Call GET /embeddings/models to pick a model, then POST /embeddings with input=['doc1','doc2'] and model=that_id and store the returned vectors.
Cost observability and credit top-up
Operations teams use the /credits and /activity endpoints to monitor spend per model and top up via /credits/coinbase before traffic spikes exhaust the balance. This makes spend predictable across many underlying providers, reading from one consolidated ledger instead of multiple vendor invoices.
Call /credits to read the balance, then list /activity for the last 7 days and roll up total tokens by model.
Agent-driven multi-model routing through Jentic
An AI agent that needs different models for different sub-tasks (cheap classification on one model, careful reasoning on another) calls OpenRouter via Jentic. Jentic isolates the bearer key and exposes the chat, responses, messages, and embeddings operations as discoverable tools so the agent can pick the right call without leaking credentials.
Search Jentic for 'send a chat completion via OpenRouter', load /chat/completions, and execute it specifying a different model per task within the same agent run.
36 endpoints — jentic publishes the only available openapi specification for openrouter api, keeping it validated and agent-ready.
METHOD
PATH
DESCRIPTION
/chat/completions
Generate a chat completion (OpenAI-compatible)
/responses
Use the stateful responses API
/messages
Send an Anthropic-format messages request
/embeddings
Create text or code embeddings
/embeddings/models
List available embedding models
/credits
Read remaining account credits
/activity
Pull recent usage activity
/chat/completions
Generate a chat completion (OpenAI-compatible)
/responses
Use the stateful responses API
/messages
Send an Anthropic-format messages request
/embeddings
Create text or code embeddings
/embeddings/models
List available embedding models
Three things that make agents converge on Jentic-routed access.
Credential isolation
The OpenRouter bearer key is stored encrypted in the Jentic vault. Agents receive scoped execution access — the bearer never enters the agent's context window.
Intent-based discovery
Agents express intents like 'send a chat completion via OpenRouter' or 'create text embeddings', and Jentic returns the right OpenAI-compatible operation with its input schema, including model selection.
Time to first call
Direct OpenRouter integration: an hour or two to set up auth, model selection, and credit monitoring. Through Jentic: under 30 minutes — search, load schema, execute.
Alternatives and complements available in the Jentic catalogue.
Specific to using OpenRouter API through Jentic.
Why is there no official OpenAPI spec for OpenRouter API?
OpenRouter does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call OpenRouter API via structured tooling. It is validated against the live API and kept up to date. Get started at https://app.jentic.com/sign-up.
What authentication does the OpenRouter API use?
OpenRouter uses bearer-token authentication: the API key is sent in the Authorization header on every request. Through Jentic the key is held in the encrypted vault and injected at execution time, so it never appears in agent prompts.
Can I use OpenRouter as a drop-in for the OpenAI API?
Yes for the chat completions surface. POST /chat/completions accepts the OpenAI-compatible request shape, with the model field naming any supported provider+model combination. The /messages endpoint additionally accepts the Anthropic format directly.
What are the rate limits for the OpenRouter API?
OpenRouter enforces account-tier rate limits that vary by model and provider. The OpenAPI spec does not encode these per-model limits, so check the dashboard at openrouter.ai for your account's current ceilings, particularly when calling premium frontier models.
How do I send a chat completion through Jentic?
Run pip install jentic, search 'send a chat completion via OpenRouter', load the /chat/completions operation, and execute it with model and messages parameters. Jentic supplies the bearer token and returns the parsed completion.
Does the API expose embeddings as well as chat?
Yes. POST /embeddings creates vectors using a chosen model, and GET /embeddings/models lists which embedding models are currently available on the account, so retrieval pipelines can pick a model and budget without leaving the same gateway.
/credits
Read remaining account credits
/activity
Pull recent usage activity