curl --request POST \
--url https://api.shuyou.ai/v1beta/models/{model}:generateContent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Please introduce yourself."
}
]
}
]
}
'{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": "Hello! How can I help you today?"
}
]
},
"finishReason": "STOP",
"index": 0
}
],
"usageMetadata": {
"promptTokenCount": 12,
"candidatesTokenCount": 18,
"totalTokenCount": 30
},
"modelVersion": "gemini-3.5-flash",
"responseId": "resp_example"
}Google Compatible API
Generate Content
Generate content with Google Vertex AI compatible generateContent API.
POST
/
v1beta
/
models
/
{model}
:generateContent
curl --request POST \
--url https://api.shuyou.ai/v1beta/models/{model}:generateContent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Please introduce yourself."
}
]
}
]
}
'{
"candidates": [
{
"content": {
"role": "model",
"parts": [
{
"text": "Hello! How can I help you today?"
}
]
},
"finishReason": "STOP",
"index": 0
}
],
"usageMetadata": {
"promptTokenCount": 12,
"candidatesTokenCount": 18,
"totalTokenCount": 30
},
"modelVersion": "gemini-3.5-flash",
"responseId": "resp_example"
}Authorizations
Authorization: Bearer YOUR_API_KEY
Path Parameters
Model ID in Google Native API format (e.g. gemini-3.5-flash, gemini-2.5-flash).
Example:
"gemini-3.5-flash"
Body
application/json
Conversation contents. Supports multi-turn dialogue and multimodal input.
Minimum array length:
1Show child attributes
Show child attributes
System instruction (optional). Use text parts only.
Show child attributes
Show child attributes
Generation parameters (sampling, length, structured output, modalities, thinking, etc.).
Show child attributes
Show child attributes
Tools the model may call (function calling, search, code execution, etc.).
Tool configuration shared across all tools in the request.
Per-request safety settings for candidates.
Show child attributes
Show child attributes
Cached content resource name, e.g. cachedContents/{id}.