Skip to main content
POST

Authorizations

Authorization
string
header
required

Authorization: Bearer YOUR_API_KEY

Body

application/json
messages
object[]
required

A list of messages comprising the conversation so far. Supports text, images, audio, and file content parts depending on the model.

Minimum array length: 1
model
string
required

Model ID (provider/model_name). Use the slug from List Models.

Example:

"openai/gpt-5.5-pro"

max_completion_tokens
integer | null

Upper bound for generated tokens, including visible output and reasoning tokens.

temperature
number
default:1

Sampling temperature. Higher values are more random; lower values are more deterministic.

Required range: 0 <= x <= 2
top_p
number
default:1

Nucleus sampling: only tokens within the top_p probability mass are considered.

Required range: 0 <= x <= 1
n
integer
default:1

Number of chat completion choices per input message. ShuYou currently supports n=1 only.

Required range: 1 <= x <= 128
frequency_penalty
number
default:0

Penalize tokens based on existing frequency in the text so far.

Required range: -2 <= x <= 2
presence_penalty
number
default:0

Penalize tokens based on whether they appear in the text so far.

Required range: -2 <= x <= 2
stop

Up to 4 sequences where the API stops generating. Not supported on some reasoning models.

logit_bias
object

Maps token IDs to bias values (-100 to 100) applied before sampling.

logprobs
boolean | null
default:false

Return log probabilities of output tokens.

top_logprobs
integer

Number of most likely tokens per position. Requires logprobs: true.

Required range: 0 <= x <= 20
tools
object[]

Tools the model may call (function or custom tools).

tool_choice

Controls which tool(s) the model calls. Default: auto when tools are present, else none.

Available options:
none,
auto,
required
parallel_tool_calls
boolean
default:true

Whether to allow parallel tool calls in a single response.

reasoning_effort
enum<string>

Reasoning effort for reasoning models. Supported values vary by model.

Available options:
none,
minimal,
low,
medium,
high,
xhigh
verbosity
enum<string>

Constrains response verbosity.

Available options:
low,
medium,
high
web_search_options
object

Configuration for the web search tool.

metadata
object

Up to 16 key-value pairs (keys max 64 chars) for structured metadata.

response_format
object

Output format: text, json_object, or structured json_schema.

stream
boolean | null
default:false

Stream the response via server-sent events.

stream_options
object

Options when stream is true.

reasoning
object

ShuYou: configure reasoning trace behavior.

provider
object

ShuYou: multi-provider routing configuration.

model_routing_config
object

ShuYou: model selection within a provider.

Response

Chat completion object, or SSE stream when stream is true

id
string
object
enum<string>
Available options:
chat.completion
created
integer

Unix timestamp (seconds).

model
string
choices
object[]
usage
object
system_fingerprint
string