wan2.7-image

by Wan

wan/wan2.7-image

Generate PNG images from a text description.

Billed per
image
Price
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.

FieldTypeRequiredDescription
promptstringYesWhat to draw, in Chinese or English.
Maximum: 5000
nintegerNoRequested image count.
Default: 1
Minimum: 1
Maximum: 4
sizestringNoOutput resolution; text-only images are square.
Allowed: 1K, 2K
Default: "2K"

Requests up to 1 MB.

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.

# 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