curl --request POST \
--url https://api.shuyou.ai/openrouter/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "openai/gpt-5.5-pro",
"messages": [
{
"role": "developer",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!"
}
]
}
'{
"id": "chatcmpl-example",
"object": "chat.completion",
"created": 1741569952,
"model": "openai/gpt-5.5-pro",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! How can I assist you today?",
"refusal": null,
"annotations": []
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 19,
"completion_tokens": 10,
"total_tokens": 29,
"prompt_tokens_details": {
"cached_tokens": 0,
"audio_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 0,
"audio_tokens": 0,
"accepted_prediction_tokens": 0,
"rejected_prediction_tokens": 0
}
}
}Create Chat Completion
Create a chat completion using the OpenRouter-compatible Chat Completions API on ShuYou.
curl --request POST \
--url https://api.shuyou.ai/openrouter/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "openai/gpt-5.5-pro",
"messages": [
{
"role": "developer",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!"
}
]
}
'{
"id": "chatcmpl-example",
"object": "chat.completion",
"created": 1741569952,
"model": "openai/gpt-5.5-pro",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! How can I assist you today?",
"refusal": null,
"annotations": []
},
"logprobs": null,
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 19,
"completion_tokens": 10,
"total_tokens": 29,
"prompt_tokens_details": {
"cached_tokens": 0,
"audio_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 0,
"audio_tokens": 0,
"accepted_prediction_tokens": 0,
"rejected_prediction_tokens": 0
}
}
}Overview
Call OpenRouter models through ShuYou’s enterprise gateway. Supports streaming and non-streaming modes.https://api.shuyou.ai/openrouter
Endpoint: POST /v1/chat/completions
Use OpenRouter model slugs (for example openai/gpt-4o, anthropic/claude-sonnet-4) in the model field.Authorizations
Authorization: Bearer YOUR_API_KEY
Body
A list of messages comprising the conversation so far. Supports text, images, audio, and file content parts depending on the model.
1Show child attributes
Show child attributes
Model 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.
Show child attributes
Show child attributes
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
Show child attributes
Show child attributes
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.
Show child attributes
Show child attributes
Up to 16 key-value pairs (keys max 64 chars) for structured metadata.
Show child attributes
Show child attributes
Output format: text, json_object, or structured json_schema.
- Option 1
- Option 2
- Option 3
Show child attributes
Show child attributes
Stream the response via server-sent events.
Options when stream is true.
Show child attributes
Show child attributes
ShuYou: configure reasoning trace behavior.
Show child attributes
Show child attributes
ShuYou: multi-provider routing configuration.
Show child attributes
Show child attributes
ShuYou: model selection within a provider.
Show child attributes
Show child attributes