Wan 2.7 Image Generation Pro Serverless API
4K images with chain-of-thought reasoning and multilingual text.
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) 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
https://api.segmind.com/v1/wan2.7-image-proParameters
promptrequiredstringDescribe image in detail: subject, lighting, style, and mood.
"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"imageoptionalstring (uri)Reference image for editing or style transfer guidance.
nullnegative_promptoptionalstringElements to exclude from output. Removes unwanted artifacts.
"blurry, low quality, distorted, watermark, text"seedoptionalintegerFixed seed for reproducible output. Range: 0-2147483647.
42sizeoptionalstringOutput resolution. 1K for previews, 2K web, 4K for print.
"2K""1K""2K""4K"watermarkoptionalbooleanOverlays AI watermark. Disable for clean professional deliverables.
falseResponse Type
Returns: Text/JSON
Common Error Codes
The API returns standard HTTP status codes. Detailed error messages are provided in the response body.
Bad Request
Invalid parameters or request format
Unauthorized
Missing or invalid API key
Forbidden
Insufficient permissions
Not Found
Model or endpoint not found
Insufficient Credits
Not enough credits to process request
Rate Limited
Too many requests
Server Error
Internal server error
Bad Gateway
Service temporarily unavailable
Timeout
Request timed out