API Documentation

Get started with CheapAPI in 3 minutes.

Quick Start

1. Get your API key

After subscribing, your API key is sent to your email. It looks like: sk-th-xxxxxxxxxxxx

2. Install OpenAI SDK

pip install openai

3. Make your first request

from openai import OpenAI

client = OpenAI(
  base_url="https://api.cheap-api.io/v1",
  api_key="sk-th-your-key-here",
)

response = client.chat.completions.create({
  "model": "deepseek-chat",
  "messages": [{
    "role": "user",
    "content": "Hello, world!",
  }],
})

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

Available Models

Model IDProviderBest For
deepseek-chatDeepSeek-V3General purpose, coding
deepseek-reasonerDeepSeek-R1Math, logic, reasoning
qwen-maxAlibaba Qwen-MaxMultilingual, enterprise
qwen-plusAlibaba Qwen-PlusBalanced perf/cost
glm-4Zhipu GLM-4Cheapest, good quality
glm-4-flashZhipu GLM-4 FlashLightweight tasks

API Endpoints

POST/v1/chat/completionsChat completions (OpenAI-compatible)
GET/v1/modelsList available models
GET/healthHealth check

Rate Limits & Errors

HTTP CodeMeaning
200Success
401Invalid or missing API key
429Monthly quota exceeded or rate limit hit — upgrade your plan
503Upstream model temporarily unavailable, retry in 5s