Skip to main content
POST
Create Text Generator task

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

Text generation result or pending task.

id
string<uuid>
required
read-only
model_name
string
required
read-only
messages
object[]
required
read-only
config
object
required

Structured config serializer for OpenAPI documentation.

response_function_calls
object[]
required
read-only
created_at
string<date-time>
required
read-only
updated_at
string<date-time>
required
read-only
system_instruction
string

Optional system instruction for the model.

status
enum<string>
  • pending - pending
  • running - running
  • done - done
  • failed - failed
Available options:
pending,
running,
done,
failed
response_text
string

Generated text response from the model.

failed_reason
string

Reason for failure if status is failed.

credits_used
number<double>

Credits consumed for this generation.