Skip to main content
POST
Create Generation

Overview

POST /api/v2/generate is the one endpoint for all AI generation — text, images, video, audio, TTS, music. The model slug determines what gets generated and what params are accepted.
string
required
Authorization: Bearer nb_YOUR_API_KEY
string
required
Model slug. See Model Catalog for all available slugs.
string
required
The prompt or input text. For text models: the user message. For image/video: the visual description.
object
default:"{}"
Model-specific parameters. Examples below by category.

Text Generation

Image Generation

Common image params:

Video Generation

Video generations return status: "pending". Poll GET /api/v2/generate/{id} for the result.

TTS / Voice

Response

integer
Generation ID (integer). Use for polling: GET /api/v2/generate/{id}
string
completed | pending | failed
string
The model used.
string | null
Text output. Present for LLM, STT, and tool responses.
string | null
File URL. Present for image, video, audio, and TTS responses.
string | null
Thumbnail URL for video results.
string | null
Error message if status is failed.
integer
Elumenta tokens deducted. Zero if failed.
integer
Processing time in milliseconds.
object | null
Additional data: width, height for images; duration for video/audio; etc.

Response Example — Text

Response Example — Image

Response Example — Pending (Video)