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 (wan2.7-image)
wan2.7-image0 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://modelstudio.console.alibabacloud.com/ap-southeast-1?tab=doc#/doc/?type=model&url=2840914_2&modelId=wan2.7-image&serviceSite=international

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 and group images). Image to Image / Edit: upload 1-9 reference images for editing or multi-image reference generation.

prompt*string

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

RequiredExample Value: A hyper-realistic, close-up editorial portrait of a woman wearing an avant-garde garment made of iridescent liquid glass and delicate crystalline lace. Her skin features natural pores, fine downy hair, and subtle freckles, illuminated by soft, cinematic bioluminescent light from within the garment. She is submerged in a shallow, dark reflective pool with floating silver lotus petals. The lighting is high-contrast with 'Prism-core' chromatic aberration catching the edges of the glass fabric. Shot on 85mm lens, f/1.8, deep depth of field on the eyes, 8k resolution, masterful ray-tracing, subsurface scattering on the skin.Placeholder: Describe the image content or edit instructions...
size?string

Output resolution tier; wan2.7-image supports 1K / 2K only (default 2K). Image editing and group generation cap at 2K.

Example Value: 2K
Enum/Options:
1K2K
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",
  "prompt": "A hyper-realistic, close-up editorial portrait of a woman wearing an avant-garde garment made of iridescent liquid glass and delicate crystalline lace. Her skin features natural pores, fine downy hair, and subtle freckles, illuminated by soft, cinematic bioluminescent light from within the garment. She is submerged in a shallow, dark reflective pool with floating silver lotus petals. The lighting is high-contrast with 'Prism-core' chromatic aberration catching the edges of the glass fabric. Shot on 85mm lens, f/1.8, deep depth of field on the eyes, 8k resolution, masterful ray-tracing, subsurface scattering on the skin.",
  "input": {
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "text": "A hyper-realistic, close-up editorial portrait of a woman wearing an avant-garde garment made of iridescent liquid glass and delicate crystalline lace. Her skin features natural pores, fine downy hair, and subtle freckles, illuminated by soft, cinematic bioluminescent light from within the garment. She is submerged in a shallow, dark reflective pool with floating silver lotus petals. The lighting is high-contrast with 'Prism-core' chromatic aberration catching the edges of the glass fabric. Shot on 85mm lens, f/1.8, deep depth of field on the eyes, 8k resolution, masterful ray-tracing, subsurface scattering on the skin."
          }
        ]
      }
    ]
  },
  "parameters": {
    "size": "2K",
    "n": 1,
    "enable_sequential": false,
    "thinking_mode": true,
    "watermark": false
  }
}'
{
  "created": 0,
  "data": [
    {
      "url": "string",
      "b64_json": "string",
      "revised_prompt": "string"
    }
  ]
}