/v1beta/models/{model_name}:{action}/v1beta/models/gemini-2.5-pro:generateContent/v1beta/models/gemini-2.5-pro:streamGenerateContent?alt=sse{
"contents": [
{
"role": "user",
"parts": [
{
"text": "string",
"inlineData": {
"mimeType": "string",
"data": "string"
}
}
]
}
],
"generationConfig": {
"temperature": 0,
"topP": 0,
"topK": 0,
"maxOutputTokens": 0,
"stopSequences": [
"string"
]
},
"safetySettings": [
{
"category": "string",
"threshold": "string"
}
],
"tools": [
{}
],
"systemInstruction": {
"parts": [
{}
]
}
}curl --location -g --request POST 'http://api.example.com/v1beta/models/:generateContent' \
--header 'Authorization: Bearer sk-xxx' \
--header 'Content-Type: application/json' \
--data-raw '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "string",
"inlineData": {
"mimeType": "string",
"data": "string"
}
}
]
}
],
"generationConfig": {
"temperature": 0,
"topP": 0,
"topK": 0,
"maxOutputTokens": 0,
"stopSequences": [
"string"
]
},
"safetySettings": [
{
"category": "string",
"threshold": "string"
}
],
"tools": [
{}
],
"systemInstruction": {
"parts": [
{}
]
}
}'{
"candidates": [
{
"content": {
"role": "string",
"parts": [
{}
]
},
"finishReason": "string",
"safetyRatings": [
{}
]
}
],
"usageMetadata": {
"promptTokenCount": 0,
"candidatesTokenCount": 0,
"totalTokenCount": 0
}
}