Skip to main content
POST
https://api.ruxa.ai
/
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 '{
    "callBackUrl": "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 callBackUrl parameter to receive automatic notifications when generation is complete, rather than polling the status endpoint.

Authorization

Authorization
string
required
Bearer Token authentication. Format: Bearer sk-xxxxxx

Request Body

Request body format is application/json.
model
string
default:"google/nano-banana-pro"
required
Model name, must be google/nano-banana-pro
callBackUrl
string
required
Callback URL for task completion notification. The system will POST task status and results to this URL.Example: https://your-domain.com/api/callback
input
object
required
Input parameters for the generation task

Response

code
integer
required
Response status code
message
string
required
Response message, error description when request fails
data
object
required
curl --request POST \
  --url https://api.ruxa.ai/api/v1/tasks/create \
  --header 'Authorization: Bearer sk-xxxxxx' \
  --header 'Content-Type: application/json' \
  --data '{
    "callBackUrl": "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"
  }
}