Skip to main content
POST

Authorizations

Authorization
string
header
required

Authorization: Bearer YOUR_API_KEY

Body

application/json
model
string
required

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

Example:

"openai/gpt-5.5-pro"

input

Plain-text input (equivalent to a single user message).

instructions
string

System/developer instructions. Not carried over when using previous_response_id.

previous_response_id
string

ID of the previous response for multi-turn conversations. Cannot be used with conversation.

conversation

Associates this response with a conversation.

prompt
object

Reference a prompt template and variables.

include
enum<string>[]

Additional output data to include in the response.

Available options:
web_search_call.action.sources,
computer_call_output.output.image_url,
message.input_image.image_url,
message.output_text.logprobs,
reasoning.encrypted_content
max_output_tokens
integer

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

max_tool_calls
integer

Maximum total built-in tool calls processed in this response.

parallel_tool_calls
boolean
default:true

Whether to allow parallel tool calls.

reasoning
object

Reasoning model configuration.

text
object

Text output configuration (plain text or structured JSON).

temperature
number
default:1
Required range: 0 <= x <= 2
top_p
number
default:1
Required range: 0 <= x <= 1
top_logprobs
integer
Required range: 0 <= x <= 20
truncation
enum<string>
default:disabled

Context truncation when input exceeds the context window.

Available options:
auto,
disabled
tools
object[]

Tools the model may call. ShuYou does not support file_search, code_interpreter, or image_generation tools.

tool_choice
Available options:
none,
auto,
required
store
boolean
default:true

Whether to store the response for later retrieval.

stream
boolean
default:false

Stream the response via server-sent events.

stream_options
object
prompt_cache_key
string

Cache key for similar requests (replaces legacy user).

prompt_cache_retention
enum<string>
Available options:
in_memory,
24h
safety_identifier
string

Stable hashed user identifier for abuse detection.

Maximum string length: 64
provider
object

ShuYou: multi-provider routing.

model_routing_config
object

ShuYou: model selection within a provider.

Response

Response object, or SSE stream when stream is true

id
string
object
enum<string>
Available options:
response
created_at
integer
status
enum<string>
Available options:
completed,
failed,
in_progress,
incomplete,
cancelled,
queued
model
string
output
object[]
usage
object
error
object
incomplete_details
object