The SpecialX image generation API is a REST interface to every image model in the SpecialX catalog, including GPT Image 2.5 Flare, Nano Banana Pro, FLUX.2 Pro, Seedream 4.5 and Grok Imagine. You send one request to POST /api/v1/generations with a model id and an input object, get a task id back, and collect the image URL when the task completes. One key, one credit balance and one response shape cover all of them, so switching models is a change to one string. The same capabilities are also available as MCP tools and through the specialx CLI if you would rather not write HTTP calls yourself.
Image model
Google's Flagship Generation Model
Image model
Black Forest Labs FLUX.2 Pro
Create a key on the Developers page. Keys start with sx_ and are shown once, so store yours on your server, never in browser code. Send it as Authorization: Bearer sx_... or as an x-api-key header. A quick check is GET /api/v1/me, which returns your account and credit balance.
A minimal image request looks like this:
POST https://specialx.ai/api/v1/generations
{ "type": "image", "model": "google/nano-banana-pro", "input": { "prompt": "a ceramic mug on a linen tablecloth, morning light" } }
The response is 201 with task_id and status queued. Fetch GET /api/v1/generations/{task_id} until status is completed, then read the urls array.
Call GET /api/v1/models?kind=image to get the catalog. Each entry carries its JSON Schema, so your code can see which fields a model accepts before you send anything. A rough map of the catalog:
image_input list.If you leave out model on the MCP or action route, the default is GPT Image 2.5 Flare. The HTTP generations route expects an explicit model id and returns unknown_model otherwise.
Product shots, brand assets and faces come from your side. The flow is three calls:
POST /api/v1/uploads with the file's content type. You get a presigned upload_url, valid for an hour, and a public_url.PUT the raw bytes to upload_url with the same Content-Type.public_url in the reference field of the model you call.The reference field name differs between models (image_input on Nano Banana Pro, input_images on FLUX.2 Pro), and a misnamed field is stripped silently rather than rejected, so read the schema from /models first. Uploads land in your media library, and GET /api/v1/media lists them again later. Pass workspace_id on generations to keep a team's output in a shared workspace; the uploads route takes only content_type and files the upload under your personal library.
Every error uses one envelope, { "error": { "code", "message" } }, so you can branch on the code:
invalid_input (422) means the input failed the model's schema. The message names the field.unknown_model (400) means the id is not in the catalog.generation_failed (402) means the task could not start, for example a balance too low for the job; the message gives the reason.Credits are taken when the task starts and returned if the provider fails. The spec cards on this page show live costs for two of the models. If you run out mid-batch, POST /api/v1/checkout-links returns a Stripe link for a plan or credit pack.
For batch jobs, register an HTTPS endpoint with POST /api/v1/webhook-endpoints and subscribe to generation.completed and generation.failed. Each delivery is signed with x-specialx-signature, an HMAC-SHA256 of the raw body using the secret you received at registration, so verify before trusting it. Delivery happens once with no retries, so keep a fallback that fetches the task by id for anything you did not hear about.
The full reference, with request and response schemas for every route, lives at /developers/docs.
14-day trial with up to 1,000 credits
Card required. Plans from $18/month after the trial. See pricing
Start 14-day trial and get an API keyAll image models in the SpecialX catalog, such as GPT Image 2.5 Flare, GPT Image 2, Nano Banana Pro, FLUX.2 Pro, Seedream 4.5, Grok Imagine and Topaz Image Upscale. GET /api/v1/models returns the current list with schemas.
No. A request returns a task id right away. You poll the generation by id or receive a signed webhook when it completes or fails.
Requests spend credits from the same balance as the web app, at each model's rate. Credits are refunded if a generation fails. API keys work on every paid plan and during the 14-day trial.
Yes. Request a presigned upload URL, upload the file, and pass the returned public URL in the model's reference field.
Yes. The interactive reference at specialx.ai/developers/docs is built from the OpenAPI 3.1 spec and lists every route, field and error code.