Generates images using the AtlasCloud Nanobanana 2 model (google/nano-banana-2/text-to-image).
Before generating images, you need the user's AtlasCloud API token.
atlascloud_token.atlascloud_token so it is not needed again.Step 1: Write the params to {baseDir}/params.json.
Step 2: Run the script:
node {baseDir}/generate.js <TOKEN> {baseDir}/params.json
Step 3: In the script output, find the line that starts with IMAGE_URL: between the two rows of = signs:
============================================================
IMAGE_URL: https://atlas-media.oss-us-west-1.aliyuncs.com/images/xxxx.png
============================================================
> ⚠️ CRITICAL: Use exactly the URL that appears in the IMAGE_URL: line of this execution. Never use a URL from the conversation history, previous executions, or memory. Each execution generates a different URL.
Report this URL to the user.
> ⚠️ IMPORTANT: Never include media_resolution in the payload — it causes an HTTP 500 error.
{
"prompt": "descrição detalhada da imagem",
"aspect_ratio": "16:9",
"output_format": "png",
"resolution": "2k",
"enable_base64_output": false,
"enable_sync_mode": false,
"enable_web_search": false,
"enable_image_search": false
}
| Field | Required | Default | Options | |||||||
|---|---|---|---|---|---|---|---|---|---|---|
| --- | --- | --- | --- | |||||||
prompt | ✅ yes | — | any text | |||||||
aspect_ratio | no | 16:9 | 1:1 | 4:3 | 3:4 | 16:9 | 9:16 | 21:9 | ||
resolution | no | 2k | 1k | 2k | 4k | |||||
output_format | no | png | png | jpeg | ||||||
enable_web_search | no | false | true | false | ||||||
enable_image_search | no | false | true | false | enable_base64_output | no | false | true | false | |
enable_sync_mode | no | false | true | false |
> NÃO inclua media_resolution — causa erro 500.
| Erro | Causa provável | Solução |
|---|---|---|
| --- | --- | --- |
| HTTP 500 | media_resolution presente no payload | Remova media_resolution do params.json |
| HTTP 500 | Token inválido ou expirado | Solicitar novo token ao usuário e atualizar memória |
| Link não atualiza | URL lida de lugar errado | Buscar a linha IMAGE_URL: no output desta execução |
| Timeout | Resolução muito alta | Tentar novamente com "resolution": "1k" |
Job failed | Prompt inválido ou API instável | Simplificar o prompt e tentar novamente |
共 1 个版本