Call 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 capabilities like Thinking mode, multimodal input, tool calling, Google Search (Grounding), and image generation.| Feature | Method | Path |
|---|---|---|
| Content Generation (Non-streaming) | POST | /v1beta/models/{model}:generateContent |
| Content Generation (Streaming) | POST | /v1beta/models/{model}:streamGenerateContent?alt=sse |
| Header Parameter | Type | Description |
|---|---|---|
Authorization | string | Bearer Token: Bearer sk-xxxxxxxxxx (Recommended, consistent with other AboAI endpoints) |
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-pro:generateContent?key=undefined' \
--header 'x-goog-api-key: x-goog-api-key:sk-HusFtHu0hUwQU05an5Jf_YQOjD5norZDt5crVbsMN-o' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Introduce artificial intelligence in one sentence."
}
]
}
]
}'{
"candidates": [
{
"content": {
"parts": [
{
"text": "Response text"
}
],
"role": "model"
},
"finishReason": "STOP",
"index": 0,
"safetyRatings": []
}
],
"usageMetadata": {
"promptTokenCount": 10,
"candidatesTokenCount": 20,
"totalTokenCount": 30,
"thoughtsTokenCount": 0,
"cachedContentTokenCount": 0
},
"modelVersion": "gemini-2.5-pro",
"createTime": "2025-01-01T00:00:00Z"
}