Infer API · live
One API. Four price options.
Infer provides one Responses-compatible API with private supply, locked prices, spending limits, a prepaid balance, and clear receipts.
The compatibility record covers exact Codex CLI and OpenCode versions plus receipt-backed live requests for Pydantic AI, LangChain OpenAI, and the Vercel AI SDK, while keeping setup, protocol observations, and current availability separate.
The reviewed OpenAPI 3.1 description covers the public catalog and status resources plus the authenticated model and Responses endpoints. Its publication is not a route-availability signal.
https://infer.flow7.org/v1
Quickstart
Go from a new account to the first API request:
- Create an account, then confirm the one-time verification link sent by Infer.
- Open Wallet and add at least $20 of wallet credit through checkout.
- Open API keys, create an API key, and copy it when shown. Set the copied value as
INFER_API_KEYin your local shell or secret manager; never put it in a URL, repository, or chat. - Send the Responses request below. The selected model must show as available on current status.
curl https://infer.flow7.org/v1/responses \
-H "Authorization: Bearer $INFER_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: first-request" \
-d '{
"model": "infer/claude-haiku-4-5:balanced",
"input": "Create a typed retry helper with exponential backoff.",
"max_output_tokens": 1200,
"relay": {
"session_id": "repo-acme-42",
"privacy": "standard"
}
}'Price options
| Price option | Model suffix | Best for |
|---|---|---|
| Low cost | :low-cost | Flexible and background work |
| Balanced | :balanced | Most everyday work |
| Stable | :stable | Continuity through a redundancy-oriented route pool |
| Official API | :official | The model lab’s first-party API endpoint at 1.25× supplier cost |
The customer-facing options are Low cost, Balanced, Stable, and Official API. Their API suffixes are :low-cost, :balanced, :stable, and :official. Official API is available only when an exact first-party route has passed verification.
Model IDs
A model ID combines the model name and price option. Exact model IDs stay within that model family. Dynamic model IDs return the model that actually ran in the response metadata.
| Model ID | Type | Price option |
|---|---|---|
infer/claude-haiku-4-5:balanced | Exact family | Balanced |
infer/kimi-k3:balanced | Exact family | Balanced |
infer/auto/code:stable | Dynamic | Stable |
infer/deepseek-v4-flash:balanced | Exact family | Balanced |
Responses API
Infer returns the normal model response plus the selected price option, final charge, token usage, and receipt under relay. The serving supply identity is never returned.
{
"id": "resp_…",
"object": "response",
"status": "completed",
"model": "infer/gpt-5.6-terra:balanced",
"output_text": "…",
"usage": {
"input_tokens": 8240,
"input_tokens_details": {"cached_tokens": 7100},
"output_tokens": 932
},
"relay": {
"receipt_id": "rcpt_…",
"price_version": "pv_…",
"tier": "balanced",
"resolved_model_class": "GPT-5.6 Terra",
"cache_status": "partial",
"environment": "live",
"provider_disclosed": false,
"customer_cost_usd": 0.004992
}
}How requests are routed
- The API key type, model ID, routing option, and price are locked before the request starts.
- Infer checks model support, context size, privacy needs, current health, and price before choosing a route.
- When a client supplies
relay.session_id, the session stays on the same route while that route remains healthy. - Retries stay within the selected option’s price and reliability limits.
- The supplier and exact route remain private.
Billing and receipts
Customers fund a prepaid Infer service-credit wallet through secure checkout with no separate Infer checkout fee. The first funding minimum is $20 and later reloads are $50. Applicable tax may be added separately. Wallet credit becomes available only after payment is confirmed. Before a request starts, Infer temporarily holds the maximum estimated cost. After it finishes, Infer charges the actual amount and immediately returns the rest to the wallet. Inspect a completed receipt locally.
| Field | Meaning |
|---|---|
input_tokens | Total input processed |
cached_input_tokens | Input granted a valid cache discount |
output_tokens | Generated output |
price_version | Internal ID for the price used by the request |
customer_cost_usd | Final charge |
Errors
| Code | Meaning |
|---|---|
invalid_api_key | Missing, revoked, or invalid key |
insufficient_credits | The wallet cannot cover the estimated request cost |
capacity_unavailable | No working route supports the selected option |
request_in_progress | The idempotency key is already active |
request_failed_use_new_idempotency_key | The prior operation failed; retry the operation with a new idempotency key |
upstream_unavailable | Available routes failed before the request completed |