Create Chat Completion
通过 OpenAI 兼容的 Chat Completions API 创建对话补全。
授权
Authorization: Bearer YOUR_API_KEY
请求体
A list of messages comprising the conversation so far. Supports text, images, audio, and file content parts depending on the model.
1Model ID (provider/model_name). Use the slug from List Models.
"openai/gpt-5.5-pro"
Upper bound for generated tokens, including visible output and reasoning tokens.
Sampling temperature. Higher values are more random; lower values are more deterministic.
0 <= x <= 2Nucleus sampling: only tokens within the top_p probability mass are considered.
0 <= x <= 1Number of chat completion choices per input message. ShuYou currently supports n=1 only.
1 <= x <= 128Penalize tokens based on existing frequency in the text so far.
-2 <= x <= 2Penalize tokens based on whether they appear in the text so far.
-2 <= x <= 2Up to 4 sequences where the API stops generating. Not supported on some reasoning models.
Maps token IDs to bias values (-100 to 100) applied before sampling.
Return log probabilities of output tokens.
Number of most likely tokens per position. Requires logprobs: true.
0 <= x <= 20Tools the model may call (function or custom tools).
- Option 1
- Option 2
Controls which tool(s) the model calls. Default: auto when tools are present, else none.
none, auto, required Whether to allow parallel tool calls in a single response.
Reasoning effort for reasoning models. Supported values vary by model.
none, minimal, low, medium, high, xhigh Constrains response verbosity.
low, medium, high Configuration for the web search tool.
Up to 16 key-value pairs (keys max 64 chars) for structured metadata.
Output format: text, json_object, or structured json_schema.
- Option 1
- Option 2
- Option 3
Stream the response via server-sent events.
Options when stream is true.
ShuYou: configure reasoning trace behavior.
ShuYou: multi-provider routing configuration.
ShuYou: model selection within a provider.