All endpoints require Bearer Token authentication
Get API Key:
Visit API Key Management Page to get your API Key
Add to request headers:
Authorization: Bearer YOUR_API_KEYModel name for chat completion
gpt-5.1, gpt-5.1-chat, gpt-5.1-thinking "gpt-5.1"
List of messages for the conversation, supports multi-turn dialogue and multimodal input
1Whether to stream the response
true: Stream response, returns content chunk by chunk in real-timefalse: Wait for complete response and return all at oncefalse
Maximum number of tokens to generate in the response
x >= 12000
Sampling temperature, controls randomness of output
0 <= x <= 21
Nucleus sampling parameter
0 <= x <= 10.9
Frequency penalty, number between -2.0 and 2.0
-2 <= x <= 20
Presence penalty, number between -2.0 and 2.0
-2 <= x <= 20
Stop sequences, generation stops when these sequences are matched
List of tools for Function Calling
Chat completion successful
Unique identifier for the chat completion
"chatcmpl-abc123"
The model used for completion
"gpt-5.1"
Response type
chat.completion "chat.completion"
Unix timestamp when the completion was created
1698999496
List of completion choices
Token usage statistics