# wan2.7-image

by Wan

`wan/wan2.7-image`

Generate PNG images from a text description.

Billed per image

Price: $0.03

Provider: Wan

Timeout: 5 min

## Overview

Generate one to four images. If the run is RUNNING, poll `GET /v1/runs/{runId}` until COMPLETED. This endpoint supports text prompts only; image editing and image sets are not accepted. Billing uses the number of successfully generated images reported by the provider. Availability requires a configured Singapore workspace.

After COMPLETED, image URLs are in `run.output.output.choices[].message.content[].image`; the image count is `run.output.usage.image_count`. Download these temporary URLs promptly. Outputs include a watermark.

## Input

These go in the `input` object of the run request.

| Field   | Type     | Required | Description                                                                                   |
| ------- | -------- | -------- | --------------------------------------------------------------------------------------------- |
| prompt  | string   | Yes      | What to draw, in Chinese or English.<br>Maximum: 5000                                        |
| n       | integer  | No       | Requested image count.<br>Default: `1`<br>Minimum: 1<br>Maximum: 4                          |
| size    | string   | No       | Output resolution; text-only images are square.<br>Allowed: 1K, 2K<br>Default: `"2K"` |

Requests up to 1 MB, prompt up to 5,000 characters.

## Example

Use your own API key and a saved idempotency key for each new job. Replace image or media placeholders with your own publicly reachable HTTPS URLs. Keep the same key and request body when recovering a timeout.

```bash
# Set once per job; reuse this key and the identical body after a timeout.
: "${AGENTSKY_IDEMPOTENCY_KEY:?Set a unique, saved key for this job}"
curl --fail-with-body https://gateway.agentsky.dev/v1/run \
  -H "authorization: Bearer $AGENTSKY_API_KEY" \
  -H "content-type: application/json" \
  -H "Idempotency-Key: $AGENTSKY_IDEMPOTENCY_KEY" \
  -d '{"provider":"wan","endpoint":"wan2.7-image","input":{"prompt":"A blue ceramic cup on a white table","n":1,"size":"1K"}}'
# If status is READY/RUNNING, poll GET /v1/runs/{runId} with the same API key.
```

## Pricing

$0.03 per image using your plan when signed in. Read the final customer charge from `price.amount.value` after the run finishes. A RUNNING response is not the final bill.

## Questions

### What does wan2.7-image do?

### How much does wan2.7-image cost?

### What does wan2.7-image take?

### What are the limits on wan2.7-image?

### How do I retry safely and check the final charge?
