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
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer YOUR_API_KEY |
Content-Type | Yes | application/json |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
sync | boolean | Wait for completion and return the full result instead of a task ID |
webhook | string | Callback URL to POST the result to when the task finishes |
prefix | string | Custom 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
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"
}'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']}")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:
| Parameter | Type | Description |
|---|---|---|
prompt | string | Text description of the output |
image_url / image_urls | string | Input image(s) for image and video models |
aspect_ratio | string | Output framing, e.g. 16:9 |
resolution | string | Output resolution, e.g. 1k, 720p |
duration | integer | Video length in seconds |
output_format | string | File format, e.g. png |
seed | integer | Seed for reproducibility |
channel | string | Service tier, e.g. economy, stable, official |
Response
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"status": "created",
"estimated_duration": 52
}| Field | Description |
|---|---|
id | Task ID; use it to poll or to match an incoming webhook |
status | Always created |
estimated_duration | Seconds, 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:
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
| Code | Description |
|---|---|
| 400 | Invalid parameters, or an unrecognized provider in the slug |
| 401 | Missing or invalid API key |
| 402 | Balance below the task's estimated cost |
| 403 | Prompt blocked by content policy, or account suspended |
| 404 | Model slug does not exist |
| 500 | Server error |
Validation, pricing, and content screening all happen before the task is queued, so a non-200 here means nothing was charged.
Next Steps
- How to Get Result — Retrieve the output
- Error Codes — Full error reference