Streaming text generation endpoint. Authenticates via API token (X-API-KEY + X-API-ID), validates the request, checks credits, calls the Gemini streaming API, and returns an SSE stream of Gemini-native response chunks on the same connection.
The final SSE chunk includes a creatify object with the generation id and credits_used.
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).
SSE stream of Gemini response chunks. Content-Type: text/event-stream.
The response is of type string.