Skip to main content
POST
/
v1
/
images
/
generations
POST /v1/images/generations
curl --request POST \
  --url https://api.geekhub.mx/v1/images/generations \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "prompt": "<string>",
  "n": 123,
  "size": "<string>",
  "quality": "<string>"
}
'

Request body

model
string
required
The namespaced model ID, e.g. fal/flux-1.1-pro.
prompt
string
required
Image description. Maximum 4000 characters.
n
integer
default:"1"
Number of images to generate (1–8). Each image bills independently.
size
string
Desired size. What’s supported depends on the model:
  • OpenAI gpt-image-1: 1024x1024, 1536x1024, 1024x1536
  • OpenAI dall-e-3: 1024x1024, 1792x1024, 1024x1792
  • fal/Recraft/Ideogram: 1024x1024, 1024x768, 768x1024, etc.
quality
string
standard | hd for OpenAI. Other models ignore it.

Response

{
  "id": "req_xxx",
  "object": "list",
  "created": 1782412958,
  "model": "fal/flux-1.1-pro",
  "data": [
    {
      "url": "https://supabase.geekhub.mx/storage/v1/object/public/generated-images/<org>/<req>/0.jpg"
    }
  ]
}
The URL is ours (Supabase Storage), not the provider’s. It’s persistent and doesn’t expire. Same security model as fal.media, Cloudinary, or unsigned S3: the URL includes 2 UUIDs (org_id + request_id) making it unguessable.

Examples

from openai import OpenAI

client = OpenAI(
    base_url="https://api.geekhub.mx/v1",
    api_key="ghub_sk_live_xxx",
)

response = client.images.generate(
    model="fal/flux-1.1-pro",
    prompt="An astronaut meditating on a cloud of tacos al pastor, cinematic style",
    n=1,
    size="1024x1024",
)

print(response.data[0].url)

Expected latency

ModelP50P95
DALL·E 38s20s
GPT Image 115s45s
Imagen 46s18s
Grok 2 Image10s30s
Flux 1.1 Pro7s25s
Flux 1.1 Pro Ultra12s40s
Recraft V38s28s
Ideogram V212s35s
SD 3.5 Large10s30s
If your request takes > 60s, assume it failed — send another.

Costs

Each image is billed at the model price × 1.05 (markup) × FX MXN/USD. See Image models. Example: 1 image with Flux 1.1 Pro at FX $20 MXN/USD:
$0.040 × 1.05 × 20 = $0.84 MXN per image