---
title: Prompt extension with Qwen Image 3.0 — Qwen-Image-3.0 | Runware Docs
url: https://runware.ai/docs/models/alibaba-qwen-image-3-0/guides/prompt-extension
description: "How promptExtend works on Qwen Image 3.0: what the LLM rewrite adds to a short prompt, how the direct and agent modes differ, and why extension and seeds don't mix."
---
Qwen Image 3.0 runs your prompt through an LLM before generating, expanding a short description into a fuller one. The rewrite is **on unless you turn it off**, so the prompt in your request is usually not the prompt the model rendered.

The hero below came from five words, `a fishing harbour at dawn`. Everything else in it was written by the rewrite:

![A misty fishing harbour at dawn with a blue wooden boat named Sea Breeze moored at a dock, coiled rope on the boards, fishing boats beyond, and a lighthouse against a pink sky](https://runware.ai/docs/assets/output-hero.B2GVlTB3_Z1tWYA6.jpg)

> **Prompt**: a fishing harbour at dawn

The dock, the coiled rope, the moored fleet, the lighthouse, the pink dawn sky, and the boat's name were all invented. That is the trade in one image: **you get production detail for free, and you stop choosing what the detail is**.

### [Request shape](https://runware.ai/docs/models/alibaba-qwen-image-3-0/guides/prompt-extension#request-shape)

Extension lives in `providerSettings.alibaba`, where `promptExtend` **defaults to on** and `promptExtendMode` picks the rewriting strategy:

TypeScriptPythoncURLCLIJSON

```typescript
import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'alibaba:qwen-image@3.0',
  positivePrompt: 'a fishing harbour at dawn',
  width: 3200,
  height: 1800,
  providerSettings: {
    alibaba: {
      promptExtend: true,
      promptExtendMode: 'agent'
    }
  }
})
```

```python
import asyncio
import os

from runware import Runware

async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "alibaba:qwen-image@3.0",
            "positivePrompt": "a fishing harbour at dawn",
            "width": 3200,
            "height": 1800,
            "providerSettings": {
                "alibaba": {
                    "promptExtend": True,
                    "promptExtendMode": "agent"
                }
            }
        })

asyncio.run(main())
```

```bash
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "imageInference",
      "taskUUID": "d4e5f6a7-8b90-4c12-9d3e-5f6a7b8c9d01",
      "model": "alibaba:qwen-image@3.0",
      "positivePrompt": "a fishing harbour at dawn",
      "width": 3200,
      "height": 1800,
      "providerSettings": {
        "alibaba": {
          "promptExtend": true,
          "promptExtendMode": "agent"
        }
      }
    }
  ]'
```

```bash
runware run alibaba:qwen-image@3.0 \
  positivePrompt="a fishing harbour at dawn" \
  width=3200 \
  height=1800 \
  providerSettings.alibaba.promptExtend=true \
  providerSettings.alibaba.promptExtendMode=agent
```

```json
{
  "taskType": "imageInference",
  "taskUUID": "d4e5f6a7-8b90-4c12-9d3e-5f6a7b8c9d01",
  "model": "alibaba:qwen-image@3.0",
  "positivePrompt": "a fishing harbour at dawn",
  "width": 3200,
  "height": 1800,
  "providerSettings": {
    "alibaba": {
      "promptExtend": true,
      "promptExtendMode": "agent"
    }
  }
}
```

Response

```json
[
  {
    "taskType": "imageInference",
    "taskUUID": "d4e5f6a7-8b90-4c12-9d3e-5f6a7b8c9d01",
    "imageUUID": "3c8d5e21-9a4b-4f70-b6c2-8e1d0a2f3b45",
    "imageURL": "https://im.runware.ai/image/os/a14d18/ws/2/ii/3c8d5e21-9a4b-4f70-b6c2-8e1d0a2f3b45.jpg"
  }
]
```

> [!WARNING]
> `promptExtendMode` **can only be sent when extension is on**. Pairing it with `promptExtend: false` is rejected, since there is no rewrite for the mode to configure. Turning extension off means sending `promptExtend` alone.

### [What the rewrite adds](https://runware.ai/docs/models/alibaba-qwen-image-3-0/guides/prompt-extension#what-the-rewrite-adds)

Both images below came from `a desert road`. The only difference is whether the rewrite ran:

![An elevated view of an empty two-lane road curving through red rock desert under a clear blue sky](https://runware.ai/docs/assets/output-extend-off.CfTetIq8_Z20Azrt.jpg)

*Extension off: the prompt, taken literally*

> **Prompt**: a desert road

![A desert highway at sunset with a Route 66 sign, saguaro cacti, and a vintage teal pickup truck parked on the roadside](https://runware.ai/docs/assets/output-extend-on.oFi7fpyZ_2t7bhF.jpg)

*Extension on: a scene built around the prompt*

> **Prompt**: a desert road

Without the rewrite you get the noun you asked for: a road, some rock, a sky. With it you get **a scene the rewrite decided you meant**, complete with a sunset, a highway sign, cacti, and a parked truck carrying lettering nobody requested.

That last part is the thing to watch. The rewrite adds subjects, and added subjects can carry **text and branding you did not ask for**, which matters on any image heading for commercial use.

### [`direct` and `agent`](https://runware.ai/docs/models/alibaba-qwen-image-3-0/guides/prompt-extension#direct-and-agent)

`direct` is the default and **expands the prompt straightforwardly**. `agent` **reasons about the request before rewriting it**, and travels further from what you typed. Both images came from `a blacksmith at work`:

![A blacksmith in a leather apron hammering glowing metal on an anvil in a daylit workshop hung with tools](https://runware.ai/docs/assets/output-mode-direct.D0bnDuPc_10cPoy.jpg)

*direct: the scene, described plainly*

> **Prompt**: a blacksmith at work

![A blacksmith lit by an open forge striking glowing steel, sparks flying, in a dark workshop](https://runware.ai/docs/assets/output-mode-agent.BlzUUlr8_2rLLfa.jpg)

*agent: the scene, art-directed*

> **Prompt**: a blacksmith at work

`direct` returned a workshop in daylight with the tools on the wall, close to a documentary read of the phrase. `agent` moved the light source into the forge, dropped the ambient exposure, and framed tighter on the strike. Neither is more correct. **`agent` is the one that makes creative decisions**, so reach for it when the prompt is a starting point and for `direct` when it is closer to a brief.

### [Extension on a prompt you already wrote](https://runware.ai/docs/models/alibaba-qwen-image-3-0/guides/prompt-extension#extension-on-a-prompt-you-already-wrote)

The rewrite runs whether or not your prompt needs it. Below is a fully specified alpine scene, generated once with extension off and once with `direct`:

![A concrete and timber cable car station on the left of frame with a red gondola centred on the cable above a snowy slope and a cloud-filled valley](https://runware.ai/docs/assets/output-detailed-off.CDFADVqE_Z22q4VD.jpg)

*Extension off: the composition as written*

> **Prompt**: An alpine cable car station at 2,400 metres in hard winter light. The concrete and timber station building sits on the left third of the frame, its wide glass front reflecting the ridgeline. A single red gondola hangs still on the cable, centred, halfway between the station and the first pylon. Snow-loaded pines drop away down the slope on the right toward a valley filled with low cloud. Hard midday sun from the upper left, deep blue shadow in the snow, crisp air with no haze. Wide documentary mountain photograph, cool palette, no people, no text.

![A snow-roofed timber cable car station filling the left of frame with a red gondola beyond it above pines and a cloud-filled valley](https://runware.ai/docs/assets/output-detailed-on.QqtqJODa_1pfdGD.jpg)

*Extension on: recomposed by the rewrite*

> **Prompt**: An alpine cable car station at 2,400 metres in hard winter light. The concrete and timber station building sits on the left third of the frame, its wide glass front reflecting the ridgeline. A single red gondola hangs still on the cable, centred, halfway between the station and the first pylon. Snow-loaded pines drop away down the slope on the right toward a valley filled with low cloud. Hard midday sun from the upper left, deep blue shadow in the snow, crisp air with no haze. Wide documentary mountain photograph, cool palette, no people, no text.

The first render placed the station on the left third and hung the gondola centred on the cable, which is what the prompt asked for. The second **moved the camera in and rebuilt the station** as a snow-roofed chalet. Nothing went wrong there, the rewrite simply had opinions about a description that already had them. **The more precisely you have written, the more extension costs you.**

### [Extension and reproducibility](https://runware.ai/docs/models/alibaba-qwen-image-3-0/guides/prompt-extension#extension-and-reproducibility)

With extension off, a fixed `seed` returns the same image every call:

![A grey-bearded dock worker in a navy jacket in profile, moored fishing boats and coiled rope behind him](https://runware.ai/docs/assets/output-seed-locked-a.DaLSO4LA_8Kvac.jpg)

*seed 480915, first call*

> **Prompt**: A weathered dock worker in his sixties standing at the edge of a quay in early morning light, wearing a faded navy canvas jacket with the collar turned up, salt-grey stubble, deep lines around the eyes, looking off to the left of camera. Fishing boats and coiled rope blurred behind him. Documentary portrait, natural side light, shallow depth of field, muted coastal palette, no text.

![The same dock worker in the same pose and framing against the same boats](https://runware.ai/docs/assets/output-seed-locked-b.DVaXnHkC_1gnkzY.jpg)

*seed 480915, second call*

> **Prompt**: A weathered dock worker in his sixties standing at the edge of a quay in early morning light, wearing a faded navy canvas jacket with the collar turned up, salt-grey stubble, deep lines around the eyes, looking off to the left of camera. Fishing boats and coiled rope blurred behind him. Documentary portrait, natural side light, shallow depth of field, muted coastal palette, no text.

Turn extension on, keep everything else identical, and the two calls diverge:

![The dock worker standing further from camera on a concrete quay beside a bollard and a coil of yellow rope](https://runware.ai/docs/assets/output-seed-extended-a._RuOcz45_Z138UAN.jpg)

*seed 480915 with extension, first call*

> **Prompt**: A weathered dock worker in his sixties standing at the edge of a quay in early morning light, wearing a faded navy canvas jacket with the collar turned up, salt-grey stubble, deep lines around the eyes, looking off to the left of camera. Fishing boats and coiled rope blurred behind him. Documentary portrait, natural side light, shallow depth of field, muted coastal palette, no text.

![The dock worker shown full length on a timber dock beside stacked yellow crates and a blue fishing boat](https://runware.ai/docs/assets/output-seed-extended-b.D1vssYNp_1iJU43.jpg)

*seed 480915 with extension, second call*

> **Prompt**: A weathered dock worker in his sixties standing at the edge of a quay in early morning light, wearing a faded navy canvas jacket with the collar turned up, salt-grey stubble, deep lines around the eyes, looking off to the left of camera. Fishing boats and coiled rope blurred behind him. Documentary portrait, natural side light, shallow depth of field, muted coastal palette, no text.

Same man, different photograph: the framing, the distance, and the dock all changed. **The rewrite is not covered by your seed**, so it produces a fresh prompt on every call and the seed then locks the noise for a description that keeps moving. Two runs at a fixed seed with extension on are no closer to each other than two unrelated renders.

```json
"providerSettings": {
  "alibaba": {
    "promptExtend": false
  }
}
```

That block is the whole fix. Anything that has to be repeatable, whether a regression test or a client revision, **needs extension off**.

### [Tips](https://runware.ai/docs/models/alibaba-qwen-image-3-0/guides/prompt-extension#tips)

1. **Leave it on for exploration.** Short prompts plus `agent` is a fast way to find a direction you would not have written, and it costs one field.
    
2. **Turn it off before you commit.** Once the composition matters, extension is a second author working from a copy of your brief.
    
3. **Write the prompt you want instead of a shorter one.** Extension is not a substitute for specifying, it is a substitute for deciding.
    
4. **Check outputs for invented copy.** The rewrite adds signage, packaging, and lettering on its own, which is a problem for commercial work and for anything going near a brand.
    
5. **Send `promptExtend` alone when disabling.** Including `promptExtendMode` alongside `false` is rejected.