Class ImageGenerateParams

java.lang.Object
com.alibaba.dashscope.types.images.ImageGenerateParams

public final class ImageGenerateParams extends Object
Parameters for images().generate / images().jobs().create (design §3). Two wire protocols hide behind this one params object, picked by model name prefix (MULTIMODAL_MODEL_PREFIXES): legacy text2image takes prompt input and negative_prompt in input; the multimodal-generation protocol takes a messages input and negative_prompt in parameters. size accepts both 1024x1024 and the wire form 1024*1024.
  • Field Details

    • MULTIMODAL_MODEL_PREFIXES

      public static final String[] MULTIMODAL_MODEL_PREFIXES
      Models that only answer on the multimodal-generation protocol (prefix match, so -preview-style variants route the same way).
  • Method Details

    • builder

      public static ImageGenerateParams.Builder builder()
    • usesMultimodalProtocol

      public static boolean usesMultimodalProtocol(String model)
      true when model routes to the multimodal-generation protocol.
    • getModel

      public String getModel()
    • getPrompt

      public String getPrompt()
    • getNegativePrompt

      public String getNegativePrompt()
    • getN

      public Integer getN()
    • getSize

      public String getSize()
    • getImageUrls

      public List<String> getImageUrls()
      Reference images (multimodal-protocol models); local paths and file:///oss:// values are uploaded/resolved before the call.
    • getExtraInput

      public Map<String,Object> getExtraInput()
      Extra input fields merged into input verbatim.
    • getFunction

      public String getFunction()
    • getSeed

      public Integer getSeed()
    • getStyle

      public String getStyle()
    • getPromptExtend

      public Boolean getPromptExtend()
    • getWatermark

      public Boolean getWatermark()
    • getParameters

      public Map<String,Object> getParameters()
      Passthrough for parameters this signature does not name; named fields win on conflict.