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.

APIXO provides the official Google Gemini endpoints. Keep your Gemini request shape and switch the base URL to https://llm.apixo.ai.

Quick Start

Non-streaming

curl -X POST "https://llm.apixo.ai/v1beta/models/gemini-3.1-pro-preview:generateContent" \
  -H "x-goog-api-key: YOUR_APIXO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contents": [
      {
        "role": "user",
        "parts": [{"text": "Explain function calling in Gemini."}]
      }
    ]
  }'

Streaming

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

Endpoints

  • POST /v1beta/models/{model}:generateContent
  • POST /v1beta/models/{model}:streamGenerateContent
  • Base URL: https://llm.apixo.ai

Authentication

x-goog-api-key
string
required
Your APIXO API key.
?key= query auth is not recommended and is disabled by default in production configuration.

Supported Gemini Models

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

SDK Integration (JavaScript fetch)

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);

Error Handling and Retry

  • 401: missing or invalid API key
  • 400: invalid request body or missing required fields
  • 429: rate limit or daily quota exceeded
  • 502: upstream request failed
  • 504: upstream timeout
Recommended retry policy:
  • Retry 429/502/504 with exponential backoff
  • Do not retry 400/401 before fixing request/auth issues

Quick Reference

ItemValue
Base URLhttps://llm.apixo.ai
Non-stream pathPOST /v1beta/models/{model}:generateContent
Stream pathPOST /v1beta/models/{model}:streamGenerateContent
Stream switchpath-based (separate stream endpoint)
Model locationURL path {model}
Auth headerx-goog-api-key