Unified Inference

Every major model. One endpoint.

Keep the SDK your code already speaks. Call every major model through OpenAI Chat Completions or Anthropic Messages, on one key and one bill.

Copy, paste, call

Migration is a base-URL change.

Point your existing code at api.mindshub.ai and keep everything else. Reference any model by its short alias — the command on the right is real; copy it and run it.

  • OpenAI SDKs use https://api.mindshub.ai/v1 with api_key.
  • Anthropic SDKs use https://api.mindshub.ai without /v1 and require auth_token, so the client sends Authorization: Bearer.
Which API should I use? →
Model
curl https://api.mindshub.ai/v1/chat/completions \
  -H "Authorization: Bearer $MINDSHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "sonnet",
    "messages": [{"role": "user", "content": "Hello"}]
  }'
  1. Stable aliases Switch models by changing one string
  2. Three request formats One key, one bill
  3. Tools + streaming Native wire formats
  4. Pay as you go Included tokens + prepaid wallet
Choose your API

Use the format your code already speaks.

All three formats reach the same catalog and the same bill. Start with Chat Completions for new work; use Messages for Anthropic SDKs and Claude Code.

OpenAI Production

Chat Completions

POST /v1/chat/completions

Best documented and most widely supported. Use api_key and the base URL ending in /v1.

Open the Chat Completions guide →
Anthropic Production

Messages

POST /v1/messages

For Anthropic SDKs and Claude Code. Use auth_token and the host-only base URL without /v1.

Open the Messages guide →
OpenAI Mid-upgrade

Responses

POST /v1/responses

Input is accepted today, but Responses-shaped output and SDK helpers are still upgrading. Use Chat Completions for production.

Read the current Responses status →
Developer documentation From first key to production request.
Stable model aliases

One key. Every model that matters.

Reference a model by its short alias, not a provider version string — when the underlying model is upgraded, the alias stays the same. This list renders from the same live catalog the API serves; GET /v1/models is authoritative, including whether each model is enabled for your organization.

Pay as you go

One bill. Nothing to reconcile.

By default, organizations receive 5 million included monthly tokens on mindshub_air. Every other model, embeddings, web search, and priced cache writes draw from one prepaid organization wallet.

Input, output, cached input, and cache writes are metered separately. Cached input is roughly a tenth of the ordinary input rate. Included-token limits can vary by organization — your entitlements response is authoritative.

Conversation history / repeated prefix Metered
First request · write System prompt + history input + cache write
Request 02 · read Repeated prefix ~1/10 input rate
Request 03 · read Repeated prefix ~1/10 input rate
Request 04 · read Repeated prefix ~1/10 input rate

Caching is automatic on most of the catalog. Claude-family models use cache_control breakpoints on Messages.

Parameter adaptation

Different models. Fewer avoidable 400s.

Supported generation parameters pass through. Unsupported parameters are dropped and out-of-range values are clamped — with every change named in response headers, so nothing shifts silently.

POST /v1/chat/completions        model: gemini-flash
  top_k · max_tokens · reasoning_effort

← 200 OK
  X-MindsHub-Dropped-Params: top_k
  X-MindsHub-Clamped-Params: max_tokens=requested>applied

Nothing changed? No adaptation headers. Provider value restrictions can still return a 400.

Streaming

Keep each API's native event shape.

Existing stream parsers keep working on Chat Completions and Messages. Each protocol keeps its own completion and failure signals — the docs spell them out.

Compare API behavior →
Tools + images

Pass richer work through the same key.

Function tools, image input, and built-in web search are supported where the selected model and request format support them.

See working examples →
Usage

One summary across every model.

Every API and coding-agent request lands in the same organization usage summary, grouped by model when you need it.

Usage and wallet docs →
One engine

Keep your SDK. Change the base URL.

Every request format reaches the same models, the same wallet, and the same usage summary.

Compare all three APIs →
  1. POST /v1/chat/completions Production
  2. POST /v1/messages Production
  3. POST /v1/responses Mid-upgrade
  4. GET /v1/models Live
  5. POST /v1/embeddings Live
  6. Usage summary Live
FAQ

Before you change the base URL.

Which API should I use?
Starting fresh, or already on OpenAI chat.completions? Use Chat Completions. Already using the Anthropic SDK or Claude Code? Use Messages. The Responses endpoint is mid-upgrade — the docs recommend Chat Completions for production use today.
Which base URL and auth field do I use?
OpenAI SDKs use https://api.mindshub.ai/v1 with api_key. Anthropic SDKs use https://api.mindshub.ai without /v1 and must use auth_token — not api_key — so the client sends the Authorization: Bearer header.
How does billing work?
Unified Inference is pay as you go with no subscription. By default an organization receives 5 million included monthly tokens on mindshub_air; per-organization limits can differ. Everything else draws from one prepaid organization wallet. The rate card on the pricing page lists every per-model price.
Does conversation chaining work?
No. Keep conversation history client-side and send the full history on each turn. Prompt caching makes repeated prefixes cheaper on most models; previous_response_id and store are accepted but not honored.
How do aliases and availability work?
Use short aliases such as sonnet, gpt, and kimi. They follow model upgrades without code changes. GET /v1/models is authoritative for the live catalog and for whether each model is enabled for your organization.
Can I bring my own provider key?
Not today. Bring-your-own-key is planned, not available. The current service uses one MindsHub key and one organization wallet.