OpenAI SDK compatible · 200+ models · Start with one curl command
Make your first request in three minutes
Complete endpoint documentation
Choose the right balance of quality and cost
Works with the OpenAI SDK with minimal changes
curl https://api.pingai.hk/v1/chat/completions \
-H "Authorization: Bearer $PINGAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"anthropic/claude-sonnet-5","messages":[{"role":"user","content":"Hello"}]}'from openai import OpenAI
client = OpenAI(base_url="https://api.pingai.hk/v1", api_key="pingai_sk_xxx")
response = client.chat.completions.create(
model="anthropic/claude-sonnet-5",
messages=[{"role": "user", "content": "Hello"}]
)
print(response.choices[0].message.content)import OpenAI from 'openai'
const client = new OpenAI({ baseURL: 'https://api.pingai.hk/v1', apiKey: process.env.PINGAI_API_KEY })
const response = await client.chat.completions.create({
model: 'anthropic/claude-sonnet-5',
messages: [{ role: 'user', content: 'Hello' }]
})
console.log(response.choices[0].message.content)https://api.pingai.hk/v1OpenAI compatible—replace only base_url and api_key.
OpenAPI specification, Postman collection and error codes