https://api.hedra.com/web-app/public and require an X-API-Key header.
Generate an image from a text prompt
Required fields
| Field | Description |
|---|---|
type | Set to "image" |
text_prompt | The text description of the image to generate |
ai_model_id | The model to use (see GET /models for available image models) |
Optional fields
| Field | Description |
|---|---|
aspect_ratio | e.g. "16:9", "9:16", "1:1" |
resolution | e.g. "540p", "720p", "1080p", "1440p (2K QHD)", "2160p (4K UHD)" |
batch_size | Generate 1-8 variations at once (default: 1) |
enhance_prompt | Set to true to automatically enhance the prompt |
Poll for completion
The response includes a generationid. Poll until status is "complete":
asset_id for the generated image.
Available image models
UseGET /models to list all models. Filter by "type": "image" to see image models with their supported resolutions and aspect ratios.