ModelStream LogoModelStream Logo
Models
Video API
Image API
Chat API
Audio API
Studio
Pricing
Docs
Menu
IntroductionQuickstartAPI KeysUse with Hermes AgentUse with OpenClaw
Model ListBilling Guide
ModelStream

Video API

  • Seedance 2.0
  • Happyhorse 1.0
  • Vidu Q3
  • Kling V3.0
  • Veo 3.1
  • Wan 2.7
  • More Video Models →

Image API

  • GPT Image 2
  • Nano Banana 2
  • Seedream 5.0
  • Imagen 4
  • Qwen Image 2.0
  • Z-Image Turbo
  • More Image Models →

Audio API

  • Suno Music
  • Qwen3 TTS Flash
  • More Audio Models →

Chat API

  • GLM-5.2
  • Claude Opus 4.8
  • Gemini 3.5 Flash
  • Qwen 3.7 Max
  • GPT 5.5
  • More Chat Models →

About Us

  • Privacy Policy
  • Terms of Service
  • Support
  • Enterprise

© 2026 ModelStream Inc. All rights reserved.

API Documentation
API Reference
Images
Generate Image

Generate Image

Loading models...
W
Wan2.7-Image-Pro (wan2.7-image-pro)
wan2.7-image-pro0 models support this endpoint

Wan2.7 – image generation and editing. Supports text-to-image, text/image-to-sequential images, image editing, multi-image reference generation, and interactive editing. Delivers enhanced performance in text rendering, subject consistency, and complex instruction following. https://bailian.console.alibabacloud.com/cn-beijing?tab=model#/model-market/detail/wan2.7-image?serviceSite=asia-pacific-china

Generate image

https://api.modelstream.ai
POST/v1/images/generations

Authentication

BearerAuth
AuthenticationBearer <token>

All API requests must be authenticated using a Bearer token in the Authorization header. Please ensure your API key is active.Authorization: Bearer sk-xxxxxx

Parameter Location: Header Param

Request Body

application/json

These parameters come from the selected model form_schema. Switching models updates this list and the request example.

Generation Mode

Choose the generation mode. Text to Image: generate from prompt only (supports thinking mode, group images, up to 4K). Image to Image / Edit: upload 1-9 reference images for editing or multi-image reference generation (up to 2K).

prompt*string

Text prompt, max 5000 chars. Describe the scene for T2I, or edit instructions for I2E.

RequiredExample Value: A macro, hyper-realistic shot of a futuristic 'living' dessert served on a slab of rough-hewn obsidian. The dish features a central sphere of translucent, violet-tinted honey that is captured mid-drip, showing perfect surface tension and internal refraction. Inside the liquid, tiny bioluminescent spores glow with a soft cyan light. The sphere is garnished with paper-thin slices of a 'crystalline fruit' that has the texture of cracked ice and iridescent velvet. Soft, warm directional light from the side creates long shadows and highlights microscopic condensation on the cold stone. 100mm macro lens, f/2.8, extreme detail on textures, ray-traced reflections, 8k resolution.Placeholder: Describe the image content or edit instructions...
size?string

Output resolution tier (default 2K). 4K is text-to-image only; image editing and group generation cap at 2K.

Example Value: 2K
Enum/Options:
1K2K4K
n?number

Number of images to generate: 1-4 in normal mode, 1-12 in group (sequential) mode. Directly affects cost.

Example Value: 1Value Range: 1 ≤ value ≤ 12step: 1
thinking_mode?boolean

Text-to-image only. When on, the model reasons before generating to improve complex scenes. Enabled by default.

Example Value: true
color_palette?string

Optional, normal (non-sequential) mode only. JSON array of 3-10 color objects whose ratios must total 100.00%. e.g., [{"hex": "#FF8C42", "ratio": "40.00%"}]

Placeholder: [{"hex": "#FF8C42", "ratio": "40.00%"}]
enable_sequential?boolean

Enable to generate a coherent group-image sequence (best used with n>1).

Example Value: false
watermark?boolean

When on, adds an 'AI生成' watermark to the bottom-right of the image. Disabled by default.

Example Value: false
seed?number

Random seed, range [0, 2147483647]. Stabilizes output but is not fully deterministic.

Response Parameters

application/json
200apiDocs.responses.successGenerateImage
created?integer

Parameter description for Created

data?array

Parameter description for Data

curl -X POST "https://api.modelstream.ai/v1/images/generations" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "wan2.7-image-pro",
  "prompt": "A macro, hyper-realistic shot of a futuristic 'living' dessert served on a slab of rough-hewn obsidian. The dish features a central sphere of translucent, violet-tinted honey that is captured mid-drip, showing perfect surface tension and internal refraction. Inside the liquid, tiny bioluminescent spores glow with a soft cyan light. The sphere is garnished with paper-thin slices of a 'crystalline fruit' that has the texture of cracked ice and iridescent velvet. Soft, warm directional light from the side creates long shadows and highlights microscopic condensation on the cold stone. 100mm macro lens, f/2.8, extreme detail on textures, ray-traced reflections, 8k resolution.",
  "input": {
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "text": "A macro, hyper-realistic shot of a futuristic 'living' dessert served on a slab of rough-hewn obsidian. The dish features a central sphere of translucent, violet-tinted honey that is captured mid-drip, showing perfect surface tension and internal refraction. Inside the liquid, tiny bioluminescent spores glow with a soft cyan light. The sphere is garnished with paper-thin slices of a 'crystalline fruit' that has the texture of cracked ice and iridescent velvet. Soft, warm directional light from the side creates long shadows and highlights microscopic condensation on the cold stone. 100mm macro lens, f/2.8, extreme detail on textures, ray-traced reflections, 8k resolution."
          }
        ]
      }
    ]
  },
  "parameters": {
    "size": "2K",
    "n": 1,
    "enable_sequential": false,
    "thinking_mode": true,
    "watermark": false
  }
}'
{
  "created": 0,
  "data": [
    {
      "url": "string",
      "b64_json": "string",
      "revised_prompt": "string"
    }
  ]
}