Appearance
Legacy transition format
This section documents the older Nano Banana-compatible request shape that was previously used in the model docs. It is kept only for transition. New integrations should use the OpenAI-compatible model pages and API Reference.
Legacy endpoints
http
POST /v1/images/generate
POST /v1/images/editLegacy fields
| Field | Replacement | Notes |
|---|---|---|
num | n | Number of output images. |
image_size | size | Output size now uses OpenAI-style values such as 1024x1024. |
JSON image URL | multipart image file | New edit docs use POST /v1/images/edits with form fields. |
data.url response | data[0].url response | New responses follow the OpenAI image response shape. |
Legacy generate example
bash
curl https://api.pixapi.ai/v1/images/generate \
-H "Authorization: Bearer $PIXAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3-pro-image-preview",
"prompt": "Editorial product photo of a matte black water bottle on stone",
"num": 1,
"image_size": "1:1"
}'Legacy edit example
bash
curl https://api.pixapi.ai/v1/images/edit \
-H "Authorization: Bearer $PIXAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-3-pro-image-preview",
"prompt": "Change the bottle color to warm ivory and keep the background",
"image": "https://example.com/input.png",
"num": 1
}'Legacy response
json
{
"code": 0,
"message": "ok",
"data": {
"url": "https://cdn.pixapi.ai/generated/image.png"
}
}When num is greater than 1, legacy responses may return data.url as an array.
