Image generations
Generate an image with an image-capable Model ID from the shared catalog.
Before generating an image, use the model catalog to confirm the selected model's interface, supported dimensions, output method, and billing unit.
Request endpoint
Models that support a compatible image generation interface use:
POST https://api.vergora.ai/v1/images/generationsIf a model uses another interface, follow its model documentation instead of reusing this request.
Request example
{
"model": "YOUR_IMAGE_MODEL_ID",
"prompt": "A clean illustration of a city in the morning",
"size": "YOUR_SUPPORTED_SIZE"
}Request fields
| Field | Description |
|---|---|
model | A Model ID that supports image generation |
prompt | Describes the subject, scene, composition, and intended result |
size | A dimension or aspect ratio supported by the selected model |
| Other parameters | Use quantity, quality, reference image, or other fields only when supported |
Read the result
Depending on the model interface, a result may contain an image URL, encoded image data, or a task status:
- Check the response status and structure.
- Read the image or task identifier as defined by the interface.
- If a task identifier is returned, use the status method documented for that interface.
- Keep the request or task identifier for troubleshooting and cost review.
A submitted request does not mean that image generation has completed.
Store the image
Download or persist generated assets in your own storage. Temporary URL lifetime and access requirements depend on the actual response. A result URL may contain sensitive access parameters, so review it before sharing.
Cost and retries
Image requests may be billed by image count, dimensions, quality, or another unit. Use the model price and request record as the source of truth. After a timeout, check the existing request or task before generating the image again.