wan2.7-image
wan/wan2.7-imageGenerate PNG images from a text description.
- image
- Price: $0.03
- Wan
- 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. Maximum: 5000 |
| n | integer | No | Requested image count. Default: 1Minimum: 1 Maximum: 4 |
| size | string | No | Output 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.
