generate_image
Creates or edits images from text prompts, then saves and returns the result as a file resource. Specify an input image for edits or variations.
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. | |
| provider | No | Set only when the user requests a specific image provider; otherwise omit to use the server default. The provider must have its API key configured on the server. | |
| 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. OpenAI does not support 1:4, 1:8, 4:1, or 8:1. | |
| 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. |