- Compatible with the OpenAI Chat Completions API format
- Select the
gpt-5.4model via themodelparameter - Supports streaming output (SSE)
- Supports multi-turn conversations, system prompts, and vision input
Authorizations
All endpoints require Bearer Token authentication.
Get an API Key: visit the API Key management page to obtain your API Key.
Add it to the request header:
Authorization: Bearer YOUR_API_KEYBody
gpt-5.4Model name
Example: "gpt-5.4"
List of conversation messages, in chronological order
falseWhether to enable streaming output (Server-Sent Events)
true: stream results token by tokenfalse: wait for the full response and return it all at once
Maximum number of tokens to generate
When unset, the model's default limit is used
1Sampling temperature, controls output randomness
- Range:
0~2 - Lower values produce more stable output, higher values more random output
1Nucleus sampling probability threshold
Range: 0 ~ 1. We recommend not modifying both temperature and top_p at the same time
Stop sequences; generation stops when the specified string is encountered
Up to 4 stop sequences
Response
Unique identifier for this request
Object type, always chat.completion
Request creation time (Unix timestamp)
The model actually used
List of generated results
choices[].message.role: message role, alwaysassistantchoices[].message.content: the generated text contentchoices[].finish_reason: reason for stopping —stop/length/content_filterchoices[].index: result index
Token usage statistics for this request
usage.prompt_tokens: number of input tokensusage.completion_tokens: number of output tokensusage.total_tokens: total number of tokens
