SetuDocs

Image Generation

Generate images from a text prompt with the Drishti model. Compatible with the OpenAI Images API, so the official SDKs work out of the box.

POST https://api.setu.dwet.ai/v1/images/generations

Request body

FieldTypeDescription
modelstringImage model ID, e.g. drishti-v1.
promptstringText description of the desired image.
nintegerNumber of images to generate (1–10). Default 1.
sizestring512x512, 768x768 or 1024x1024.
stylestringOptional preset, e.g. Madhubani, Warli, Realistic.

Example request

bash
curl https://api.setu.dwet.ai/v1/images/generations \
  -H "Authorization: Bearer $SETU_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "drishti-v1",
    "prompt": "A peacock in Madhubani art style",
    "n": 2,
    "size": "1024x1024"
  }'

Example response

json
{
  "created": 1782033025,
  "data": [
    { "url": "https://.../image-1.png" },
    { "url": "https://.../image-2.png" }
  ]
}

Pricing is per image and scales with resolution. See Models for available image models.