IFC—DS / API reference — v1

Docs.

One OpenAI-compatible endpoint serves every LLM call in your app. Swap the base URL, keep your SDK, and never pick a model again — the router reads each task and serves it through the cheapest strategy that still solves it.

01 Quickstart

Base URL:

https://api.infercut.com/v1

Authenticate with an InferCut API key — create one under API Keys in your dashboard. Keys use the ic_sk_… format, are shown once at creation, and can be revoked at any time.

curl https://api.infercut.com/v1/chat/completions \
  -H "Authorization: Bearer ic_sk_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [{"role": "user", "content": "Summarize this contract in 3 bullets."}]
  }'

The model field is optional and ignored — routing is automatic. Send it if your SDK requires it; the router decides what actually serves the call.

Works with the official OpenAI SDKs — point baseURL at InferCut and everything else stays the same:

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: "ic_sk_YOUR_KEY",
  baseURL: "https://api.infercut.com/v1",
});

const res = await client.chat.completions.create({
  messages: [{ role: "user", content: "Hello" }],
});
console.log(res.choices[0].message.content);

02 Models & routing

GET /v1/models lists the endpoint your key can serve. Every call is profiled — task, complexity, context — and assigned automatically to the engine and techniques that solve it at the lowest cost: routing, prompt compression, micro-batching, semantic caching.

curl https://api.infercut.com/v1/models \
  -H "Authorization: Bearer ic_sk_YOUR_KEY"
{
  "object": "list",
  "data": [
    { "id": "infercut-engine-1", "object": "model", "owned_by": "infercut" }
  ]
}

Responses come back labeled infercut-engine-1. You never configure, price, or think about what serves the call — that's the router's job.

03 Streaming

Standard SSE streaming, identical to the OpenAI wire format:

{
  "messages": [{"role": "user", "content": "Write a haiku about routing."}],
  "stream": true
}

Chunks arrive as data: {…} events, ending with data: [DONE]. The final chunk carries a standard usage object with token counts. Identical requests that hit the cache layer return instantly and cost nothing — check the X-Infercut-Cache: HIT|MISS response header.

04 Errors

Errors use the OpenAI format: {"error": {"message", "type", "code"}}.

StatusMeaning
400Malformed request body — messages missing or invalid.
401Missing or invalid API key.
402Out of credits — top up from the Billing page in your dashboard.
403API key revoked.
429Rate limit exceeded — slow down and retry.
5xxUpstream provider failure — safe to retry with backoff.

05 Rate limits

Limits are enforced per API key (requests-per-minute and tokens-per-minute). Exceeding them returns 429 — retry after a short backoff. Need a higher ceiling for a launch? Write to support and we'll raise it before your traffic does.

06 Billing — prepaid credits

Accounts run on prepaid credits: top up with a card, and every request deducts credits based on what it actually used. Cache hits cost nothing. Your balance, per-request consumption and full history live in the dashboard.

When your balance reaches zero, calls return 402 until you top up. We give 30 days' notice before changing what a request deducts.

07 Security & retention

Zero retention: prompts and completions are never stored or logged, and never used for training. The cache layer is keyed by hash, not by content storage. All traffic is TLS in transit, and API keys are rotatable from the dashboard. We keep only per-request metadata — timestamps, token counts, latency, status — to meter your usage.