canonical: https://jentic.com/apis/router.ai/router

# Router AI Gateway

The Router AI Gateway API routes model requests through one OpenAI-compatible endpoint set, covering chat completions, the Responses format, Anthropic-style messages, and Gemini-style generateContent calls. Beyond text it exposes embeddings, moderation, text-to-speech, image generation and edits, and asynchronous video generation jobs that can be listed, polled, downloaded, and deleted. A models listing shows what the gateway can route to, and a billing subscription endpoint reports the account plan.

## For AI agents

Call chat, Responses, Anthropic-style messages, and Gemini-style generateContent through one OpenAI-compatible gateway, plus embeddings, moderation, speech, images, and video jobs.

## Scope

Does not train or fine-tune models, host vector databases, or manage provider accounts. Use for routing model, embedding, and media generation requests through one gateway only.

## Capabilities

- Send chat completions through the OpenAI-compatible `/v1/chat/completions` route
- Call Anthropic-style `/v1/messages` and Gemini-style generateContent and streamGenerateContent with the same gateway token
- Generate embeddings and run content moderation on input text
- Synthesise speech audio from text through `/v1/audio/speech`
- Generate new images or edit existing ones through the images routes
- Start video generation jobs, poll their status by id, and download or delete the finished output
- List the models the gateway can route to and check the account's billing subscription

## Use cases

### AI agent calling multiple model formats through one gateway

An AI agent that switches between OpenAI-style, Anthropic-style, and Gemini-style request formats needs one endpoint and one credential instead of three integrations. Through Jentic the agent searches for 'send a chat completion', loads the Router AI operation, and calls it with the bearer token injected at execution time. The same token covers `/v1/messages` and the v1beta generateContent routes, so the agent keeps one connection while choosing the request shape per task.

Example prompt: Call GET `/v1/models` to pick a model, then POST `/v1/chat/completions` with that model and a user message, and return the reply text

### Asynchronous video generation pipeline

A content pipeline that produces short generated videos needs to submit a job, wait for it, and collect the file. Router AI exposes POST `/v1/videos/generations` to start a job, GET `/v1/videos/generations/{id}` to poll it, and a download route to fetch the result, with a DELETE route to clean up finished jobs. A worker can list outstanding jobs to recover after a restart.

Example prompt: Start a job with POST `/v1/videos/generations`, poll GET `/v1/videos/generations/{id}` until it completes, then fetch GET `/v1/videos/generations/{id}/download`

### Retrieval indexing with embeddings and moderation

A retrieval system indexing user-submitted documents screens text before storing it and turns accepted text into vectors. Router AI offers POST `/v1/moderations` to check input and POST `/v1/embeddings` to produce vectors through the same gateway token. Running both through one gateway keeps the moderation and indexing steps on a single connection.

Example prompt: Send a document's text to POST `/v1/moderations`, and if it is not flagged, send it to POST `/v1/embeddings` and store the returned vector

### Voice and image generation for an assistant

A voice assistant reads replies aloud and attaches illustrations when asked. Router AI turns text into audio through POST `/v1/audio/speech` and produces or modifies pictures through POST `/v1/images/generations` and POST `/v1/images/edits.` The assistant uses one bearer token for all three media routes alongside its chat calls.

Example prompt: Generate an image with POST `/v1/images/generations` from a prompt, then read a one-line caption aloud with POST `/v1/audio/speech`

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/v1/chat/completions` | Create a chat completion |
| POST | `/v1/messages` | Send an Anthropic-style message |
| POST | `/v1/responses` | Create a response |
| GET | `/v1/models` | List routable models |
| POST | `/v1/embeddings` | Create embeddings |
| POST | `/v1/images/generations` | Generate an image |
| POST | `/v1/videos/generations` | Start a video generation job |
| GET | `/v1/videos/generations/{id}` | Get a video generation job |

## Key resources

- **Chat and messages** — OpenAI-style chat completions and Responses, Anthropic-style messages, and Gemini-style generateContent and streamGenerateContent
- **Models** — The list of models the gateway can route requests to
- **Media generation** — Speech synthesis, image generation and edits, and asynchronous video generation jobs
- **Discovery files** — Public llms.txt, MCP manifest, OpenAPI document, robots.txt, and health check routes that need no token

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 0 / 100
- **Maturity:** Non-Ready
- **Dimensions:**
  - Foundational Compliance: 72 / 100
  - Developer Experience & Jentic Compatibility: 81 / 100
  - AI-Readiness & Agent Experience: 21 / 100
  - Agent Usability: 94 / 100
  - Security: 60 / 100
  - AI Discoverability: 0 / 100
- **View full report:** https://jentic.com/apis/router.ai/router/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring Router AI by hand means attaching a bearer token to every /v1 and /v1beta call, remembering which discovery routes are open, and handling three request formats plus an asynchronous video job lifecycle. Through Jentic you install once, import Router AI from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** Each capability sits on its own path, such as `/v1/chat/completions`, `/v1/videos/generations`, and `/v1/dashboard/billing/subscription`, so a rule can bound your agent to the routes it needs. You choose the operations it may call, so costly or destructive ones like starting video jobs or deleting a generation are not included unless you add them.
- **Credential handling:** Your Router AI bearer token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'send a chat completion' or 'start a video generation job', and Jentic returns the matching Router AI operation with its input schema so the agent calls the right route without reading the gateway's llms.txt.

## Related APIs

- **OpenRouter** — Unified OpenAI-compatible API that routes to many model providers
- **OpenAI** — First-party API for GPT models, embeddings, images, and audio
- **Anthropic Messages** — First-party Messages API for Claude models
- **Exa** — Web search API that returns content an agent can pass to a model

## FAQ

### What authentication does the Router AI Gateway API use?

Per its OpenAPI spec, the Router AI Gateway uses HTTP bearer authentication: send your token in the Authorization header as Bearer followed by the token. The 17 model, media, and billing routes under /v1 and /v1beta require it, while the 7 discovery routes such as GET /health, GET /llms.txt, and GET /.well-known/mcp.json are open. Through Jentic the token is held by your own instance and attached at call time.

### Can I call Anthropic-style and Gemini-style requests with the Router AI Gateway API?

Yes. Alongside the OpenAI-compatible POST `/v1/chat/completions` and POST `/v1/responses` routes, the gateway exposes POST `/v1/messages` for Anthropic-style requests and POST `/v1beta/models/{model}`:generateContent and its streaming variant for Gemini-style requests, all with the same bearer token.

### What are the rate limits for the Router AI Gateway API?

The OpenAPI spec does not specify rate limits. Check the gateway's own llms.txt at https://api.router.ai/llms.txt and your account plan, which GET `/v1/dashboard/billing/subscription` reports, for current limits.

### Is there a Router AI Gateway MCP server?

You do not need an MCP server to give your agent the Router AI Gateway. Jentic connects it directly from the API Directory: import it, store your bearer token once, and your agent calls the chat, media, and model operations on demand without loading another server's tool definitions into its context.

### How do I generate a video with the Router AI Gateway through Jentic?

Search Jentic for 'start a video generation job', load the POST `/v1/videos/generations` operation, and execute it with your prompt. Poll GET `/v1/videos/generations/{id}` with the returned id, then fetch the file from the download route once the job is done. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Can I limit what my agent is allowed to do with the Router AI Gateway API?

Yes. Write a rule that allows only POST `/v1/chat/completions` and GET `/v1/models`, so the agent can pick a model and chat but cannot start paid video jobs, delete generations, or read billing. Widen the rule to the media routes when a task needs them, and every call the agent makes is logged.
