> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dreamto.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Sizes and billing tiers

> The range of `size`, common sizes, and the 1K / 2K billing tiers set by the output pixels.

## size

`parameters.size` is `WIDTH*HEIGHT` (joined with an asterisk), e.g. `1024*1024`. For text-to-image and editing alike the total pixels must be between 512\*512 and 2048\*2048 (262,144–4,194,304) and the aspect ratio between 1:8 and 8:1; without `size` the model recommends a resolution from the prompt. A value that is not `WIDTH*HEIGHT` returns 400 from the gateway; a pixel count out of range is checked by the model service and returns 400 `InvalidParameter`. The actual output size is `usage.output_width` / `usage.output_height` in the response.

## Common sizes

| Ratio | 1K tier examples | 2K tier examples |
| - | - | - |
| 1:1 | `1024*1024`, `1328*1328` | `1536*1536`, `2048*2048` |
| 16:9 | `1664*928` | `2048*1152` |
| 9:16 | `928*1664` | `1152*2048` |
| 4:3 | `1472*1104` | `2048*1536` |
| 3:4 | `1104*1472` | `1536*2048` |
| 3:2 | `1584*1056` | `1872*1248` |
| 2:3 | `1056*1584` | `1248*1872` |

## Billing tiers

Billed per image. Each output image is tiered by its own total pixels (width × height): up to 2,250,000 (1500\*1500) is the 1K tier, above it the 2K tier, as reported in `usage.output_image_type` (`qima_output_1k` / `qima_output_2k`). Each reference image of an edit is billed as an input image (`usage.input_image_count`).

| Item | `qwen-image-3.0` price |
| - | - |
| Output image, 1K tier | \$0.03 / image |
| Output image, 2K tier | \$0.03 / image |
| Input image | \$0.003 / image |

Cost of a request = output images × the price of their tier + input images × the input price. For example, editing one reference image with `n: 2` at 1328\*1328 (1K tier): 2 × $0.03 + 1 × $0.003 = \$0.063.

Before the call the balance is checked for the most the request can produce (`n` images, in the 2K tier when `size` is omitted or above 2,250,000 pixels); with an insufficient balance it returns 402 and the model is not called. The charge then follows `usage` in the response. Invalid requests and failed generations are not charged. The prices in the console are authoritative.

## 2K request

```bash cURL theme={null}
curl -X POST "https://api.dreamto.ai/api/v1/services/aigc/multimodal-generation/generation" \
  -H "Authorization: Bearer $DREAMTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen-image-3.0",
    "input": {
      "messages": [
        {
          "role": "user",
          "content": [
            {
              "text": "Macro photo of a green leaf with dew drops, sharp veins, soft bokeh background, early-morning backlight"
            }
          ]
        }
      ]
    },
    "parameters": {
      "size": "2048*2048",
      "watermark": false,
      "seed": 20261117
    }
  }'
```

```python Python theme={null}
import os

import requests

URL = "https://api.dreamto.ai/api/v1/services/aigc/multimodal-generation/generation"
HEADERS = {"Authorization": f"Bearer {os.environ['DREAMTO_API_KEY']}"}

payload = {
    "model": "qwen-image-3.0",
    "input": {
        "messages": [
            {
                "role": "user",
                "content": [
                    {
                        "text": "Macro photo of a green leaf with dew drops, sharp veins, soft bokeh background, early-morning backlight"
                    }
                ]
            }
        ]
    },
    "parameters": {
        "size": "2048*2048",
        "watermark": False,
        "seed": 20261117
    }
}

result = requests.post(URL, headers=HEADERS, json=payload, timeout=300).json()
if "output" not in result:
    raise SystemExit(result)
for item in result["output"]["choices"][0]["message"]["content"]:
    print(item["image"])
```

```json theme={null}
{
  "request_id": "req_7c1e9a4b2d3f5a6b8c9d0e1f",
  "output": {
    "choices": [
      {
        "finish_reason": "stop",
        "message": {
          "role": "assistant",
          "content": [
            {
              "type": "image",
              "image": "https://dashscope-463f.oss-accelerate.aliyuncs.com/1d/bd/20261117/2299ae9b/qwen_image3_serving_output_0.png?Expires=1794997390&Signature=..."
            }
          ]
        }
      }
    ],
    "rewrite_status": "success"
  },
  "usage": {
    "output_width": 2048,
    "output_height": 2048,
    "input_image_count": 0,
    "input_image_type": "qima_input_2k",
    "output_image_count": 1,
    "output_image_type": "qima_output_2k"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.