Generate Content
curl --request POST \
--url https://api.agipower.ai/v1/publishers/{provider}/models/{model}:generateContent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contents": [
{}
],
"generationConfig": {},
"tools": [
{}
]
}
'import requests
url = "https://api.agipower.ai/v1/publishers/{provider}/models/{model}:generateContent"
payload = {
"contents": [{}],
"generationConfig": {},
"tools": [{}]
}
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: [{}], generationConfig: {}, tools: [{}]})
};
fetch('https://api.agipower.ai/v1/publishers/{provider}/models/{model}:generateContent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{}Google Compatible API
Generate Content
POST
/
v1
/
publishers
/
{provider}
/
models
/
{model}
:generateContent
Generate Content
curl --request POST \
--url https://api.agipower.ai/v1/publishers/{provider}/models/{model}:generateContent \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"contents": [
{}
],
"generationConfig": {},
"tools": [
{}
]
}
'import requests
url = "https://api.agipower.ai/v1/publishers/{provider}/models/{model}:generateContent"
payload = {
"contents": [{}],
"generationConfig": {},
"tools": [{}]
}
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: [{}], generationConfig: {}, tools: [{}]})
};
fetch('https://api.agipower.ai/v1/publishers/{provider}/models/{model}:generateContent', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Example:
"google"
Example:
"gemini-2.0-flash"
Response
200 - application/json
Generated content response
The response is of type object.