Gemini
Google Gemini API format.
Pofano supports the Google Gemini API format, including Gemini-native model listing and Gemini-style generation routes.
Supported Endpoints#
GET /v1beta/models
Returns the Gemini-visible model list for the current auth context.
POST /v1beta/models/{model}:generateContent
Sends a Gemini-native generation request.
GET /v1beta/openai/models
Returns the current auth context as an OpenAI-style model list for Gemini/OpenAI compatibility workflows.
Parameters#
| Parameter | Type | Required | Description |
|---|---|---|---|
contents | array | Yes | The content to generate a response for, in Gemini format. |
generationConfig | object | No | Configuration for generation (temperature, topP, topK, maxOutputTokens). |
safetySettings | array | No | Safety filter settings. |
systemInstruction | object | No | System-level instruction for the model. |
Authentication#
You can authenticate using a Bearer token, query parameter, or x-goog-api-key header:
List available Gemini models#
curl "https://ai.pofano.com/v1beta/models?key=YOUR_API_KEY"Using query parameter#
curl "https://ai.pofano.com/v1beta/models/gemini-2.0-flash:generateContent?key=YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [
{
"parts": [{"text": "What is the fastest animal on Earth?"}]
}
]
}'Using x-goog-api-key header#
curl https://ai.pofano.com/v1beta/models/gemini-2.0-flash:generateContent \
-H "Content-Type: application/json" \
-H "x-goog-api-key: YOUR_API_KEY" \
-d '{
"contents": [
{
"parts": [{"text": "What is the fastest animal on Earth?"}]
}
]
}'Using Bearer token#
curl https://ai.pofano.com/v1beta/models/gemini-2.0-flash:generateContent \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"contents": [
{
"parts": [{"text": "What is the fastest animal on Earth?"}]
}
]
}'Notes#
- Use
GET /v1beta/modelsfor Gemini-native model discovery. - Do not rely on
GET /v1/models?key=...for Gemini model listing; the public Gemini-compatible list is exposed through thev1betaroutes. - OpenAI-style Gemini relay paths such as
POST /v1/models/*pathalso exist internally, but the recommended public entrypoints are thev1betaroutes documented above.
Pofano