generate_image
Generates new images from text prompts or edits existing ones. Saves the result and returns the file.
Instructions
Generate a new image from a text prompt or edit an existing image using inputImagePath. Saves the result and returns a file resource.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Describe the image to generate or the edit to apply. Include the subject, context, and visual style; English is recommended for prompt enhancement. | |
| purpose | No | Describe the image's intended use, such as a cookbook cover, social media post, or presentation slide, so prompt enhancement can adapt composition and detail. | |
| quality | No | Set only when the user requests a quality level; otherwise omit to use the server default. fast prioritizes speed, balanced trades speed for detail, and quality prioritizes fidelity. | |
| fileName | No | Use .png, .jpg, or .jpeg to request that output format from OpenAI or Seedream. Other or absent suffixes use the provider default; the saved filename is corrected to the actual image extension. | |
| imageSize | No | Set the requested output size to 1K, 2K, or 4K. Omit to use the selected provider and quality preset's default. With Seedream, use 1K or 2K. | |
| aspectRatio | No | Set the requested output aspect ratio. Omit to use the provider default. | |
| blendImages | No | Enable when the prompt combines multiple visual elements that need coherent spatial relationships, lighting, or composition. | |
| inputImagePath | No | Provide an absolute path to a source image when editing, creating a variation, or transferring style. | |
| useGoogleSearch | No | Enable when using Gemini and the image requires current or time-sensitive web information. With OpenAI or Seedream, omit this option or set it to false. | |
| useWorldKnowledge | No | Enable when accurate real-world details matter, such as historical figures, landmarks, cultures, or factual settings. | |
| maintainCharacterConsistency | No | Enable when the same character must retain a recognizable appearance across poses or scenes. |