Getting started
Quickstart
Three steps: top up, create a key, call the API. It is fully compatible with OpenAI Chat Completions.
1. Top up
In the console, open Billing and pay with USDT, Alipay or WeChat. Minimum $10.
2. Create a key
Create one on the API keys page. The full key is shown once — store it as AITOKEN_KEY.
3. Call
python
from openai import OpenAI
client = OpenAI(base_url="https://api.suanlimao.shop/v1", api_key="sk-ait-...")
resp = client.chat.completions.create(
model="claude-sonnet-5-5",
messages=[{"role": "user", "content": "Hello"}],
)
print(resp.choices[0].message.content)node
import OpenAI from "openai";
const client = new OpenAI({ baseURL: "https://api.suanlimao.shop/v1", apiKey: process.env.AITOKEN_KEY });
const stream = await client.chat.completions.create({
model: "claude-sonnet-5-5",
messages: [{ role: "user", content: "Hello" }],
stream: true,
});
for await (const chunk of stream) process.stdout.write(chunk.choices[0]?.delta?.content ?? "");bash
curl https://api.suanlimao.shop/v1/chat/completions \
-H "Authorization: Bearer $AITOKEN_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"claude-sonnet-5-5","messages":[{"role":"user","content":"Hello"}]}'