How to Generate an Image
Generate an image from a text prompt.
Quick Start
Add ?sync=true to get the result in one request:
bash
curl -X POST "https://api.get3w.com/v1/google/nano-banana-pro/text-to-image?sync=true" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A serene Japanese garden with cherry blossoms, golden hour lighting",
"aspect_ratio": "1:1",
"resolution": "1k",
"output_format": "png",
"channel": "stable"
}'python
import requests
response = requests.post(
"https://api.get3w.com/v1/google/nano-banana-pro/text-to-image?sync=true",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"prompt": "A serene Japanese garden with cherry blossoms, golden hour lighting",
"aspect_ratio": "1:1",
"resolution": "1k",
"output_format": "png",
"channel": "stable"
}
)
data = response.json()
print(data["outputs"][0])javascript
const response = await fetch(
"https://api.get3w.com/v1/google/nano-banana-pro/text-to-image?sync=true",
{
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
prompt: "A serene Japanese garden with cherry blossoms, golden hour lighting",
aspect_ratio: "1:1",
resolution: "1k",
output_format: "png",
channel: "stable"
})
}
);
const data = await response.json();
console.log(data.outputs[0]);Choosing a Model
| Slug | Best for |
|---|---|
google/nano-banana-pro/text-to-image | Strong all-rounder, fast |
bytedance/seedream-5-pro/text-to-image | Photorealism |
bytedance/seedream-5-lite/text-to-image | Cheaper iterations |
black-forest-labs/flux-2-pro/text-to-image | Prompt adherence, detail |
alibaba/qwen-image-2-pro/text-to-image | Text rendering in images |
midjourney/v8.2/text-to-image | Stylized, artistic output |
recraft/recraft-4.1-vector/text-to-image | Vector art and logos |
ideogram/ideogram-3/text-to-image | Typography and posters |
Browse the full catalog at get3w.com/models.
Common Parameters
| Parameter | Type | Description |
|---|---|---|
prompt | string | Text description of the image |
aspect_ratio | string | Framing, e.g. 1:1, 16:9, 9:16 |
resolution | string | Output resolution, e.g. 1k, 2k |
output_format | string | File format, e.g. png, jpeg |
seed | integer | Seed for reproducibility |
channel | string | Service tier, e.g. economy, stable |
Accepted values differ per model — check the model's page for its exact schema. An unsupported value comes back as task code 1401.
Tips for Better Results
- Be specific — "A golden retriever playing fetch in a park at sunset" beats "a dog"
- Include style keywords — "cinematic", "photorealistic", "watercolor"
- Specify lighting — "golden hour", "studio lighting", "dramatic shadows"
- Match the aspect ratio to the use case —
9:16for mobile,16:9for video thumbnails - Pin the seed once you like a result, so you can iterate on the prompt without losing the composition
Editing an Existing Image
Switch the run type to image-to-image and pass an input image:
bash
curl -X POST "https://api.get3w.com/v1/google/nano-banana-pro/image-to-image?sync=true" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Transform into a watercolor painting style",
"image_urls": ["https://your-cdn.com/your-image.png"]
}'Input images must be at publicly reachable URLs. If a URL cannot be fetched, the task fails with code 1402.
Next Steps
- How to Create Video from Image — Animate your images
- How to Write Better Prompts — Improve your results
- How to Choose the Right Model — Selection guide