canonical: https://jentic.com/apis/routerplex.com/routerplex

# RouterPlex API

The RouterPlex API forwards model requests through an AI gateway that speaks both OpenAI-compatible and Anthropic-compatible formats behind one RouterPlex API key. It accepts chat completions, Anthropic-style messages with an optional max_tokens cap, and image generation requests with a model, prompt, size, and quality. A Responses route serves Codex custom model providers, and a models listing returns the model IDs available to the authenticated key.

## For AI agents

Send OpenAI-compatible chat completions, Anthropic-compatible messages, Codex Responses calls, and image generations through one RouterPlex key, and list the models that key can use.

## Scope

Does not create embeddings, transcribe audio, or fine-tune models. Use for routing chat, message, Codex Responses, and image generation requests only.

## Capabilities

- Send OpenAI-compatible chat completions with a model ID and a messages array, optionally streamed
- Send Anthropic-compatible messages with a model, messages, and an optional max_tokens cap
- Generate images from a prompt with a chosen model, size, and quality
- Serve Codex custom model providers through the Responses-format route with model and input
- List the model IDs available to the authenticated RouterPlex API key

## Use cases

### AI agent reaching OpenAI-style and Anthropic-style models with one key

An AI agent that alternates between OpenAI-format and Anthropic-format requests needs a single credential and base URL. Through Jentic the agent searches for 'send a chat completion', loads the createChatCompletion operation with its input schema, and calls it with the RouterPlex key injected at execution time. For Anthropic-style calls it uses createMessage on the same gateway, choosing a model ID returned by listModels.

Example prompt: Call GET /models to find an available model ID, then POST `/chat/completions` with that model and a messages array containing the user's question

### Codex custom model provider

A developer pointing Codex at a custom model provider needs a Responses-format endpoint rather than Chat Completions. RouterPlex exposes POST /responses for exactly that client, taking a model ID and an input value, with optional streaming. Other OpenAI-compatible clients are directed to Chat Completions unless they require the Responses shape.

Example prompt: Send POST /responses with a model ID from GET /models and an input prompt, with stream set to false, and return the response

### Image generation through the gateway

An app that produces illustrations wants image generation on the same key as its text models. RouterPlex accepts POST `/images/generations` with a model such as gpt-image-2, a prompt, and optional size and quality fields. The app keeps one credential and one base URL for both text and image work.

Example prompt: Call POST `/images/generations` with model gpt-image-2, a product description as the prompt, and a size value, then return the generated image

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/chat/completions` | Create an OpenAI-compatible chat completion |
| POST | `/messages` | Create an Anthropic-compatible message |
| POST | `/responses` | Create a Responses-format response for Codex |
| POST | `/images/generations` | Generate an image |
| GET | `/models` | List models available to the key |

## Key resources

- **Chat completions** — OpenAI-compatible chat requests with model, messages, and stream
- **Messages** — Anthropic-compatible message requests with model, messages, max_tokens, and stream
- **Images** — Image generation requests with model, prompt, size, and quality
- **Models** — Model IDs available to the authenticated RouterPlex API key

## 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:** 67 / 100
- **Maturity:** AI-Aware
- **Dimensions:**
  - Foundational Compliance: 100 / 100
  - Developer Experience & Jentic Compatibility: 63 / 100
  - AI-Readiness & Agent Experience: 51 / 100
  - Agent Usability: 94 / 100
  - Security: 60 / 100
  - AI Discoverability: 63 / 100
- **View full report:** https://jentic.com/apis/routerplex.com/routerplex/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 RouterPlex by hand means setting the /v1 base URL, attaching the bearer key to each request, and keeping OpenAI-format and Anthropic-format request bodies straight across routes. Through Jentic you install once, import RouterPlex from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** RouterPlex splits its surface into five paths, from `/chat/completions` to `/images/generations`, so a rule can bound your agent to exactly the routes a task needs. You choose the operations it may call, so image generation or the Codex Responses route is not included unless you add it.
- **Credential handling:** Your RouterPlex API key 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 'generate an image', and Jentic returns the matching RouterPlex operation with its input schema, including required fields like model and messages, so the agent calls it correctly.

## Related APIs

- **Router AI Gateway** — OpenAI-compatible gateway that adds embeddings, speech, moderation, and video jobs
- **OpenRouter** — Unified OpenAI-compatible API routing to many model providers
- **Anthropic Messages** — First-party Messages API for Claude models
- **Tavily** — Search API built for feeding web results to LLMs

## FAQ

### What authentication does the RouterPlex API use?

Per its OpenAPI spec, the RouterPlex API uses HTTP bearer authentication with a RouterPlex API key, sent in the Authorization header on all five operations. You create and manage keys in the RouterPlex dashboard. Through Jentic the key is held by your own instance and attached at call time, so the agent never handles it.

### Can I send Anthropic-style requests with the RouterPlex API?

Yes. POST /messages is an Anthropic-compatible route that takes a model ID and a messages array, with optional max_tokens and stream fields. It runs on the same base URL and key as the OpenAI-compatible POST `/chat/completions` route.

### What are the rate limits for the RouterPlex API?

The OpenAPI spec does not specify rate limits. Check the RouterPlex dashboard and documentation at https://routerplex.com for the current limits on your key.

### Is there a RouterPlex MCP server?

You do not need an MCP server to give your agent RouterPlex. Jentic connects it directly from the API Directory: import it, store your RouterPlex API key once, and your agent calls the chat, messages, image, and model operations on demand without extra tool definitions in its context.

### How do I pick a model and send a chat completion through Jentic?

Search Jentic for 'list available models', run GET /models to get the IDs your key can use, then search for 'send a chat completion' and execute POST `/chat/completions` with one of those IDs and your messages. 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 RouterPlex API?

Yes. Write a rule that allows only POST `/chat/completions` and GET /models, so the agent can chat with the models on your key but cannot generate images or use the Responses route. Add other routes when a task needs them, and every call the agent makes is logged.
