Text generation

Gemini

Google's Gemini text models, called with Google's own SDK.

Parsec serves the Gemini API’s own generateContent endpoint, so Google’s google-genai SDK works unchanged: point its base URL at Parsec and use your Parsec key as the API key.

Model id
gemini-4-argonGemini 4 Argon: Google’s flagship reasoning model, 1M-token context
gemini-3.8-flashGemini 3.8 Flash: the most capable Flash model, fast and inexpensive
gemini-3.5-flash-liteGemini 3.5 Flash-Lite: the fastest and cheapest, for high-volume work

Python

pip install google-genai
import os
from google import genai

client = genai.Client(
    api_key=os.environ["PARSEC_API_KEY"],
    http_options={"base_url": "https://platform.parseclab.ai"},
)
resp = client.models.generate_content(
    model="gemini-3.8-flash",
    contents="Summarise the plot of Hamlet in two sentences.",
)
print(resp.text)

The base URL has no /v1beta: the SDK adds it.

HTTP

curl https://platform.parseclab.ai/v1beta/models/gemini-3.8-flash:generateContent \
  -H "x-goog-api-key: $PARSEC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"contents": [{"parts": [{"text": "Hello"}]}]}'

The request body and the response are the Gemini API’s, relayed as sent, and errors are Google-shaped. The answer is in candidates[0].content.parts[].text.

Usage and limits

  • Billing follows Google’s token counts: input and output (thinking included), at the prices on the models page.
  • Streaming (streamGenerateContent) is not supported yet.
  • Gemini models are called with generateContent only; the chat completions endpoint answers them with an error pointing here.