curl --request POST \
--url https://api.acedata.cloud/v1beta/models/{model}:streamGenerateContent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Reply with exactly: Hello!"
}
]
}
]
}
'import requests
url = "https://api.acedata.cloud/v1beta/models/{model}:streamGenerateContent"
payload = { "contents": [
{
"role": "user",
"parts": [{ "text": "Reply with exactly: Hello!" }]
}
] }
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: [{role: 'user', parts: [{text: 'Reply with exactly: Hello!'}]}]})
};
fetch('https://api.acedata.cloud/v1beta/models/{model}:streamGenerateContent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));"data: {\"candidates\":[{\"content\":{\"parts\":[{\"text\":\"Hello!\"}],\"role\":\"model\"},\"index\":0}],\"modelVersion\":\"gemini-3.1-flash-lite\",\"model\":\"gemini-3.1-flash-lite\"}\n\ndata: {\"candidates\":[{\"content\":{\"parts\":[],\"role\":\"model\"},\"finishReason\":\"STOP\",\"index\":0}],\"usageMetadata\":{\"promptTokenCount\":7,\"candidatesTokenCount\":89,\"totalTokenCount\":96},\"usage\":{\"prompt_tokens\":7,\"completion_tokens\":89,\"total_tokens\":96,\"cost\":{\"amount\":0.00026161075472,\"currency\":\"credit\",\"list_amount\":0.000284359516}},\"modelVersion\":\"gemini-3.1-flash-lite\",\"model\":\"gemini-3.1-flash-lite\"}\n\n"Gemini Stream Generate Content
V1Beta Models Model Generatecontent
curl --request POST \
--url https://api.acedata.cloud/v1beta/models/{model}:streamGenerateContent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Reply with exactly: Hello!"
}
]
}
]
}
'import requests
url = "https://api.acedata.cloud/v1beta/models/{model}:streamGenerateContent"
payload = { "contents": [
{
"role": "user",
"parts": [{ "text": "Reply with exactly: Hello!" }]
}
] }
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: [{role: 'user', parts: [{text: 'Reply with exactly: Hello!'}]}]})
};
fetch('https://api.acedata.cloud/v1beta/models/{model}:streamGenerateContent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));"data: {\"candidates\":[{\"content\":{\"parts\":[{\"text\":\"Hello!\"}],\"role\":\"model\"},\"index\":0}],\"modelVersion\":\"gemini-3.1-flash-lite\",\"model\":\"gemini-3.1-flash-lite\"}\n\ndata: {\"candidates\":[{\"content\":{\"parts\":[],\"role\":\"model\"},\"finishReason\":\"STOP\",\"index\":0}],\"usageMetadata\":{\"promptTokenCount\":7,\"candidatesTokenCount\":89,\"totalTokenCount\":96},\"usage\":{\"prompt_tokens\":7,\"completion_tokens\":89,\"total_tokens\":96,\"cost\":{\"amount\":0.00026161075472,\"currency\":\"credit\",\"list_amount\":0.000284359516}},\"modelVersion\":\"gemini-3.1-flash-lite\",\"model\":\"gemini-3.1-flash-lite\"}\n\n"Авторизації
API token from https://platform.acedata.cloud
Заголовки
V1Beta Models Model Streamgeneratecontent Param Accept
text/event-stream Параметри шляху
V1Beta Models Model Generatecontent Param Model 2
gemini-3.8-flash, gemini-3.7-flash, gemini-3.6-flash, gemini-3.5-flash, gemini-3.5-flash-lite, gemini-3.1-flash-lite, gemini-3.1-pro-preview, gemini-3-flash-preview, gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite, 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 Тіло
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
Відповідь
V1Beta Models Model Streamgeneratecontent Response Sse
V1Beta Models Model Streamgeneratecontent Response Sse Schema
Чи була ця сторінка корисною?

