Create Generation
Generate
Create Generation
The single unified endpoint for all AI generation types
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.
Authorization: Bearer nb_YOUR_API_KEYModel slug. See Model Catalog for all available slugs.
The prompt or input text. For text models: the user message. For image/video: the visual description.
Model-specific parameters. Examples below by category.
Text Generation
Image Generation
params:
| Param | Type | Description |
|---|---|---|
size | string | e.g. 1024x1024, 1024x1792, 768x1344 |
format | string | webp (default), png, jpeg |
quality | string | standard or hd (DALL-E 3, GPT Image) |
negative_prompt | string | What to exclude (Flux, SD models) |
seed | integer | For reproducible results |
aspect_ratio | string | e.g. 16:9, 9:16 (Midjourney) |
Video Generation
Video generations return
status: "pending". Poll GET /api/v2/generate/{id} for the result.TTS / Voice
Response
Generation ID (integer). Use for polling:
GET /api/v2/generate/{id}completed | pending | failedThe model used.
Text output. Present for LLM, STT, and tool responses.
File URL. Present for image, video, audio, and TTS responses.
Thumbnail URL for video results.
Error message if
status is failed.Elumenta tokens deducted. Zero if failed.
Processing time in milliseconds.
Additional data:
width, height for images; duration for video/audio; etc.
