Image Generation
XNova supports OpenAI-compatible image generation endpoints for image sites, desktop clients, and custom scripts.
Endpoints
txt
POST https://api.xnova.online/v1/images/generations
POST https://api.xnova.online/v1/images/editsCommon Parameters
| Parameter | Description |
|---|---|
model | Image model, such as gpt-image-2 |
prompt | Image prompt |
size | Image size or tier |
quality | auto, low, medium, or high |
output_format | png, jpeg, or webp |
output_compression | JPEG/WebP compression; not sent for PNG |
moderation | auto or low |
n | Number of images |
Text to Image
bash
curl https://api.xnova.online/v1/images/generations \
-H "Authorization: Bearer sk-your-key" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2",
"prompt": "A clean product poster with white background and soft light",
"size": "2880x2880",
"quality": "auto",
"output_format": "png",
"moderation": "auto"
}'