canonical: https://jentic.com/apis/aistupidlevel.info/aistupidlevel

# AI Stupid Level Smart Router API

The AI Stupid Level Smart Router API routes each chat completion to the model that currently measures best for it on AI Stupid Level's continuously re-run coding, reasoning, and tool-use benchmarks, using your own provider keys. It speaks the OpenAI Chat Completions format, so any OpenAI client pointed at the /v1 base URL works, and it adds a route preview that returns the chosen model and fallback chain without calling a provider. It also exposes OpenAI embeddings, a native Anthropic Messages pass-through, answer ratings that feed routing signals, and a usage report covering allowance, credits, and key budget. Sending the X-ASL-Sandbox header set to true tests requests without calling a provider or spending anything.

## For AI agents

Send OpenAI-format chat completions that AI Stupid Level routes to the best-measuring model, preview the routing decision and fallback chain first, rate answers, and check monthly allowance and credits.

## Scope

Does not host or train models, store provider billing, or run its own benchmarks on demand. Use for routing OpenAI-format requests to the best-measuring model on your own provider keys only.

## Capabilities

- Route an OpenAI-format chat completion to the best-measuring model by passing an auto-* routing mode as model to POST `/v1/chat/completions`
- Preview which model a request would go to, plus its fallback chain, with POST `/v1/route/preview` without calling a provider
- Rate a routed answer up or down by its completion id through POST `/v1/router/feedback` to feed the routing signals
- List the available routing modes and routable model ids with GET `/v1/models` before pinning a model
- Check this month's allowance, credits, and key budget with GET `/v1/usage`
- Create OpenAI embeddings through POST `/v1/embeddings`, with auto-embedding mapped to text-embedding-3-small
- Send native Anthropic Messages requests through POST `/v1/messages` using your Anthropic key, without routing or fallbacks

## Use cases

### Benchmark-routed completions for your agent through Jentic

An agent that writes code or reasons over documents does better on whichever model currently measures best, and the AI Stupid Level Smart Router picks that model per request. Through Jentic the agent finds the routed chat completion operation by intent, sends an OpenAI-format body with an auto-* routing mode as model, and the router forwards it using your own provider keys. The router key is injected at call time, so the agent never holds it.

Example prompt: Call POST `/v1/chat/completions` with model set to an auto-* routing mode from GET `/v1/models` and messages containing one user turn asking to refactor a Python function, then return the routed answer

### Dry-run routing decisions before spending

Before committing a large batch of prompts, a developer wants to know which model each would land on and what the fallback chain looks like. POST `/v1/route/preview` accepts the same body as the chat completions call and returns the strategy, the target model, and the fallback chain; nothing is called or counted. Adding X-ASL-Sandbox set to true answers as if you held a key for every provider.

Example prompt: Call POST `/v1/route/preview` with header X-ASL-Sandbox set to true, model set to an auto-* routing mode, and a single user message, then report the chosen model and its fallback chain

### Closing the loop with answer ratings

Routing improves when answers are rated. After a routed completion returns, an agent or reviewer posts the completion id with a rating of up or down to POST `/v1/router/feedback`, and those ratings feed the production signals that adjust routing. The id is the response id, also returned as X-AISM-Request-Id.

Example prompt: After a chat completion returns, call POST `/v1/router/feedback` with id set to the response id and rating set to 'down' because the answer failed its unit test

### Budget checks before long agent runs

A long-running agent should check it has room to keep working. GET `/v1/usage` returns the monthly allowance, remaining credits, and the router key's budget, so a scheduler can pause a batch or switch to sandbox testing when credits run low instead of failing mid-run.

Example prompt: Call GET `/v1/usage` and, if remaining credits are below the amount needed for the queued batch, stop and report the allowance and key budget

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/v1/chat/completions` | Create a routed chat completion |
| POST | `/v1/route/preview` | Preview the routing decision |
| GET | `/v1/models` | List routing modes and routable models |
| POST | `/v1/router/feedback` | Rate an answer |
| GET | `/v1/usage` | Get allowance, credits, and key budget |
| POST | `/v1/embeddings` | Create embeddings |
| POST | `/v1/messages` | Anthropic Messages pass-through |

## Key resources

- **Chat completions** — OpenAI-format requests routed to the best-measuring model, with streaming and tool calling
- **Route preview** — The strategy, target model, and fallback chain a request would use, without calling a provider
- **Models** — Routing modes and routable model ids
- **Feedback** — Up or down ratings on a completion id that feed routing signals
- **Usage** — Monthly allowance, credits, and key budget

## 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:** 61 / 100
- **Maturity:** AI-Aware
- **Dimensions:**
  - Foundational Compliance: 82 / 100
  - Developer Experience & Jentic Compatibility: 63 / 100
  - AI-Readiness & Agent Experience: 43 / 100
  - Agent Usability: 94 / 100
  - Security: 55 / 100
  - AI Discoverability: 58 / 100
- **View full report:** https://jentic.com/apis/aistupidlevel.info/aistupidlevel/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 the router by hand means minting an aism_ router key, pointing an OpenAI client at the /v1 base URL, and handling the separate x-api-key form for the Anthropic pass-through. Through Jentic you install once, import the AI Stupid Level Smart Router API from the API Directory, store the router key once, and your agent calls it.
- **Permission scoping:** The router takes the model and messages in the request body, so rules bound which operations your agent may call, not which model it picks. You choose the operations it may call, so paid ones like chat completions or embeddings are not included unless you add them.
- **Credential handling:** Your router 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 'route a chat completion to the best model' or 'preview the routing decision', and Jentic returns the matching router operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **OpenRouter API** — OpenAI-compatible gateway to many model providers behind one key
- **Portkey API** — AI gateway with configurable routing, fallbacks, and observability
- **OpenAI API** — Direct access to OpenAI models, one of the providers the router forwards to
- **Anthropic Messages API** — Native Claude Messages endpoint that the router's pass-through mirrors

## FAQ

### Is there an AI Stupid Level Smart Router MCP server?

You don't need an MCP server to give your agent the AI Stupid Level Smart Router. Jentic connects it directly from the API Directory: import it, store your router key once, and your agent calls it. Operations are discovered on demand, so no extra tool definitions sit in the agent's context.

### What authentication does the AI Stupid Level Smart Router API use?

Per its OpenAPI spec, the API uses a router key (prefixed aism_) sent as a bearer token in the Authorization header. The Anthropic Messages pass-through at POST `/v1/messages` also accepts the router key in the x-api-key header, which suits Anthropic SDKs and Claude Code. GET `/v1/openapi.json` is open and needs no key. Through Jentic, the router key is stored encrypted by your own Jentic One instance and injected at call time.

### Can I see which model the router will pick before I spend anything?

Yes. POST `/v1/route/preview` takes the same body as POST `/v1/chat/completions` and returns the strategy, the model the request would go to, and the fallback chain. Nothing is called or counted. Add the X-ASL-Sandbox header set to true to get an answer as if you held a key for every provider.

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

Yes. For example, write a rule that allows only POST `/v1/route/preview`, GET `/v1/models`, and GET `/v1/usage.` Your agent can then plan routes, list models, and check credits, but it cannot send paid completions or embeddings, and every call it makes is logged.

### What are the rate limits for the AI Stupid Level Smart Router API?

The OpenAPI spec does not specify rate limits. GET `/v1/usage` reports your monthly allowance, credits, and key budget; check https://aistupidlevel.info/contact for current limits.

### How do I send a routed chat completion through Jentic?

Search Jentic for 'route a chat completion to the best model', load the createChatCompletion operation, and call POST `/v1/chat/completions` with model set to an auto-* routing mode from GET `/v1/models` and your messages. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Do I need my own provider keys to use the router?

Yes. The router forwards requests using your own provider keys. POST `/v1/embeddings` requires an OpenAI provider key, and POST `/v1/messages` sends requests to Anthropic with your Anthropic key, with no routing or fallbacks, so model must be a Claude model id.
