Guides
Connect your tool
Any tool that can talk to an OpenAI-compatible endpoint can use Inferiq. You need three values: the base URL, your key, and a model.
The three values
| Setting | Value |
|---|---|
| Base URL | https://api.inferiq.run/v1 |
| Base URL (gateway on your machine) | http://localhost:8787/v1 |
| API key | A free Inferiq key from API keys, starting with iq_. Make one per tool and pick the models it may use. It goes into your tool’s settings, not into the Inferiq website. |
| Model | inferiq/balanced, inferiq/fast, inferiq/best, or an exact model id |
# Any OpenAI-compatible tool: Cline, OpenCode, Roo…
base_url = https://api.inferiq.run/v1
api_key = iq_…
model = inferiq/balancedSetup steps are a guide
Tool settings move between releases. The steps below were written for current versions and are not yet tested against every one. If a screen looks different, look for the tool’s “OpenAI compatible” or “custom base URL” option.Cline
Cline talks to any OpenAI-compatible endpoint, so it works with Inferiq as-is.
- Open Cline’s settings and set API Provider to “OpenAI Compatible”.
- Paste the base URL and your Inferiq key.
- Set Model ID to an alias such as inferiq/balanced, or an exact model id from Models.
Base URL https://api.inferiq.run/v1
API Key iq_…
Model ID inferiq/balancedUse inferiq/fast for Plan mode and inferiq/balanced for Act mode if you want to save on planning turns.
OpenCode
Add Inferiq as a custom OpenAI-compatible provider in opencode.json.
- Put your key in an environment variable: export INFERIQ_API_KEY=iq_…
- Add the provider block below to opencode.json in your project (or ~/.config/opencode/).
- Pick the model with /models inside OpenCode.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"inferiq": {
"npm": "@ai-sdk/openai-compatible",
"name": "Inferiq",
"options": {
"baseURL": "https://api.inferiq.run/v1",
"apiKey": "{env:INFERIQ_API_KEY}"
},
"models": {
"inferiq/fast": { "name": "Inferiq fast" },
"inferiq/balanced": { "name": "Inferiq balanced" },
"inferiq/best": { "name": "Inferiq best" }
}
}
},
"model": "inferiq/inferiq/balanced"
}OpenCode names models provider/model, so the alias inferiq/balanced from the provider “inferiq” becomes inferiq/inferiq/balanced.
Cursor
Cursor can send chat to a custom OpenAI base URL.
- Open Cursor Settings → Models.
- Under OpenAI API Key, paste your Inferiq key and turn on “Override OpenAI Base URL”.
- Set the base URL below, then add inferiq/balanced as a custom model and select it in chat.
OpenAI API Key iq_…
Override OpenAI Base URL https://api.inferiq.run/v1
Custom model inferiq/balancedSome Cursor features, such as Tab completion and parts of Agent mode, always use Cursor’s own models and ignore a custom base URL. Chat with your selected model goes through Inferiq.
Claude Code
Claude Code speaks the Anthropic Messages format, which Inferiq serves at /v1/messages. Requests are answered by Qwen3.8-27B through the same aliases, limits and receipts.
- Set ANTHROPIC_BASE_URL to Inferiq (without /v1; Claude Code adds the path).
- Set ANTHROPIC_AUTH_TOKEN to your Inferiq key.
- Pick the alias with ANTHROPIC_MODEL, and the one for quick background tasks with ANTHROPIC_SMALL_FAST_MODEL.
export ANTHROPIC_BASE_URL="https://api.inferiq.run"
export ANTHROPIC_AUTH_TOKEN="iq_…"
export ANTHROPIC_MODEL="inferiq/balanced"
export ANTHROPIC_SMALL_FAST_MODEL="inferiq/fast"If Claude Code asks for a Claude model name, Inferiq maps it to the alias with the same depth: haiku → inferiq/fast, sonnet → inferiq/balanced, opus → inferiq/best. A key limited to certain models must allow the aliases Claude Code uses.
curl
Check your key and the endpoint from a terminal.
- Export your key.
- Send one request. The response includes the model that answered and a receipt id.
export INFERIQ_API_KEY="iq_…"
curl https://api.inferiq.run/v1/chat/completions \
-H "Authorization: Bearer $INFERIQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "inferiq/balanced", "messages": [{"role": "user", "content": "Say hi"}]}'MCP server
Inferiq is also a remote MCP server at https://api.inferiq.run/v1/mcp, so Claude Code, Cursor and other MCP clients can price and run fixes and check your balance without leaving the editor. There’s nothing to install. Use an API key with the fix scope; every fix still gets a quote first, is paid from your balance and gets a receipt.
claude mcp add --transport http inferiq https://api.inferiq.run/v1/mcp \
--header "Authorization: Bearer iq_…"{
"mcpServers": {
"inferiq": {
"url": "https://api.inferiq.run/v1/mcp",
"headers": { "Authorization": "Bearer iq_…" }
}
}
}Tools
inferiq_quote: price a fix before it runs.inferiq_fix: run an approved quote and return the cause, a patch, steps to verify and any safety warnings. Nothing is applied for you.inferiq_balance: your available balance and what’s held.
If it doesn’t work
| You see | Check |
|---|---|
invalid_api_key | The key is copied whole, starts with iq_, and is sent as Authorization: Bearer (or x-api-key). |
unsupported_model | The model id matches one from GET /v1/models. Some tools add or strip a provider prefix. |
model_not_allowed | The tool asks for a model this key wasn’t given. Use a model the key allows, or create a key for it. |
insufficient_balance | Your balance covers the request’s worst case. Lower max_tokens in the tool, or add balance. |
| 404 on every request | The base URL ends in /v1 and the tool doesn’t add another /v1. |
| Nothing in Receipts | The console still shows sample data during early access. Look the receipt up with GET /v1/receipts/{id}. |