API requests
Choose an endpoint and use cURL, Python or JavaScript.
Use the protocol supported by the selected model. API compatibility applies to enabled endpoints and model capabilities; do not assume every provider feature is available.
| Method | Endpoint | Use case |
|---|---|---|
GET | /v1/models | List models available to your API key. |
POST | /v1/responses | Responses-compatible models and coding tools. |
POST | /v1/chat/completions | Chat Completions-compatible models and chat clients. |
POST | /v1/messages | Anthropic Messages-compatible models and Claude Code. |
Use https://cheapai.info/v1 as the OpenAI SDK base URL. For a raw HTTP request, use the full endpoint exactly once. A URL such as /v1/v1/responses will fail.
Language
Endpoint
Install the OpenAI Python package, then run this file with the environment variables from Quick start.
python -m pip install openaiimport os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["CHEAPAI_API_KEY"],
base_url="https://cheapai.info/v1",
)
response = client.responses.create(
model=os.environ["CHEAPAI_MODEL"],
input="Hello!",
)
print(response.output_text)For images, video and other capabilities, first check the model detail page for the enabled endpoint, supported parameters and billing unit.