AI Gateway icon

AI Gateway

统一 AI 网关 - 支持直连智谱/硅基流动等国内厂商,拒绝超时

图像生成 (Image)

AI-generated

Summary

Generate an image via the AI Gateway using the selected provider and model.

Inputs

  • provider — AI provider. Non-custom modes connect directly to the provider's official API endpoint via direct HTTP. Default: zhipu. Options include zhipu, siliconflow, modelscope, longcat, deepseek, moonshot, dashscope, spark, openrouter, gemini, custom.
  • model — Model name for image generation. Source implementation defaults to 'cogview-3-flash'; UI properties declare 'glm-4-flash'.
  • imagePrompt (required) — Prompt describing the image to generate.
  • imageSize — Output image dimensions. Default: 1024x1024. Options: 1024x1024, 768x1024, 1024x768, 512x512.
  • advancedOptions — Advanced generation parameters. Collection with optional temperature (0-2, default 0.7), maxTokens (default 1000), topP (0-1, default 1), overrideApiKey (password string, default ''), overrideApiBase (string, default ''), actualModel (string, default '' for model name mapping).

Output shape

Raw HTTP response from the image generation API endpoint ${baseUrl}/images/generations. If the response contains OpenAI-standard choices fields, the node adapts the output with content, output, and role fields; otherwise the full response JSON is returned as-is.

API key resolution: first checks advancedOptions.overrideApiKey, otherwise falls back to provider-specific key from credentials via getApiKeyForProvider. For direct-connection providers (all except custom), the key is sent as Bearer token in Authorization header. For custom/gateway mode, provider and api_key are included in the request body.

Links

Discussion