Skip to main content

Documentation Index

Fetch the complete documentation index at: https://apixo.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

Use APIXO as a Gemini-compatible API gateway. Keep the Gemini request format, replace the base URL, and use your APIXO API key.

What to change

SettingAPIXO value
Base URLhttps://llm.apixo.ai
Request URLhttps://llm.apixo.ai/v1beta/models/{model}:generateContent
API keyAPIXO_API_KEY from APIXO API Keys
API key headerx-goog-api-key
Model locationURL path {model}

Quickstart

export APIXO_API_KEY="your_apixo_api_key"
curl -X POST "https://llm.apixo.ai/v1beta/models/gemini-3.1-pro-preview:generateContent" \
  -H "x-goog-api-key: $APIXO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [
      {
        "role": "user",
        "parts": [{"text": "Say hello in one sentence."}]
      }
    ]
  }'

Streaming

curl -N -X POST "https://llm.apixo.ai/v1beta/models/gemini-3.1-pro-preview:streamGenerateContent" \
  -H "x-goog-api-key: $APIXO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [
      {
        "role": "user",
        "parts": [{"text": "Stream a short hello message."}]
      }
    ]
  }'

JavaScript fetch example

Use a Gemini-compatible request URL with your APIXO API key.
const model = "gemini-3.1-pro-preview";
const response = await fetch(
  `https://llm.apixo.ai/v1beta/models/${model}:generateContent`,
  {
    method: "POST",
    headers: {
      "x-goog-api-key": process.env.APIXO_API_KEY,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      contents: [
        {
          role: "user",
          parts: [{ text: "Give me 3 rollout risk checks." }]
        }
      ]
    })
  }
);

const data = await response.json();
console.log(data);

Supported Gemini models

  • gemini-3.1-pro-preview
  • gemini-3.1-flash-lite-preview
  • gemini-3-pro-preview
  • gemini-3-flash-preview
  • gemini-2.5-pro
  • gemini-2.5-flash
  • gemini-2.5-flash-lite

Troubleshooting

  • 401: missing or invalid API key
  • 400: invalid Gemini request body, endpoint, or unsupported model id
  • 429: rate limit or temporary capacity limit
  • 502 / 504: upstream provider error or timeout
Retry 429, 502, and 504 with backoff. Fix 400 and 401 before retrying.