Create chat
Unified OpenAI compatible portal. Select the upstream via model, for example: - gpt-4o / gpt-4o-audio-preview → OpenAI - gemini-2.5-flash-all → Google Gemini (compatible format) - For other models see GET /v1/models…
/v1/chat/completionsBody Parametersapplication/json
The model ID to use. The gateway will select channels by token grouping, and may do model name mapping or suffix resolution (such as -thinking, -search).
List of conversation messages, at least one. Supports multiple rounds: system/user/assistant/tool.
Whether to stream output. false: Return the complete JSON at once; true: SSE incremental push, ending with data: [DONE].
Additional options when streaming, such as whether to return the token usage at the end of the stream.
The maximum number of tokens generated in this reply (common fields).
Complete the upper limit of token (more commonly used in inference models such as o series and GPT-5). Max_tokens may be inherited when not set.
Sampling temperature, usually 0~2. The higher the value, the more random the response is, and the lower the value, the more stable it is. Usually only one is adjusted with top_p.
Kernel sampling, 0~1. Only sample tokens whose cumulative probability reaches top_p.
Generate several assistant reply candidates for the same round of input.
Stop generation when these strings are encountered. Can be a single string or an array of strings (up to 4).
There is a penalty, about -2~2. Positive value reduces repetition of topic expressions that have already appeared.
Frequency penalty, about -2~2. Positive values reduce the probability of repeating the same words.
Adjust the occurrence probability according to the token ID, and the value is a mapping object between -100 and 100.
Random seeds, try to get reproducible results under the same parameters (complete consistency is not guaranteed). Note that the field is named seed.
The unique identifier of the end user facilitates abuse detection and statistics on the platform side.
Constrain model output formats, such as JSON schema. When using json_object please explicitly request JSON output in the message.
A list of tools (functions) that the model can call, used for function calling in conversations.
Control whether to call the tool: none (not called), auto (automatic), required (must be called), or specify a function.
Whether to allow multiple tool calls to be made in parallel in a single reply (when supported by upstream).
Inference model strength (such as low / medium / high). It can also be automatically injected by the gateway through the model name suffix.
Whether to enable thinking mode (extension of this warehouse). Only the Boolean value true takes effect; choose one of extra_body.enable_thinking.
Dialog extension parameters. Commonly used: enable_thinking; some Gemini models can use google.thinking_config, etc. Whether it takes effect depends on the channel and model.
Search options for models that support networking (such as OpenAI networking class capabilities).
Responses
List of candidate results
Creation time (Unix timestamp)
Resource or task ID
Model name / model ID
Object type identifier, e.g. chat.completion
Service tier / priority
Backend configuration fingerprint
Token usage statistics
