DocsAPI reference
Images
Text to image. Priced per image or by token, as the model is sold, and settled the moment the pictures come back.
POST/v1/images/generations
curl
curl https://velaron.ai/v1/images/generations \
-H "Authorization: Bearer $KREDIT_KEY" \
-H "Content-Type: application/json" \
-d '{ "model": "openai/gpt-image-2", "prompt": "a lighthouse at dusk, oil on canvas", "n": 1, "size": "1024x1024" }'Request#
- model
An image model from
GET /v1/models(typeimage).- prompt
What to draw. Must not be empty.
- n
How many pictures, clamped to 1 to 4. Defaults to 1.
- size
Forwarded when it looks like
WIDTHxHEIGHT, such as1024x1024,1536x1024or1024x1536.- aspect_ratio
Forwarded when it looks like
W:H, such as16:9.
Response#
200
{
"created": 1758560000,
"data": [{ "b64_json": "…", "media_type": "image/png" }],
"usage": { "input_tokens": 12, "output_tokens": 4160 }
}How it is priced#
- Models sold per image cost
n × price per image, known before the call. - Models sold by token are estimated at 4,160 output tokens per picture plus your prompt. That worst case is held while the model works and the real usage is charged afterwards.
- If your available balance (balance minus holds) cannot cover the worst case, the call is refused with
402 insufficient_credits.
