Wan 2.7 Image Generation Pro Serverless API

4K images with chain-of-thought reasoning and multilingual text.

~41.64s
$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 image in detail: subject, lighting, style, and mood.

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)

Reference image for editing or style transfer guidance.

Default: null
negative_promptoptional
string

Elements to exclude from output. Removes unwanted artifacts.

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

Fixed seed for reproducible output. Range: 0-2147483647.

Default: 42
sizeoptional
string

Output resolution. 1K for previews, 2K web, 4K for print.

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

Overlays AI watermark. Disable for clean professional deliverables.

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