Skip to content
Console
Menu

Getting Started

Authentication

KV Store

Images

The image models in the catalogue, the request and what comes back.

POST https://api.sylphx.ai/v1/images/generations generates images from a prompt and answers one JSON document.

#The image models

These are the image models in the catalogue:

Model idName
google/gemini-3-pro-imageNano Banana Pro
google/gemini-3.1-flash-imageNano Banana 2
google/gemini-3.1-flash-lite-imageNano Banana 2 Lite
openai/gpt-5.4-image-2GPT-5.4 Image 2

The catalogue is the only list: GET https://api.sylphx.ai/v1/public/models shows exactly what is served, and another model id answers 404 model_not_found.

#Request

Shell
curl https://api.sylphx.ai/v1/images/generations \
  -H "Authorization: Bearer $SYLPHX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "google/gemini-3.1-flash-image",
    "prompt": "A lighthouse on a cliff at dusk, painted in gouache",
    "aspect_ratio": "16:9",
    "response_format": "b64_json"
  }'
FieldTypeWhat it is
modelstringAn image model id from the catalogue. Required.
promptstringWhat to draw, up to 32,000 characters. Required.
nintegerHow many images, 1 to 4. Default 1.
sizestringWidth x height, for example 1024x1024, 1792x1024 or 1024x1792. Each edge is 64 to 4096. auto leaves the size to the model. Default 1024x1024.
aspect_ratiostringauto, 1:1, 3:2, 2:3, 4:3, 3:4, 16:9, 9:16, 21:9 or 9:21.
qualitystringauto, low, medium, high, standard or hd.
response_formatstringurl (the default) or b64_json.
background, output_format, output_compression, moderationstring or integerPassed to the model that serves the request: background is auto, transparent or opaque; output_format is auto, png, webp, jpeg or svg; output_compression is 0 to 100; moderation is auto or low. Each model honours the subset it supports.

The request is strict: an unknown key is refused with a typed invalid_request that names its path.

#Response

JSON
{
  "created": 1790000000,
  "model": "google/gemini-3.1-flash-image",
  "data": [{ "b64_json": "…" }]
}

model is the catalogue id that served the request, never a provider's internal name. Each data item carries url or b64_json, as you asked.

Only generation is served. POST /images/edits and POST /images/variations answer 410.