Docs/Images

Create an image

Generate an image from a prompt.

POSThttps://api.vaelor.chat/v1/images

Generates one image from a text prompt and stores it in your library. The request returns when the image is ready, usually within 10–20 seconds.

Body#

promptstringRequired

What to draw, from 1 to 2,000 characters. Describe the subject, setting, style and lighting.

modelenumRequired

recraft-ai/recraft-v4.1/text-to-image for Flash quality, or recraft-ai/recraft-v4.1-pro/text-to-image for High quality.

widthintegerRequired

Width in pixels. Must form an allowed size with height (see below).

heightintegerRequired

Height in pixels.

Allowed sizes#

QualityModelSquareLandscapePortraitCost
Flashrecraft-v4.11024×10241024×576576×102420 credits
Highrecraft-v4.1-pro2048×20482048×11521152×204860 credits

Response#

idstring
Unique image ID.
promptstring
The prompt you sent.
modelstring
The model that generated the image.
widthinteger
Width in pixels.
heightinteger
Height in pixels.
urlstring
A signed download URL, valid for 1 hour. Call List images for a fresh one.
creditCostinteger
Credits charged.
usageRemaininginteger
Your remaining balance after the charge.
nextRefreshAtstring
When your plan credits next refresh, in ISO 8601.
createdAtstring
Creation time, in ISO 8601.

Example#

curl https://api.vaelor.chat/v1/images \
  -H "Authorization: Bearer $VAELOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "A lighthouse on a basalt cliff at dusk, long exposure, teal and amber palette",
    "model": "recraft-ai/recraft-v4.1/text-to-image",
    "width": 1024,
    "height": 576
  }'

Response200

JSON
{
  "id": "3b8f7a2e-91c4-4d0a-8f6e-0c5d2a9e7b14",
  "prompt": "A lighthouse on a basalt cliff at dusk, long exposure, teal and amber palette",
  "model": "recraft-ai/recraft-v4.1/text-to-image",
  "width": 1024,
  "height": 576,
  "url": "https://files.vaelor.chat/images/3b8f7a2e.webp?X-Amz-Expires=3600&X-Amz-Signature=…",
  "creditCost": 20,
  "usageRemaining": 280,
  "nextRefreshAt": "2026-10-20T12:00:00.000Z",
  "createdAt": "2026-10-20T09:41:07.000Z"
}

Errors#

StatusWhen
400The prompt is empty or too long, or the size isn't allowed for the model.
402Not enough credits for the image.
502The image provider failed. You weren't charged.
503Image generation is temporarily unavailable.

Was this page helpful?

Questions? Contact support

Last updated October 20, 2026