Skip to main content
POST
/
sse
/
text_generator
/
stream
Text Generator (Streaming)
curl --request POST \
  --url https://api.creatify.ai/sse/text_generator/stream/ \
  --header 'Content-Type: application/json' \
  --header 'X-API-ID: <api-key>' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "model_name": "<string>",
  "messages": [
    {
      "role": "user",
      "content": ""
    }
  ],
  "system_instruction": "",
  "config": {
    "temperature": 123,
    "max_output_tokens": 123,
    "top_p": 123,
    "top_k": 123,
    "presence_penalty": 123,
    "frequency_penalty": 123,
    "seed": 123,
    "stop_sequences": [
      "<string>"
    ],
    "response_mime_type": "text/plain",
    "response_json_schema": "<unknown>"
  },
  "tools": [
    {
      "function_declarations": [
        {
          "name": "<string>",
          "description": "",
          "parameters": "<unknown>"
        }
      ]
    }
  ],
  "tool_config": {
    "function_calling_config": {
      "mode": "AUTO",
      "allowed_function_names": [
        "<string>"
      ]
    }
  },
  "webhook_url": "<string>",
  "sync": false
}
'
"<string>"

Authorizations

X-API-ID
string
header
required

API ID, from your settings page.

X-API-KEY
string
header
required

API Key, from your settings page.

Body

application/json
model_name
string
required

Name of the Gemini model (e.g. gemini-2.5-flash).

Maximum string length: 255
messages
object[]
required

List of messages with 'role' (user/model) and 'content'.

system_instruction
string
default:""

Optional system instruction for the model.

config
object

Generation config parameters.

tools
object[]

List of tools (function declarations) the model may call.

tool_config
object

Controls how the model uses the provided tools.

webhook_url
string<uri>

Webhook URL for async status updates.

sync
boolean
default:false

If true, the request blocks until generation completes and returns the result directly. Default is false (async).

Response

SSE stream of Gemini response chunks. Content-Type: text/event-stream.

The response is of type string.