Generate
POST /api/v1/generate
Base URL
https://app.eigenai.com
Authentication
Send your API key in theAuthorization header as a Bearer token.
Parameters
Common
| Name | Type | Required | Description |
|---|---|---|---|
model | string | Required | The model ID to use. Find supported models in the Model Library. |
Conditional
These options are not supported by every model. Use the Model Library to confirm compatibility.Image Generation (Text Prompt)
Generate an image from a text prompt (availability varies by model).| Name | Type | Required | Description |
|---|---|---|---|
prompt | string | Optional | Text prompt describing what to generate. |
negative_prompt | string | Optional | What to avoid in the output (if supported). |
size | string | Optional | Requested output size (if supported). |
seed | number | Optional | Random seed for reproducibility (if supported). |
Image Editing (Upload or URL)
Transform an input image using an instruction prompt.| Name | Type | Required | Description |
|---|---|---|---|
image_file | file | Optional | Upload the source image file (if supported). |
image | file | Optional | Some request types use image instead of image_file for uploaded images. |
image_path | string | Optional | Reference to the source image (often an HTTPS URL or an internal path), if supported. |
prompt | string | Optional | Instruction describing the desired transformation. |
num_inference_steps | number | Optional | Number of inference/denoising steps (if supported). |
binary_response | boolean | Optional | Whether to return binary image data directly instead of JSON (if supported). |
output_format | string | Optional | Output image format (if supported). |
downsizing_mp | number | Optional | Downsample large images for faster processing (if supported). |
lora_strength | number | Optional | LoRA strength knob (if supported). |
rank | number | Optional | Edit complexity/strength knob (if supported). |
offloading | boolean | Optional | Enable CPU offloading (if supported). |
weight | string | Optional | Select an editing profile (if supported). |
true_cfg_scale | number | Optional | Guidance/CFG scale (if supported). |
sample_steps | number | Optional | Sampling steps (if supported). |
sample_guide_scale | number | Optional | Sampling guidance scale (if supported). |
Audio Transcription (ASR)
Transcribe audio into text.| Name | Type | Required | Description |
|---|---|---|---|
file | file | Optional | Audio file to transcribe (if supported). |
language | string | Optional | Spoken language code (if supported). |
response_format | string | Optional | Desired output format (if supported). |
Text-to-Speech (TTS)
Generate audio from text.| Name | Type | Required | Description |
|---|---|---|---|
text | string | Optional | Text to convert into speech (if supported). |
voice | string | Optional | Voice preset name (if supported). |
voice_id | string | Optional | Saved voice ID for voice cloning (if supported). |
voice_name | string | Optional | Saved voice name (if supported). |
voice_url | string | Optional | URL to a voice reference audio sample (if supported). |
voice_settings | object | Optional | Voice settings object (if supported). |
sampling | object|string | Optional | Sampling controls object (if supported). Some clients send it as a JSON string. |
stream | boolean | Optional | Enable streaming mode (if supported). |
language_id | string | Optional | Language identifier (if supported). |
exaggeration | number | Optional | Expressiveness/intensity knob (if supported). |
temperature | number | Optional | Controls randomness (if supported). |
diffusion_steps | number | Optional | Diffusion steps for audio generation (if supported). |
Video Generation
Generate videos or image-to-video outputs (availability varies by model).| Name | Type | Required | Description |
|---|---|---|---|
frame_num | number | Optional | Number of frames to generate (if supported). |
Storage & Delivery
Control where outputs are stored and how they are returned.| Name | Type | Required | Description |
|---|---|---|---|
s3_output_path | string | Optional | Optional output path/bucket override (if supported). |
Request body types
JSON request
Content-Type: application/json
Use this when you are not uploading files directly.
Multipart request (file upload)
Content-Type: multipart/form-data
Use this when you need to upload an image file as part of the request.