Image generation (text-to-image) with Velqa.dev
Velqa offers image generation via flux-2-klein-4b (Black Forest Labs, FLUX.2 family), on the OpenAI-compatible API https://api.velqa.dev/v1/images/generations. Ideal for illustrations, mockups and content visuals.
Pricing and access
Like audio, images are billed per unit rather than per token, from your Recharge Boost balance (prepaid credit) — they are not included in any Starter/Dev/Pro plan.
- Indicative price: ~0.30 MAD / image
- Access: any account with a positive Boost balance
- Per-request limits: 4 images maximum (
n), size 1024×1024 maximum - The exact cost is known before the call (
n × price) — unlike audio, no pessimistic reservation is needed.
If the Boost balance is insufficient to cover n × price, the request is rejected (HTTP 402) before it ever reaches the model. A request with an out-of-range n or size is rejected (HTTP 400).
Example with curl
curl https://api.velqa.dev/v1/images/generations \
-H "Authorization: Bearer $VELQA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"flux-2-klein-4b","prompt":"a cat on a Moroccan rug","n":1,"size":"1024x1024"}'Example with Python
from openai import OpenAI
client = OpenAI(base_url="https://api.velqa.dev/v1", api_key="VELQA_API_KEY")
res = client.images.generate(model="flux-2-klein-4b", prompt="a cat on a Moroccan rug", n=1, size="1024x1024")
print(res.data[0].b64_json[:40])The response contains data[].b64_json (base64-encoded image — no URL, decode it client-side). The real cost (number of images generated × price/image) is debited from your Boost balance.
