Getting Started
Create an API key and make your first request in under five minutes.
On this page
Getting Started#
Clean APIs exposes an OpenAI-compatible API. If your tool already talks to OpenAI, you only need to change two things: the base URL and the API key.
Base URL
https://cleanapis.com/v1
1. Create an API key#
Sign up, open Dashboard → API Keys, and click Create Key. The key is shown once — copy it immediately. Keys look like cc_ followed by 48 characters.
2. Make your first request#
curl https://cleanapis.com/v1/chat/completions \
-H "Authorization: Bearer cc_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-4.8",
"messages": [{"role": "user", "content": "Hello!"}]
}'
3. Use an official OpenAI SDK#
Point the SDK at our base URL and everything else works unchanged.
Python
from openai import OpenAI
client = OpenAI(
api_key="cc_your_key_here",
base_url="https://cleanapis.com/v1",
)
response = client.chat.completions.create(
model="claude-opus-4.8",
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)
Node.js
import OpenAI from "openai";
const client = new OpenAI({
apiKey: "cc_your_key_here",
baseURL: "https://cleanapis.com/v1",
});
const response = await client.chat.completions.create({
model: "claude-opus-4.8",
messages: [{ role: "user", content: "Hello!" }],
});
console.log(response.choices[0].message.content);
4. Connect a coding agent#
Most AI coding tools accept a custom OpenAI-compatible endpoint. Set:
| Setting | Value |
|---|---|
| API Provider | OpenAI Compatible |
| Base URL | https://cleanapis.com/v1 |
| API Key | your cc_... key |
| Model | any model ID from /models |
Verified with Kilo Code, Cline, Cursor, opencode, and Continue.
Available endpoints#
| Method | Endpoint | Purpose |
|---|---|---|
GET |
/models |
List available models |
GET |
/models/{id} |
Retrieve one model |
POST |
/chat/completions |
Generate a chat completion |
POST |
/embeddings |
Create embeddings |
Still stuck?
Open a support ticket from your dashboard and we'll take a look.