Gemini Generate Content
curl --request POST \
--url https://api.acedata.cloud/v1beta/models/{model}:generateContent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Hello!"
}
]
}
]
}
'import requests
url = "https://api.acedata.cloud/v1beta/models/{model}:generateContent"
payload = { "contents": [
{
"role": "user",
"parts": [{ "text": "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: 'Hello!'}]}]})
};
fetch('https://api.acedata.cloud/v1beta/models/{model}:generateContent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"candidates": [
{
"content": {
"parts": [
{
"text": "<string>",
"thought": true
}
],
"role": "<string>"
},
"finishReason": "STOP",
"index": 123,
"safetyRatings": [
{
"category": "<string>",
"probability": "<string>",
"blocked": true
}
]
}
],
"usageMetadata": {
"promptTokenCount": 123,
"candidatesTokenCount": 123,
"totalTokenCount": 123,
"thoughtsTokenCount": 123,
"promptTokensDetails": [
{
"modality": "<string>",
"tokenCount": 123
}
],
"candidatesTokensDetails": [
{
"modality": "<string>",
"tokenCount": 123
}
]
},
"modelVersion": "<string>",
"responseId": "<string>"
}{
"error": {
"code": 123,
"message": "<string>",
"status": "<string>"
}
}API Reference
Gemini Generate Content
POST
/
v1beta
/
models
/
{model}
:generateContent
Gemini Generate Content
curl --request POST \
--url https://api.acedata.cloud/v1beta/models/{model}:generateContent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Hello!"
}
]
}
]
}
'import requests
url = "https://api.acedata.cloud/v1beta/models/{model}:generateContent"
payload = { "contents": [
{
"role": "user",
"parts": [{ "text": "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: 'Hello!'}]}]})
};
fetch('https://api.acedata.cloud/v1beta/models/{model}:generateContent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"candidates": [
{
"content": {
"parts": [
{
"text": "<string>",
"thought": true
}
],
"role": "<string>"
},
"finishReason": "STOP",
"index": 123,
"safetyRatings": [
{
"category": "<string>",
"probability": "<string>",
"blocked": true
}
]
}
],
"usageMetadata": {
"promptTokenCount": 123,
"candidatesTokenCount": 123,
"totalTokenCount": 123,
"thoughtsTokenCount": 123,
"promptTokensDetails": [
{
"modality": "<string>",
"tokenCount": 123
}
],
"candidatesTokensDetails": [
{
"modality": "<string>",
"tokenCount": 123
}
]
},
"modelVersion": "<string>",
"responseId": "<string>"
}{
"error": {
"code": 123,
"message": "<string>",
"status": "<string>"
}
}Авторизации
API token from https://platform.acedata.cloud
Параметры пути
V1Beta Models Model Generatecontent Param Model
Доступные опции:
gemini-2.5-flash, gemini-2.5-pro, gemini-2.5-flash-lite, gemini-3-flash-preview, gemini-3.5-flash, gemini-3.1-pro, gemini-2.0-flash Пример:
"gemini-2.5-flash"
Тело
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
V1Beta Models Model Generatecontent Cachedcontent
Была ли эта страница полезной?

