Inference Cheap

Quick Start

Connect with the OpenAI SDKs and your Inference Cheap key.

Connect

ClientBase URL
OpenAI SDKshttps://openai.inference.cheap/v1
Codex CLI / app · setuphttps://codex.inference.cheap

Get an API key from the Inference Cheap team. Pass it as Authorization: Bearer YOUR_API_KEY or the SDK's api_key option. Keep keys server-side.

Identify each conversation

Send a thread-id header with every request. Use one unique ID per conversation and reuse it for its messages and retries. Sharing one ID across different chats causes request errors. See Chat Identity for the rules.

thread-id: UNIQUE_THREAD_ID_FOR_EACH_CHAT

Send the full conversation history

Our Zero Data Retention (ZDR) policy for conversation history means we do not store your dialogues on our side. previous_response_id is not supported.

Send the full conversation history with every request, including previous user messages, assistant replies, and any tool calls and results. Use input for Responses or messages for Chat Completions, and resend the instructions and tool definitions needed for that request.

Keep the history in your application. A thread-id identifies the conversation but does not restore earlier messages; store: true does not enable history storage. Context omitted from a request cannot be recovered by the API.

Check your API key

export INFERENCE_CHEAP_API_KEY="YOUR_API_KEY"
curl --fail-with-body https://openai.inference.cheap/v1/models \
  -H "Authorization: Bearer $INFERENCE_CHEAP_API_KEY"

First request

Install the openai package. Use a model returned by /v1/models.

Python

import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["INFERENCE_CHEAP_API_KEY"],
    base_url="https://openai.inference.cheap/v1",
)
response = client.responses.create(
    model="gpt-5.6-sol",
    input="Say hello.",
    extra_headers={"thread-id": "UNIQUE_THREAD_ID_FOR_EACH_CHAT"},
)
print(response.output_text)

JavaScript

import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.INFERENCE_CHEAP_API_KEY,
  baseURL: "https://openai.inference.cheap/v1",
});
const response = await client.responses.create({
  model: "gpt-5.6-sol",
  input: "Say hello.",
}, {
  headers: { "thread-id": "UNIQUE_THREAD_ID_FOR_EACH_CHAT" },
});
console.log(response.output_text);

Q&A

Reference

See the API Spec for endpoints, parameters, and errors. For agents, the whole documentation is one Markdown file at docs.inference.cheap/llms-full.txt.

On this page