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...
I
Imagen 4.0 Generate (imagen-4-generate)
imagen-4-generate0 models support this endpoint

Google Imagen 4 is an advanced image generation model capable of delivering high-quality visual performance, with strong prompt-following capabilities and stable generation results across various styles and scenarios.

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.

prompt*string

Text description of the image. Imagen 4 excels at detail, text rendering and photorealism; the more specific the prompt, the better.

RequiredExample Value: A futuristic architectural design, glass and steel, sunset lighting, ultra realistic.Placeholder: Describe the image you want in detail: subject, style, lighting, camera, etc.
negative_prompt?string

Negative prompt to exclude unwanted elements, styles or artifacts. Optional.

Placeholder: Describe what you do NOT want to appear (optional)...
size?string

Aspect ratio of the output image. Imagen 4 supports 1:1, 3:4, 4:3, 9:16, 16:9. Default 1:1.

Example Value: 1:1
Enum/Options:
1:13:44:39:1616:9
image_size?string

Output image resolution. Imagen 4 Standard supports 1K and 2K. Default 1K.

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

Number of images to generate per request, 1 to 4. Default 1.

Example Value: 1Value Range: 1 ≤ value ≤ 4step: 1
person_generation?string

Controls whether people may be generated. 'Allow All' is not available in the EU, UK, Switzerland, and MENA regions. Default Allow Adult.

Example Value: allow_adult
Enum/Options:
Allow All: allow_allAllow Adult: allow_adultDon't Allow: dont_allow
seed?number

Random seed, from 1 to 2147483647. The same seed with the same parameters reproduces consistent results. Leave empty for random.

Placeholder: Leave empty for random seedValue Range: 1 ≤ value ≤ 2147483647

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": "imagen-4-generate",
  "prompt": "A futuristic architectural design, glass and steel, sunset lighting, ultra realistic.",
  "n": 1,
  "size": "1:1",
  "quality": "1K",
  "personGeneration": "allow_adult",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "A futuristic architectural design, glass and steel, sunset lighting, ultra realistic."
        }
      ]
    }
  ]
}'
{
  "created": 0,
  "data": [
    {
      "url": "string",
      "b64_json": "string",
      "revised_prompt": "string"
    }
  ]
}