logoPofano

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#

ParameterTypeRequiredDescription
contentsarrayYesThe content to generate a response for, in Gemini format.
generationConfigobjectNoConfiguration for generation (temperature, topP, topK, maxOutputTokens).
safetySettingsarrayNoSafety filter settings.
systemInstructionobjectNoSystem-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/models for Gemini-native model discovery.
  • Do not rely on GET /v1/models?key=... for Gemini model listing; the public Gemini-compatible list is exposed through the v1beta routes.
  • OpenAI-style Gemini relay paths such as POST /v1/models/*path also exist internally, but the recommended public entrypoints are the v1beta routes documented above.

On this page