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

# Cheaper Inference API

The Cheaper Inference API routes OpenAI- and Anthropic-compatible inference requests across a range of models and bills each call against a prepaid wallet. It accepts the OpenAI chat, completion, responses, embedding, and image shapes alongside the Anthropic messages shape, so existing client code works against one wallet-backed endpoint. Every buffered response returns a request id and the exact amount billed, and the model endpoints let you compare prices or count supply under a ceiling before you spend. Usage records, savings snapshots, task budgets, and per-key spend controls round out the surface for teams that need to watch inference cost.

## For AI agents

Run chat completions, Anthropic messages, embeddings, and image or video generation across many models through one wallet-backed endpoint. Compare model prices, read what each request cost, and cap spend with task budgets.

## Scope

Does not handle model training, fine-tuning, or vector storage. Use for routing inference requests across chat, embedding, image, and video models only.

## Capabilities

- Run OpenAI-compatible chat and text completions through a single wallet-backed endpoint
- Send Anthropic-style messages and OpenAI responses with the same credential
- Generate embeddings, images, and short videos from one inference surface
- Compare model prices for a workload and count model supply under a price ceiling before spending
- Track per-request billing and daily spend across a workspace
- Cap what an API key can spend by opening and closing task budgets
- Score completed requests and report task outcomes to tune optimization techniques

## Use cases

### Agent Inference Through Jentic

AI agents that need model inference can call the Cheaper Inference API through Jentic instead of wiring a provider SDK. The agent runs chat completions, embeddings, or Anthropic messages against one wallet-backed endpoint, reads the request id and billed amount from each buffered response, and stays within a task budget the developer set. A pricing comparison lets the agent pick a model that fits the job before it spends.

Example prompt: Run a chat completion for a short summarization prompt, read the billed amount from the response, and confirm it stayed under the key's open task budget

### Drop-in OpenAI and Anthropic Compatibility

Teams running on the OpenAI or Anthropic client libraries can repoint them at the Cheaper Inference API and keep their request shapes. The same endpoint serves chat completions, text completions, responses, embeddings, and Anthropic messages, so a codebase that mixes both vendors consolidates onto one credential and one wallet without rewriting prompts.

Example prompt: Repoint an existing OpenAI chat client at the base URL and run an identical chat completion request to confirm the response parses

### Cost-Aware Model Selection

Before committing a workload, callers price it across models and count how many models fall under a chosen price ceiling. The comparison endpoint returns the projected cost per model so a workflow can route cheap, high-volume jobs to a budget model and reserve a stronger model for the calls that need it.

Example prompt: Price a 2000-token prompt across the available chat models and select the lowest-cost model that meets the context window

### Spend Governance With Task Budgets

Workspaces cap inference spend by opening task budgets on individual API keys and closing them when work completes. Daily spend and per-request usage records let an operator reconcile what each key and task cost, and a workspace admin policy bounds what budgets members can open.

Example prompt: Open a task budget on a key, run a batch of embedding requests, then read the daily usage to confirm the spend is recorded

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/v1/chat/completions` | Create a chat completion |
| POST | `/v1/messages` | Create an Anthropic-style message |
| POST | `/v1/embeddings` | Create embeddings |
| POST | `/v1/images/generations` | Generate images |
| GET | `/v1/models` | List available models |
| GET | `/v1/models/compare` | Price a workload across models |
| GET | `/v1/account/balance` | Get the wallet balance |
| POST | `/v1/keys/{key_id}/task-budgets` | Open a task budget on a key |

## Key resources

- **Chat and Responses** — OpenAI-compatible chat completions, text completions, and the Responses endpoint
- **Messages** — Anthropic-style message creation and input token counting
- **Embeddings and Media** — Embedding vectors plus image generation, image edits, and video generation
- **Models** — The model listing with prices, supply counts, and cross-model price comparison
- **Usage and Account** — Wallet balance, daily spend, usage records, savings snapshots, and API key management
- **Task Budgets** — Per-key and per-workspace task budgets with open, close, and read operations

## 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:** 62 / 100
- **Maturity:** AI-Aware
- **Dimensions:**
  - Foundational Compliance: 47 / 100
  - Developer Experience & Jentic Compatibility: 69 / 100
  - AI-Readiness & Agent Experience: 55 / 100
  - Agent Usability: 93 / 100
  - Security: 55 / 100
  - AI Discoverability: 73 / 100
- **View full report:** https://jentic.com/apis/cheaperinference.com/cheaperinference/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 Cheaper Inference API by hand means learning that it takes either a bearer token or an x-api-key header, optionally compressing large request bodies with gzip or brotli, and reconciling each call's cost from the response headers on streamed completions. Through Jentic you install once, import Cheaper Inference from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** The Cheaper Inference API carries the model name inside the request body, so rules bound which operations your agent may call, not which model. Limit it to the inference operations it needs, such as chat completions and embeddings, so administrative ones like key revocation or wallet top-ups are not included unless you add them.
- **Credential handling:** Your Cheaper Inference 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 run a chat completion cheaply or generate embeddings, and Jentic returns the matching Cheaper Inference operation with its input schema so the agent calls the right endpoint without reading the reference docs.

## Related APIs

- **OpenRouter** — Another unified gateway that routes requests across many model providers behind one API.
- **Groq** — A direct low-latency inference provider with an OpenAI-compatible surface.
- **OpenAI** — The OpenAI API whose chat, responses, and embedding request shapes this endpoint mirrors.

## FAQ

### What authentication does the Cheaper Inference API use?

The Cheaper Inference API authenticates with a bearer token in the Authorization header or an API key in the x-api-key header, per its OpenAPI spec; when both are present the bearer token wins. A few model-listing endpoints under the public path are open and need no credential. Through Jentic the token is stored encrypted by your own Jentic One instance and injected at call time, so it never reaches the agent's context.

### Can I generate images and video with the Cheaper Inference API?

Yes. The API exposes image generation and image editing endpoints plus a video generation endpoint alongside its text and embedding operations, all billed against the same wallet. Each buffered response returns a request id and the exact amount billed, so you can attribute the cost of a generation to a task.

### What are the rate limits for the Cheaper Inference API?

The OpenAPI spec does not publish rate limits, and spend is bounded by your prepaid wallet balance rather than a fixed call ceiling. Check the vendor documentation at https://www.cheaperinference.com for current limits.

### How do I run a chat completion with the Cheaper Inference API through Jentic?

Install Jentic One, then from the API Directory import Cheaper Inference and store your token once. Your agent searches by intent such as run a chat completion, and Jentic returns the chat completion operation with its input schema so the agent sends the prompt and reads the billed amount back. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Is there a Cheaper Inference API MCP server?

You don't need an MCP server to give your agent the Cheaper Inference API. Jentic connects it directly from the API Directory: import it, store your token once, and your agent calls the chat, embedding, and image operations on demand. Operations are discovered when the agent needs them, so none of them sit in its context until a call is made.

### Can I limit what my agent is allowed to do with the Cheaper Inference API?

Yes. Write a rule that allows only the inference operations the agent needs, such as chat completions and embeddings, so it can run those calls and nothing else. Account operations like revoking an API key, replacing the workspace policy, or starting a wallet top-up stay out of reach unless you add them, and every call the agent makes is logged.
