Gemini format
WRAITHERIX implements the Gemini generateContent and streamGenerateContent
endpoints, so the Google GenAI SDK works with a custom base URL.
from google import genaiimport os
client = genai.Client( api_key=os.environ["WRAITHERIX_API_KEY"], http_options={"base_url": "https://api.wraitherix.com"},)
r = client.models.generate_content( model="gemini-3.8-flash-medium", contents="Explain how a rainbow forms.",)print(r.text)curl "https://api.wraitherix.com/v1beta/models/gemini-3.8-flash-medium:generateContent" \ -H "x-goog-api-key: $WRAITHERIX_API_KEY" \ -H "Content-Type: application/json" \ -d '{"contents":[{"parts":[{"text":"Explain how a rainbow forms."}]}]}'Streaming
Section titled “Streaming”for chunk in client.models.generate_content_stream( model="gemini-3.8-flash-medium", contents="Write a short poem about autumn.",): print(chunk.text, end="")Over HTTP, call :streamGenerateContent?alt=sse to receive server-sent events.
When to use it
Section titled “When to use it”Gemini models also work through Chat Completions.
Use the native format when you already have Gemini code or need Gemini-specific
request fields such as generationConfig and safetySettings.