The idclinks API is OpenAI-compatible. If you already speak that schema, change the base URL and you're done. The rest of this page is the surface that goes beyond it.
Every request goes to https://api.idclinks.com/v1. Set your API key in the
Authorization header and pick a model from the catalog.
curl https://api.idclinks.com/v1/chat/completions \ -H "Authorization: Bearer $IDCLINKS_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "claude-sonnet-4.6", "messages": [ {"role": "user", "content": "Hello, world."} ] }'
Bearer-token authentication. API keys are scoped to a project; project-scoped keys can be rotated independently and audited from the dashboard.
| Header | Required | Notes |
|---|---|---|
| Authorization | Yes | Format: Bearer idc_live_… |
| Content-Type | Yes | application/json |
| idc-project-id | No | Override the project the request bills against |
| idc-region-hint | No | us-east, eu-fra, ap-sg, etc. |
| idc-no-retention | No | true forces zero-retention route |
Pass the model as a string. Names are stable across regions; you don't need to encode the region or replica in the model name.
| Identifier | Family | Context |
|---|---|---|
| gemini-3.1-pro | Frontier | 1M |
| gpt-5.5 | Frontier | 1M |
| claude-opus-4.7 | Frontier | 1M |
| claude-sonnet-4.6 | Balanced | 1M |
| gpt-5.4-mini | Balanced | 400K |
| gemini-3-flash | Balanced | 1M |
| llama-4-maverick | Efficient | 1M |
| deepseek-v4 | Efficient | 1M |
| qwen3-max | Efficient | 256K |
| phi-4 | Compact | 16K |
POST /v1/chat/completions. Request and response shapes mirror the OpenAI
schema. The full message array, role types, and parameter list are unchanged.
Set stream: true. Responses arrive as text/event-stream with
standard SSE delta chunks. The final chunk is [DONE] exactly as in the
upstream schema.
Pass a tools array on the request. Models that support tool-use will emit
tool_calls on the assistant message; reply with a tool-role
message and the result. Available on Claude, GPT, Gemini, Mistral, and Command R+.
Set response_format: { type: "json_schema", json_schema: { ... } }. The
gateway validates against your schema and retries once on a validation miss before
surfacing the error.
Pass image content as image_url parts inside the message. Public URLs and
base64 data URIs are both supported. Vision-capable models are flagged in the catalog
with the vision tag.
Every response includes routing metadata so you always know where your tokens were generated and how much they cost.
| Header | Description |
|---|---|
| idc-request-id | Stable per-request ID. Quote this in any sales/support email. |
| idc-region | Region the request was served from. |
| idc-replica | Replica pool identifier. |
| idc-latency-ms | End-to-end latency, including upstream. |
| idc-token-rate | Per-million-token rate applied to this request. |
| idc-failover | true when an upstream failover occurred. |
The gateway returns standard HTTP status codes. 429 and 5xx
responses include a Retry-After header; client-side retries should respect
it. Upstream failovers are automatic and don't count against your retry budget.
Default Developer-tier ceiling is 10,000 requests/min per project. Scale and Enterprise plans get reservable per-tenant budgets that you can rebalance from the dashboard or via the management API.
Per-request traces are emitted to your sink of choice:
from openai import OpenAI client = OpenAI( base_url="https://api.idclinks.com/v1", api_key=os.environ["IDCLINKS_KEY"], ) resp = client.chat.completions.create( model="claude-sonnet-4.6", messages=[{"role": "user", "content": "Hi"}], ) print(resp.choices[0].message.content)
import OpenAI from "openai"; const client = new OpenAI({ baseURL: "https://api.idclinks.com/v1", apiKey: process.env.IDCLINKS_KEY, }); const resp = await client.chat.completions.create({ model: "gpt-5.5", messages: [{ role: "user", content: "Hi" }], });
curl -N https://api.idclinks.com/v1/chat/completions \ -H "Authorization: Bearer $IDCLINKS_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "deepseek-v4", "messages": [{"role":"user","content":"Hi"}], "stream": true }'