Skip to content
WRAITHERIXDocsENRU

Gemini format

WRAITHERIX implements the Gemini generateContent and streamGenerateContent endpoints, so the Google GenAI SDK works with a custom base URL.

from google import genai
import 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)
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.

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.