DeerAPI Plus icon

DeerAPI Plus

AI 全能工具箱:对话、思维链、图片、视频、向量、提示词优化、虚拟试穿 | AI Toolkit: Chat, Thinking, Image, Video, Embeddings, Prompt, Virtual Try-On

Actions11

🖼️ 图片 / Image → 生成图片 / Generate

AI-generated

Summary

生成图片 / Generate

Inputs

  • model (required) — 用于图片生成的模型 The model to use for image generation. Options: Gemini 2.5 Flash Image, Gemini 3 Pro Preview, or custom model ID when set to '__custom'.
  • customModel (required) — 自定义模型名 / Custom Model Name. Used when 'model' is set to '__custom'.
  • prompt (required) — 提示词 / Prompt. Describe the image you want to generate.
  • enhancePrompt — 自动优化提示词 / Auto Enhance Prompt. Whether to auto-enhance the prompt before generation (default: true).
  • additionalOptions.negativePrompt — 反向提示词 / Negative Prompt. Content that should not appear in the image.
  • additionalOptions.outputType — 输出类型 / Output Type. Return image as URL (default) or download as binary data.
  • additionalOptions.width — 宽度 / Width. Image width in pixels (default: 1024, range: 256–2048).
  • additionalOptions.height — 高度 / Height. Image height in pixels (default: 1024, range: 256–2048).
  • additionalOptions.numberOfImages — 图片数量 / Number of Images. Number of images to generate (default: 1, range: 1–4).
  • additionalOptions.enhancementModel — 优化模型 / Enhancement Model. Model used for prompt enhancement step (default: gemini-2.5-flash).
  • additionalOptions.temperature — 温度 / Temperature. Controls randomness (0=deterministic, 2=creative, default: 0.7).
  • additionalOptions.maxTokens — 最大 Token 数 / Max Tokens. Maximum tokens in the response (default: 2048, range: 1–16384).
  • additionalOptions.simplify — 简化输出 / Simplify Output. Whether to return a simplified output with only key fields (default: true).
  • additionalOptions.systemPromptOverride — 自定义系统提示词 / Custom System Prompt. Override default system prompt; leave empty to use built-in.
  • additionalOptions.extraBodyFields — 额外请求字段 (JSON) / Extra Body Fields. Additional JSON fields merged into the request body.

Output shape

object

Returns an object per input item. When outputType is 'url', includes 'image_url' string. When outputType is 'binary', includes binary data under the property name 'data'. Also includes success flag, processing time, and optionally the original and enhanced prompts.

Examples

Example 1: Generate a single 1024x1024 image from a prompt, return as URL.

model: Gemini 2.5 Flash Image; prompt: 'A futuristic cityscape at sunset'; enhancePrompt: true; outputType: URL.

Example 2: Generate two 512x512 images as binary data without prompt enhancement.

model: Gemini 3 Pro Preview; prompt: 'Abstract geometric pattern'; enhancePrompt: false; numberOfImages: 2; width: 512; height: 512; outputType: binary.

Links

Discussion