Invoke the AboAI API using the Google Gemini native format
google-generativeai SDK) or scenarios that require direct use of Gemini data structures. This interface complies with the Gemini API specifications and fully supports features such as Thinking mode, multimodal input, tool calling, Google Search (Grounding), and image generation.| Feature | Method | Path |
|---|---|---|
| Content Generation (Non-streaming) | POST | /v1beta/models/{model}:generateContent |
| Header Parameter | Type | Description |
|---|---|---|
Authorization | string | Bearer Token: Bearer sk-xxxxxxxxxx (Recommended, consistent with other AboAI interfaces) |
x-goog-api-key | string | Google-style API Key: x-goog-api-key: sk-xxxxxxxxxx |
?key=sk-xxxxxxxxxx.curl --location 'https://api.aboai.ai/v1beta/models/gemini-2.5-flash-image:generateContent?key=undefined' \
--header 'Authorization;' \
--header 'x-goog-api-key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Generate a picture of a cute cartoon cat"
}
]
}
],
"generationConfig": {
"responseModalities": [
"TEXT",
"IMAGE"
],
"imageConfig": {
"imageSize": "1k",
"aspectRatio": "16:9"
},
"maxOutputTokens": 4096
}
}'{
"candidates": [
{
"content": {
"parts": [
{
"text": "Response text\n"
},
{
"inlineData": {
"data": "",
"mimeType": "image/png"
}
}
],
"role": "model"
},
"index": 0,
"finishReason": "STOP"
}
],
"usageMetadata": {
"promptTokenCount": integer,
"candidatesTokenCount": integer,
"totalTokenCount": integer,
"promptTokensDetails": [
{
"modality": "TEXT",
"tokenCount": integer
}
],
"candidatesTokensDetails": [
{
"modality": "IMAGE",
"tokenCount": integer
},
{
"modality": "TEXT",
"tokenCount": integer
}
]
},
"modelVersion": "gemini-2.5-flash-image",
"responseId": "sXvYaYm-IqjZ8eEP6fv1oAI"
}