High-performance text generation endpoint on the async Starlette service. Authenticates via API token (X-API-KEY + X-API-ID).
Supports two modes:
sync: true): blocks until generation completes, returns the result directly.pending status. Poll GET /api/text_generator/{id}/ or use a webhook.API ID, from your settings page.
API Key, from your settings page.
Name of the Gemini model (e.g. gemini-2.5-flash).
255List of messages with 'role' (user/model) and 'content'.
Optional system instruction for the model.
Generation config parameters.
List of tools (function declarations) the model may call.
Controls how the model uses the provided tools.
Webhook URL for async status updates.
If true, the request blocks until generation completes and returns the result directly. Default is false (async).
Text generation result or pending task.
Structured config serializer for OpenAPI documentation.
Optional system instruction for the model.
pending - pendingrunning - runningdone - donefailed - failedpending, running, done, failed Generated text response from the model.
Reason for failure if status is failed.
Credits consumed for this generation.