Skip to content

Image request builder

Pick a model, fill in the parameters, and get a runnable request and code as you type. Only the parameters the model supports are listed; limits, enums, and error messages come from the gateway’s validation code.

modelRequired
GPT Image (all models)
promptRequiredMust not be empty (leading and trailing whitespace ignored) · Official limit: 32,000 characters
sizeOptionalSides in multiples of 16, each ≤ 3840
Total pixels 655,360–8,294,400, long-to-short side ratio ≤ 3:1. Invalid sizes return 400 before generation and aren’t billed.
qualityOptionalDefault auto; passed through as is
Higher tiers produce more output tokens and cost more
nOptional1–10 (official range)
1
Some groups support only 1 image; check before batching
backgroundOptionalDefault auto
output_formatOptionalDefault png
moderationOptionalDefault auto; low doesn’t disable safety checks
imageOptional1–16 images (official limit)
0 / 16
With reference images, use POST /v1/images/edits; each remote URL ≤ 25 MiB and must return image/*

Accepted but has no effect

  • response_format

    Always returns b64_json; omit it

  • partial_images

    Progressive image events aren’t supported; omit it

curl https://api.hop-base.com/v1/images/generations \
  -H "Authorization: Bearer $HOPBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-image-2",
    "prompt": "Product hero shot on a white background: a stainless steel insulated tumbler, soft studio lighting, centered",
    "size": "1024x1024"
  }'
View this model’s schemaJSON SchemaAll-model indexOpenAPI 3.1
…

Machine-readable contracts

The specs behind the builder are also published as JSON Schema (draft 2020-12) and OpenAPI 3.1. A coding AI can generate and self-check requests against the schema: required fields, types, limits, enums, conditional rules (such as Gemini’s per-tier image count caps), and fields that return 400 are all included; x-hopbase adds available groups, official prices, and data sources.

Sources: parameter specs come from spec/openai.json, spec/gemini.json, and spec/seedance.json (exported by the gateway plugins from their validation code) and spec/official.json; prices come from a snapshot of the public pricing endpoint. All costs are estimated at official prices; actual charge = official price × group multiplier.