OpenAI SDKs

Use CheapAI anywhere with the OpenAI /v1 path.

This is the main integration path for curl, fetch, backend apps, scripts, the OpenAI Python SDK, and the OpenAI Node SDK.

curl

curl
curl https://base.cheap-api.shop/v1/chat/completions ^
  -H "Authorization: Bearer YOUR_CHEAPAI_KEY" ^
  -H "Content-Type: application/json" ^
  -d "{\"model\":\"gpt-5.3\",\"messages\":[{\"role\":\"user\",\"content\":\"Say sdk-ok\"}]}"

OpenAI Python SDK

Python
from openai import OpenAI

client = OpenAI(
    base_url="https://base.cheap-api.shop/v1",
    api_key="YOUR_CHEAPAI_KEY",
)

response = client.chat.completions.create(
    model="gpt-5.3",
    messages=[{"role": "user", "content": "Say sdk-ok"}],
)

print(response.choices[0].message.content)

OpenAI Node SDK

Node.js
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://base.cheap-api.shop/v1",
  apiKey: "YOUR_CHEAPAI_KEY",
});

const response = await client.chat.completions.create({
  model: "gpt-5.3",
  messages: [{ role: "user", content: "Say sdk-ok" }],
});

console.log(response.choices[0].message.content);

Responses API

CheapAI exposes /v1/responses, but keep the first implementation simple: use it in non-stream mode first.

Live provider matrix

The matrix below is rendered from the current public catalog, so newly added or reordered providers show up here without rewriting this page.

ProviderModelsEndpoint format
Loading…Loading current catalog./v1
Browse docs
On this page