UlazAI developer docs

Image API

POST /api/v1/generate/

Canonical image generation endpoint

Use this endpoint for all new integrations. Choose a model with model and optionally pass image_urls for edit workflows on supported models.

Poll status with /api/v1/generate/{generation_id}/ and use /api/v1/generate/history/ for job history.

Request contract

Field Type Required Notes
prompt string Yes 1 to 5000 chars
model string No Defaults to gpt_image_15
size string No Allowed values depend on selected model
quality string No Resolution or quality mode, model-specific
image_urls array[string] No* Required for image editing models like ideogram_character

Model selector

Switch model presets to update request examples instantly.

Seedream 5.0 Lite model=seedream_5_lite

Multimodal reasoning model with text-to-image and image editing.

Allowed sizes: 1:1, 4:3, 3:4, 16:9, 9:16, 2:3, 3:2, 21:9

Allowed quality values: basic, high

Edit mode: supported

Live request snippets

Snippets below follow the selected model preset.

cURL

JavaScript (fetch)

Python (requests)

Response examples

201 Created

{
  "success": true,
  "data": {
    "generation_id": "5a6be42f-4f01-4e80-9e16-8105315f0e62",
    "status": "processing",
    "estimated_time": "15-30 seconds",
    "credits_used": 8,
    "credits_remaining": 124,
    "message": "Generation started successfully"
  }
}

402 Payment Required

{
  "success": false,
  "error": "Insufficient credits. Need 18, have 7",
  "credits_needed": 18,
  "credits_balance": 7
}

400 Bad Request

{
  "success": false,
  "error": "Invalid size. Must be one of: 1:1, 3:2, 2:3"
}