OpenAI-compatible chat completions endpoint. Supports single-provider requests via model as well as automatic failover across providers via models.
Request
Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
Body Params application/jsonRequired
Examples
{"model":"openai/gpt-4o-mini","messages":[{"role":"system","content":"You are a precise assistant."},{"role":"user","content":"Outline a launch plan for CCAPI."}],"stream":false}
Request Code Samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
cURL
curl--location--request POST 'http://prod-cn.your-api-server.com/chat/completions' \
--header'Authorization: Bearer <token>' \
--header'Content-Type: application/json' \
--data-raw'{
"model": "openai/gpt-4o-mini",
"messages": [
{
"role": "system",
"content": "You are a precise assistant."
},
{
"role": "user",
"content": "Outline a launch plan for CCAPI."
}
],
"stream": false
}'
Responses
🟢200OK
application/json
Chat completion response. SSE stream when stream=true.