curl --request POST \
--url https://api.ruxa.ai/api/v1/tasks/create \
--header 'Authorization: Bearer sk-xxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"callback_url": "https://your-domain.com/api/callback",
"input": {
"prompt": "Turn this photo into a bobblehead: slightly enlarge the head, keep the face accurate, cartoonize the body. [Place it on a bookshelf].",
"image_input": ["https://example.com/your-image.png"],
"aspect_ratio": "1:1",
"resolution": "1k",
"output_format": "png"
},
"model": "google/nano-banana-pro"
}'
{
"code": 200,
"message": "success",
"data": {
"taskId": "task_gemini-2.5-flash-image_1766304530229_cf4dafd2"
}
}
Google
Google Nano Banana Pro
Advanced image generation model API based on Gemini 2.5 Flash Image
POST
/
api
/
v1
/
tasks
/
create
curl --request POST \
--url https://api.ruxa.ai/api/v1/tasks/create \
--header 'Authorization: Bearer sk-xxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"callback_url": "https://your-domain.com/api/callback",
"input": {
"prompt": "Turn this photo into a bobblehead: slightly enlarge the head, keep the face accurate, cartoonize the body. [Place it on a bookshelf].",
"image_input": ["https://example.com/your-image.png"],
"aspect_ratio": "1:1",
"resolution": "1k",
"output_format": "png"
},
"model": "google/nano-banana-pro"
}'
{
"code": 200,
"message": "success",
"data": {
"taskId": "task_gemini-2.5-flash-image_1766304530229_cf4dafd2"
}
}
google/nano-banana-pro uses Google’s gemini-2.5-flash-image model
internally, supporting higher resolution image generation with more precise
aspect ratio and resolution control.Query Task Status
After submitting a task, you can check the task progress and get the generation result through the unified query endpoint:Get Task Details
Learn how to query task status and get generation results
In production environments, it is recommended to use the
callback_url
parameter to receive automatic notifications when generation is complete,
rather than polling the status endpoint.Authorization
string
required
Bearer Token authentication. Format:
Bearer sk-xxxxxxHide Details
Hide Details
- Get API Key: Visit the API Key Management Page to obtain your API Key
-
Usage: Add
Authorization: Bearer YOUR_API_KEYto your request headers - Important: Keep your API Key secure and never share it with others
- If you suspect your API Key has been compromised, reset it immediately in the management page
Request Body
Request body format isapplication/json.
string
default:"google/nano-banana-pro"
required
Model name, must be
google/nano-banana-prostring
required
Callback URL for task completion notification. The system will POST task status and results to this URL.Example:
https://your-domain.com/api/callbackobject
required
Input parameters for the generation task
Hide Properties
Hide Properties
string
required
Text prompt for image generation (max length: 10000 characters)
Hide Example
Hide Example
"Turn this photo into a bobblehead: slightly enlarge the head, keep the face accurate, cartoonize the body. [Place it on a bookshelf]."
string[]
required
Array of input image URLs (up to 8 images)
Hide Example
Hide Example
["https://example.com/your-image.png"]
enum<string>
default:"1:1"
required
Aspect ratio for generated imageAvailable options:
1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9, autoenum<string>
default:"1k"
required
Resolution for generated imageAvailable options:
1k, 2k, 4kenum<string>
default:"png"
required
Output format for generated imageAvailable options:
png, jpgResponse
integer
required
Response status code
Hide Status Codes
Hide Status Codes
-
200: Success - Request processed successfully -
401: Unauthorized - Missing or invalid authentication -
402: Insufficient credits - Not enough credits to execute -
404: Not found - Resource or endpoint does not exist -
422: Validation error - Request parameters invalid -
429: Rate limited - Request frequency limit exceeded -
500: Server error - Unexpected failure during processing
string
required
Response message, error description when request fails
curl --request POST \
--url https://api.ruxa.ai/api/v1/tasks/create \
--header 'Authorization: Bearer sk-xxxxxx' \
--header 'Content-Type: application/json' \
--data '{
"callback_url": "https://your-domain.com/api/callback",
"input": {
"prompt": "Turn this photo into a bobblehead: slightly enlarge the head, keep the face accurate, cartoonize the body. [Place it on a bookshelf].",
"image_input": ["https://example.com/your-image.png"],
"aspect_ratio": "1:1",
"resolution": "1k",
"output_format": "png"
},
"model": "google/nano-banana-pro"
}'
{
"code": 200,
"message": "success",
"data": {
"taskId": "task_gemini-2.5-flash-image_1766304530229_cf4dafd2"
}
}