Gemini Stream Generate Content
curl --request POST \
--url https://api.acedata.cloud/v1beta/models/{model}:streamGenerateContent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contents": [
{
"parts": [
{
"text": "<string>",
"inlineData": {
"mimeType": "<string>",
"data": "<string>"
},
"fileData": {
"mimeType": "<string>",
"fileUri": "<string>"
},
"functionCall": {
"name": "<string>",
"args": {}
},
"functionResponse": {
"name": "<string>",
"response": {}
}
}
]
}
]
}
'import requests
url = "https://api.acedata.cloud/v1beta/models/{model}:streamGenerateContent"
payload = { "contents": [{ "parts": [
{
"text": "<string>",
"inlineData": {
"mimeType": "<string>",
"data": "<string>"
},
"fileData": {
"mimeType": "<string>",
"fileUri": "<string>"
},
"functionCall": {
"name": "<string>",
"args": {}
},
"functionResponse": {
"name": "<string>",
"response": {}
}
}
] }] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contents: [
{
parts: [
{
text: '<string>',
inlineData: {mimeType: '<string>', data: '<string>'},
fileData: {mimeType: '<string>', fileUri: '<string>'},
functionCall: {name: '<string>', args: {}},
functionResponse: {name: '<string>', response: {}}
}
]
}
]
})
};
fetch('https://api.acedata.cloud/v1beta/models/{model}:streamGenerateContent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"candidates": [
{
"content": {
"parts": [
{
"text": "<string>",
"thought": true
}
],
"role": "<string>"
},
"index": 123,
"safetyRatings": [
{
"category": "<string>",
"probability": "<string>",
"blocked": true
}
]
}
],
"usageMetadata": {
"promptTokenCount": 123,
"cachedContentTokenCount": 123,
"candidatesTokenCount": 123,
"totalTokenCount": 123,
"thoughtsTokenCount": 123,
"toolUsePromptTokenCount": 123,
"promptTokensDetails": [
{
"modality": "<string>",
"tokenCount": 123
}
],
"candidatesTokensDetails": [
{
"modality": "<string>",
"tokenCount": 123
}
],
"cacheTokensDetails": [
{
"modality": "<string>",
"tokenCount": 123
}
],
"toolUsePromptTokensDetails": [
{
"modality": "<string>",
"tokenCount": 123
}
]
},
"modelVersion": "<string>",
"responseId": "<string>"
}
]API Reference
Gemini Stream Generate Content
V1Beta Models Model Generatecontent
POST
/
v1beta
/
models
/
{model}
:streamGenerateContent
Gemini Stream Generate Content
curl --request POST \
--url https://api.acedata.cloud/v1beta/models/{model}:streamGenerateContent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contents": [
{
"parts": [
{
"text": "<string>",
"inlineData": {
"mimeType": "<string>",
"data": "<string>"
},
"fileData": {
"mimeType": "<string>",
"fileUri": "<string>"
},
"functionCall": {
"name": "<string>",
"args": {}
},
"functionResponse": {
"name": "<string>",
"response": {}
}
}
]
}
]
}
'import requests
url = "https://api.acedata.cloud/v1beta/models/{model}:streamGenerateContent"
payload = { "contents": [{ "parts": [
{
"text": "<string>",
"inlineData": {
"mimeType": "<string>",
"data": "<string>"
},
"fileData": {
"mimeType": "<string>",
"fileUri": "<string>"
},
"functionCall": {
"name": "<string>",
"args": {}
},
"functionResponse": {
"name": "<string>",
"response": {}
}
}
] }] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contents: [
{
parts: [
{
text: '<string>',
inlineData: {mimeType: '<string>', data: '<string>'},
fileData: {mimeType: '<string>', fileUri: '<string>'},
functionCall: {name: '<string>', args: {}},
functionResponse: {name: '<string>', response: {}}
}
]
}
]
})
};
fetch('https://api.acedata.cloud/v1beta/models/{model}:streamGenerateContent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));[
{
"candidates": [
{
"content": {
"parts": [
{
"text": "<string>",
"thought": true
}
],
"role": "<string>"
},
"index": 123,
"safetyRatings": [
{
"category": "<string>",
"probability": "<string>",
"blocked": true
}
]
}
],
"usageMetadata": {
"promptTokenCount": 123,
"cachedContentTokenCount": 123,
"candidatesTokenCount": 123,
"totalTokenCount": 123,
"thoughtsTokenCount": 123,
"toolUsePromptTokenCount": 123,
"promptTokensDetails": [
{
"modality": "<string>",
"tokenCount": 123
}
],
"candidatesTokensDetails": [
{
"modality": "<string>",
"tokenCount": 123
}
],
"cacheTokensDetails": [
{
"modality": "<string>",
"tokenCount": 123
}
],
"toolUsePromptTokensDetails": [
{
"modality": "<string>",
"tokenCount": 123
}
]
},
"modelVersion": "<string>",
"responseId": "<string>"
}
]承認
API token from https://platform.acedata.cloud
パスパラメータ
V1Beta Models Model Generatecontent Param Model 2
利用可能なオプション:
gemini-2.0-flash, gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.5-pro, gemini-3-flash-preview, gemini-3.5-flash, gemini-3.0-pro, gemini-3.1-pro, gemini-3.1-flash-lite-preview, gemini-3.1-flash-image, gemini-2.5-flash-image, gemini-3-pro-image 例:
"gemini-2.5-flash"
クエリパラメータ
V1Beta Models Model Generatecontent Param Alt
利用可能なオプション:
sse ボディ
application/json
V1Beta Models Model Generatecontent Contents
Show child attributes
Show child attributes
V1Beta Models Model Generatecontent Systeminstruction
Show child attributes
Show child attributes
V1Beta Models Model Generatecontent Generationconfig
Show child attributes
Show child attributes
V1Beta Models Model Generatecontent Tools
Show child attributes
Show child attributes
V1Beta Models Model Generatecontent Toolconfig
Show child attributes
Show child attributes
V1Beta Models Model Generatecontent Safetysettings
Show child attributes
Show child attributes
⌘I

