Generate content
Google Gemini-compatible endpoint. Send a native Gemini request
(contents, systemInstruction, generationConfig, tools,
toolConfig) and receive a native GenerateContentResponse. Point
the google-genai SDK (Python or JavaScript) or any Gemini-native
client at https://api.empiriolabs.ai and the SDK appends this path
automatically. Authenticate with your EmpirioLabs API key via the
x-goog-api-key header (or the ?key= query parameter). Works with
any chat model, and pricing, parameters, and billing match
/v1/chat/completions.
A request without contents returns 400. So does a request the API
cannot serve as asked, with the field named in the message:
generationConfig.candidateCount above 1, responseModalities other
than TEXT, responseLogprobs or logprobs, thinkingLevel
together with thinkingBudget, cachedContent, a built-in tool
other than googleSearch (such as codeExecution, urlContext, or
googleMaps), or allowedFunctionNames that name no declared
function. A googleSearch tool turns on web search on models that
offer it.
Errors use the Google error shape,
{"error": {"code": <HTTP status>, "message": "...", "status": "..."}}.
Authentication
Pass your EmpirioLabs API key as a bearer token. The Anthropic-style
x-api-key header is also accepted on every endpoint.
Path parameters
An EmpirioLabs chat model id, for example qwen3-7-max.
Request
Conversation turns, at least one with a part. Roles are user and model.
Generation settings. The snake_case spellings are accepted too.
functionDeclarations, and googleSearch (or googleSearchRetrieval), which turns on web search on models that offer it. Any other built-in tool returns 400.
Accepted for compatibility; it does not change the response.
