Skip to main content

Images

POST https://gateway.primex.work/v1/images/generations

OpenAI-compatible image generation. The route is model-agnostic — send the model you want and Primex routes it.

Generate an image

curl https://gateway.primex.work/v1/images/generations \
-H "Authorization: Bearer prx-YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-image-2",
"prompt": "A neon violet fox, studio lighting",
"size": "1024x1024"
}'

Models & billing

ModelBilling
gpt-image-2per output image, tiered by size/quality (from $0.06)
gpt-image-1-miniper output image, tiered (from $0.02)
FLUX.2-proper output megapixel ($0.03/MP)

Token-billed image models (gpt-image-*) are metered from the returned usage; FLUX.2-pro is billed by output resolution. See Models.

Editing

gpt-image-* models support image editing via POST /v1/images/edits (multipart with an input image + prompt), following the OpenAI images API shape.