Skip to main content
POST
Text Generation

Request

string
обязательно
Bearer token: Authorization: Bearer nb_YOUR_API_KEY
string
обязательно
Model slug. See Text Models for all available slugs.Examples: gpt-5, claude-sonnet-4.5, gemini-3-pro, deepseek-r1
array
обязательно
Array of message objects in OpenAI-compatible format.
Supported roles: system, user, assistant
boolean
по умолчанию:"false"
Enable server-sent events streaming. See Streaming Guide.
number
по умолчанию:"0.7"
Sampling temperature between 0.0 and 2.0. Higher values make output more random.
integer
Maximum tokens to generate. Defaults vary by model. Pass null to use model defaults.
string
Shorthand for adding a system message. Equivalent to adding { "role": "system", "content": "..." } as the first message.

Request Example

Response

string
Unique generation ID. Use this to retrieve results via GET /generate/status.
string
completed | pending | failed
string
The model slug used for this generation.
string
The generated text.
integer
Elumenta tokens consumed by this request.
integer
Your token balance after this request.
object
Raw provider token usage (for reference only, not billed):
string
ISO 8601 timestamp.

Response Example

Vision (Image Input)

Text models that support vision (gpt-5, claude-sonnet-4.5, gemini-3-pro) accept images in messages:

Multi-turn Conversations

Pass the full conversation history in messages:
Elumenta does not store conversation state between requests. You must send the full history each time.