Documentation

Get to first token in five minutes.

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.

Quickstart

Every request goes to https://api.idclinks.com/v1. Set your API key in the Authorization header and pick a model from the catalog.

first-request.sh
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."}
    ]
  }'
Trial keys — request one at sales@idclinks.com with a short note about what you'll build. Trial credit is sized to validate a real workload, not just a smoke test.

Authentication

Bearer-token authentication. API keys are scoped to a project; project-scoped keys can be rotated independently and audited from the dashboard.

HeaderRequiredNotes
AuthorizationYesFormat: Bearer idc_live_…
Content-TypeYesapplication/json
idc-project-idNoOverride the project the request bills against
idc-region-hintNous-east, eu-fra, ap-sg, etc.
idc-no-retentionNotrue forces zero-retention route

Model names

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.

IdentifierFamilyContext
gemini-3.1-proFrontier1M
gpt-5.5Frontier1M
claude-opus-4.7Frontier1M
claude-sonnet-4.6Balanced1M
gpt-5.4-miniBalanced400K
gemini-3-flashBalanced1M
llama-4-maverickEfficient1M
deepseek-v4Efficient1M
qwen3-maxEfficient256K
phi-4Compact16K

Chat completions

POST /v1/chat/completions. Request and response shapes mirror the OpenAI schema. The full message array, role types, and parameter list are unchanged.

Streaming

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.

Tool calls

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+.

Structured output

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.

Vision input

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.


Response headers

Every response includes routing metadata so you always know where your tokens were generated and how much they cost.

HeaderDescription
idc-request-idStable per-request ID. Quote this in any sales/support email.
idc-regionRegion the request was served from.
idc-replicaReplica pool identifier.
idc-latency-msEnd-to-end latency, including upstream.
idc-token-ratePer-million-token rate applied to this request.
idc-failovertrue when an upstream failover occurred.

Errors & retries

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.

  • 400 — malformed request (validation failed before upstream)
  • 401 — invalid or missing API key
  • 402 — payment required (trial credit exhausted)
  • 429 — rate-limited, retry after the header value
  • 503 — all upstream pools exhausted; rare

Rate limits

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.

Observability

Per-request traces are emitted to your sink of choice:

  • Webhook — POST to your endpoint, signed with HMAC-SHA256.
  • S3 — newline-delimited JSON, written to a prefix you own.
  • OpenTelemetry — OTLP/gRPC export to a collector you specify.

Python

python.py
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)

TypeScript / Node

node.ts
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

curl.sh
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
  }'
Need something not covered? Email sales@idclinks.com — the on-call engineer answers technical questions directly.