v2026.11.3
All Bundles
Bundle

Google Gemini API client. Supports text generation, multimodal inputs (image, audio, video), chat sessions, function calling, and caching. Set GOOGLE_API_KEY before use. Compile with -lib gemini.

OAuthEndPoint

OAuth enabled endpoint class

Operations

GetLastError # function

Get the last error

function : GetLastError() ~ String

Return

TypeDescription
Stringlast error

GetToken # function

Get OAuth token

function : GetToken() ~ String

Return

TypeDescription
StringOAuth token

ParseErrorMessage # function

Reads the message of an error response. The parser keeps a JSON string's escapes, so the message is JSON-unescaped here; an error without a message gives the error element's JSON text.

function : ParseErrorMessage(response_json:JsonElement) ~ String

Parameters

NameTypeDescription
response_jsonJsonElementparsed response

Return

TypeDescription
Stringerror message, or Nil if the response holds no error

ResponseText # function

Reads a response body as text. A reply with no body (an HTTP 204, a proxy error page without content) has no content bytes to read.

function : ResponseText(response:Web.HTTP.Response) ~ String

Parameters

NameTypeDescription
responseResponseHTTP response, or Nil

Return

TypeDescription
Stringbody text, or an empty string if the response has no body