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.

Every official OpenAI SDK works out of the box — point it at the InferCut base URL. Full copy-paste examples in Integrations below.

02 Integrations

Same three lines in every language: install the SDK, set the base URL to InferCut, use your ic_sk_… key. Where the SDK insists on a model name, pass infercut-engine-1 — routing is automatic either way.

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."}]
  }'
pip install openai
from openai import OpenAI

client = OpenAI(
    api_key="ic_sk_YOUR_KEY",
    base_url="https://api.infercut.com/v1",
)

res = client.chat.completions.create(
    messages=[{"role": "user", "content": "Summarize this contract in 3 bullets."}],
)
print(res.choices[0].message.content)
npm install openai
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: "Summarize this contract in 3 bullets." }],
});
console.log(res.choices[0].message.content);
npm install openai
import OpenAI from "openai";

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

const res = await client.chat.completions.create({
  messages: [{ role: "user", content: "Summarize this contract in 3 bullets." }],
});
const answer: string | null = res.choices[0].message.content;
console.log(answer);
go get github.com/openai/openai-go
package main

import (
	"context"
	"fmt"

	"github.com/openai/openai-go"
	"github.com/openai/openai-go/option"
)

func main() {
	client := openai.NewClient(
		option.WithAPIKey("ic_sk_YOUR_KEY"),
		option.WithBaseURL("https://api.infercut.com/v1"),
	)

	res, err := client.Chat.Completions.New(context.TODO(), openai.ChatCompletionNewParams{
		Model: openai.ChatModel("infercut-engine-1"),
		Messages: []openai.ChatCompletionMessageParamUnion{
			openai.UserMessage("Summarize this contract in 3 bullets."),
		},
	})
	if err != nil {
		panic(err)
	}
	fmt.Println(res.Choices[0].Message.Content)
}
// Maven: <dependency> com.openai:openai-java </dependency>
// Gradle: implementation "com.openai:openai-java"
import com.openai.client.OpenAIClient;
import com.openai.client.okhttp.OpenAIOkHttpClient;
import com.openai.models.*;

public class Main {
  public static void main(String[] args) {
    OpenAIClient client = OpenAIOkHttpClient.builder()
        .apiKey("ic_sk_YOUR_KEY")
        .baseUrl("https://api.infercut.com/v1")
        .build();

    ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()
        .model("infercut-engine-1")
        .addMessage(ChatCompletionMessageParam.ofUser(
            ChatCompletionUserMessageParam.builder()
                .content(ChatCompletionUserMessageParam.Content.ofString(
                    "Summarize this contract in 3 bullets."))
                .build()))
        .build();

    ChatCompletion res = client.chat().completions().create(params);
    System.out.println(res.choices().get(0).message().content());
  }
}
dotnet add package OpenAI
using OpenAI;
using OpenAI.Chat;

var client = new OpenAIClient("ic_sk_YOUR_KEY",
    new OpenAIClientOptions { Endpoint = new Uri("https://api.infercut.com/v1") });
ChatClient chat = client.GetChatClient("infercut-engine-1");

ChatCompletion completion = await chat.CompleteChatAsync(
    new[] { ChatMessage.CreateUserMessage("Summarize this contract in 3 bullets.") });

Console.WriteLine(completion.Content[0].Text);
composer require openai-php/client php-http/curl-client
require 'vendor/autoload.php';

$client = OpenAI::factory()
    ->withApiKey('ic_sk_YOUR_KEY')
    ->withBaseUri('https://api.infercut.com/v1')
    ->make();

$result = $client->chat()->create([
    'messages' => [
        ['role' => 'user', 'content' => 'Summarize this contract in 3 bullets.'],
    ],
]);

echo $result->choices[0]->message->content;
gem install ruby-openai
require "openai"

client = OpenAI::Client.new(
  access_token: "ic_sk_YOUR_KEY",
  uri_base: "https://api.infercut.com/v1",
)

response = client.chat(parameters: {
  messages: [{ role: "user", content: "Summarize this contract in 3 bullets." }],
})

puts response.dig("choices", 0, "message", "content")

Streaming works the same way in every SDK — pass stream: true and iterate the chunks. The wire format is identical to what your SDK already speaks.

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

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

05 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 balance — 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.

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

07 Billing — prepaid in dollars

Accounts run on a prepaid balance: you top up in dollars with a card, we handle the optimization, and every request deducts based on what it actually used. Cache hits cost nothing. Your balance, per-request cost 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.

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