API reference / Canonical host + OpenAI-compatible path / Supported models
API Overview

CheapAI API: the host, the /v1 path, and the first call.

CheapAI publishes a canonical public host and an OpenAI-compatible /v1 base URL. For most SDKs and clients, you should point the integration at the /v1 form.

Host and base URL rules

Use caseValueWhen to use it
Canonical public host https://cheapai-netifly-app.up.railway.app Use this when you need the root public host as a reference or when a delivery package explicitly calls for it.
OpenAI-compatible base URL https://cheapai-netifly-app.up.railway.app/v1 Use this for SDKs, curl, chat clients, automation tools, and most custom integrations.

Authentication

Use the API key from your order delivery package or customer portal access record.

Authorization header
Authorization: Bearer YOUR_CHEAPAI_API_KEY
!
Do not hardcode real keys in committed source files.

Keep them in local environment variables, deployment secrets, or the secret store provided by your tool.

Model discovery

Use the models endpoint to confirm the available public lineup before wiring a tool deeply.

List models
curl https://cheapai-netifly-app.up.railway.app/v1/models \
  -H "Authorization: Bearer YOUR_CHEAPAI_API_KEY"

Chat completions

The public examples in this repo use the OpenAI-compatible chat completions format.

curl chat completion
curl https://cheapai-netifly-app.up.railway.app/v1/chat/completions \
  -H "Authorization: Bearer YOUR_CHEAPAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-sonnet-4-6-20260217",
    "messages": [{"role": "user", "content": "Summarize the proxy pattern."}]
  }'

SDK examples

Python
from openai import OpenAI

client = OpenAI(
    base_url="https://cheapai-netifly-app.up.railway.app/v1",
    api_key="YOUR_CHEAPAI_API_KEY",
)
JavaScript
import OpenAI from "openai";

const client = new OpenAI({
  baseURL: "https://cheapai-netifly-app.up.railway.app/v1",
  apiKey: "YOUR_CHEAPAI_API_KEY",
});

What to do next

Browse docs
On this page