OpenAI-compatible API
Learn the Base URL, authentication, and minimal request for calling the OpenAI-compatible API through Qiuqiu Token.
Use the OpenAI-compatible API for custom HTTP requests, OpenAI-compatible SDKs, and clients that ask for a /v1 Base URL. Codex CLI, Grok CLI, OpenCode, and Cherry Studio’s OpenAI provider use this address format.
Base URL
Section titled “Base URL”Chat Completions
Section titled “Chat Completions”/v1/chat/completionsResponses
Section titled “Responses”/v1/responsesWhat to prepare
Section titled “What to prepare”-
Prepare an API token.
Create the API token in the console. Use a token group that matches the client or model scenario you want to call. The examples use
sk-your-tokenas a placeholder; replace it with your API token when sending a real request. -
Confirm the model name.
The
modelvalue must be an available model name from the Model Catalog.<model-id>in the example is only a placeholder. -
Confirm the access route.
Use the Base URL above by default. If the network is unstable, choose another OpenAI-compatible address with the same format from API Access Routes.
Minimal request
Section titled “Minimal request”curl https://api.qiuqiutoken.net/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-your-token" \
-d '{
"model": "<model-id>",
"messages": [
{ "role": "user", "content": "Introduce Qiuqiu Token in one sentence." }
]
}'More protocol fields
Section titled “More protocol fields”When using an official OpenAI example, replace the Base URL with the address above and enter the API token created in the console. For request fields, response structures, and other endpoints, see the official OpenAI API Reference.
