Wan 2.7 Image Generation Pro Serverless API

Wan 2.7 Pro generates 4K images with chain-of-thought reasoning, multilingual text rendering, and multi-reference consistency control.

~51.52s
$0.037 per generation
 1import requests
 2import json
 3
 4url = "https://api.segmind.com/v1/wan2.7-image-pro"
 5headers = {
 6    "x-api-key": "YOUR_API_KEY",
 7    "Content-Type": "application/json"
 8}
 9
10data = {
11    "prompt": "A breathtaking aerial view of a futuristic city at golden hour, towering glass skyscrapers with lush vertical gardens, flying vehicles, cinematic lighting, ultra-detailed, photorealistic",
12    "negative_prompt": "blurry, low quality, distorted, watermark, text",
13    "size": "2K",
14    "seed": 42,
15    "watermark": false
16}
17
18response = requests.post(url, headers=headers, json=data)
19
20if response.status_code == 200:
21    result = response.json()
22    print(json.dumps(result, indent=2))
23else:
24    print(f"Error: {response.status_code}")
25    print(response.text)

API Endpoint

POSThttps://api.segmind.com/v1/wan2.7-image-pro

Parameters

promptrequired
string

Describe the image you want to generate in detail. Include subject, lighting, style, and mood for best results — supports up to 5000 characters.

Default: "A breathtaking aerial view of a futuristic city at golden hour, towering glass skyscrapers with lush vertical gardens, flying vehicles, cinematic lighting, ultra-detailed, photorealistic"
imageoptional
string (uri)

Upload a reference image to guide editing or style transfer. Use for character consistency, background matching, or image-to-image refinements.

Default: null
negative_promptoptional
string

Describe elements to exclude from the output. Use to remove artifacts, unwanted styles, colors, or subjects that often appear uninstructed.

Default: "blurry, low quality, distorted, watermark, text"
seedoptional
integer

Set a fixed seed to reproduce an exact output. Increment slightly to create variations of the same composition. Range: 0-2147483647.

Default: 42
sizeoptional
string

Set the output resolution. Use 1K for fast previews, 2K for web-ready outputs, and 4K for print-grade or high-DPI deliverables.

Default: "2K"
Allowed values :
"1K""2K""4K"
watermarkoptional
boolean

Overlays an AI-generated watermark on the output. Set to false for clean professional deliverables; enable for content attribution workflows.

Default: false

Response Type

Returns: Text/JSON

Common Error Codes

The API returns standard HTTP status codes. Detailed error messages are provided in the response body.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Model or endpoint not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out