Skip to content

How to Submit Task

Submit a generation task to any Get3W model.

Endpoint

POST https://api.get3w.com/v1/{provider_id}/{model_id}/{run_type}

The path is the model slug. For example google/nano-banana-pro/text-to-image becomes /v1/google/nano-banana-pro/text-to-image.

Headers

HeaderRequiredDescription
AuthorizationYesBearer YOUR_API_KEY
Content-TypeYesapplication/json

Query Parameters

ParameterTypeDescription
syncbooleanWait for completion and return the full result instead of a task ID
webhookstringCallback URL to POST the result to when the task finishes
prefixstringCustom storage prefix for output files, e.g. myfolder1/myfolder2

Omit all three for async behavior: you get a task ID back and poll for the result.

Request

bash
curl -X POST 'https://api.get3w.com/v1/google/nano-banana-pro/text-to-image' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "prompt": "A cat wearing a space suit",
    "aspect_ratio": "16:9",
    "resolution": "1k",
    "output_format": "png",
    "channel": "stable"
  }'
python
import os
import requests

api_key = os.environ["GET3W_API_KEY"]

response = requests.post(
    "https://api.get3w.com/v1/google/nano-banana-pro/text-to-image",
    headers={
        "Authorization": f"Bearer {api_key}",
        "Content-Type": "application/json"
    },
    json={
        "prompt": "A cat wearing a space suit",
        "aspect_ratio": "16:9",
        "resolution": "1k",
        "output_format": "png",
        "channel": "stable"
    }
)

task = response.json()
print(f"Task submitted: {task['id']}")
javascript
const response = await fetch(
    "https://api.get3w.com/v1/google/nano-banana-pro/text-to-image",
    {
        method: "POST",
        headers: {
            "Authorization": `Bearer ${process.env.GET3W_API_KEY}`,
            "Content-Type": "application/json"
        },
        body: JSON.stringify({
            prompt: "A cat wearing a space suit",
            aspect_ratio: "16:9",
            resolution: "1k",
            output_format: "png",
            channel: "stable"
        })
    }
);

const task = await response.json();
console.log(`Task submitted: ${task.id}`);

Request Body

The body is the model's input parameters. What's accepted varies per model — each model's page on get3w.com/models lists its full schema. Parameters that recur widely:

ParameterTypeDescription
promptstringText description of the output
image_url / image_urlsstringInput image(s) for image and video models
aspect_ratiostringOutput framing, e.g. 16:9
resolutionstringOutput resolution, e.g. 1k, 720p
durationintegerVideo length in seconds
output_formatstringFile format, e.g. png
seedintegerSeed for reproducibility
channelstringService tier, e.g. economy, stable, official

Response

json
{
  "id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "status": "created",
  "estimated_duration": 52
}
FieldDescription
idTask ID; use it to poll or to match an incoming webhook
statusAlways created
estimated_durationSeconds, based on recent runs of the same model and channel. null when there isn't enough history

With ?sync=true you get the full result object instead — see How to Get Result for that shape. Sync waits up to 10 minutes; if the task has not finished by then the response comes back with status: "processing" instead of an error, and you poll for the rest.

With Webhook

The callback URL is a query parameter, not a body field:

bash
curl -X POST 'https://api.get3w.com/v1/google/nano-banana-pro/text-to-image?webhook=https://your-server.com/callback' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"prompt": "A cat in space"}'

See How to Use Webhooks.

Error Responses

CodeDescription
400Invalid parameters, or an unrecognized provider in the slug
401Missing or invalid API key
402Balance below the task's estimated cost
403Prompt blocked by content policy, or account suspended
404Model slug does not exist
500Server error

Validation, pricing, and content screening all happen before the task is queued, so a non-200 here means nothing was charged.

Next Steps

Released under the MIT License.