Qiniu AI icon

Qiniu AI

Interact with Qiniu AI services - Chat, Image, Video, Agent and more

Image → Generate

AI-generated

Summary

Generate one or more images using a selected Qiniu AI model, with optional reference images, aspect ratio, count, and negative prompt; optionally wait for completion to receive final image data.

Inputs

  • model (required) — The model to use for image generation
  • prompt (required) — Description of the image to generate
  • waitForCompletion — Whether to wait for the image to be fully generated before returning; defaults to true
  • aspectRatio — Aspect ratio of the generated image
  • negativePrompt — Things to avoid in the generated image
  • n — Number of images to generate; accepts values 1–4, defaults to 1
  • imageSize — Output image resolution (1K, 2K, or 4K)
  • subjectImageUrls — Comma-separated URLs of subject reference images to maintain in the generated image
  • sceneImageUrl — URL of a scene reference image to use as background or environment
  • styleImageUrl — URL of a style reference image to transfer artistic style from
  • imageReference — Type of reference to use from the input image (subject or face)
  • mask — Base64-encoded mask for inpainting (white = edit area)

Output shape

binary + json

When waitForCompletion is true, returns the fully generated image(s) as decoded binary data alongside JSON metadata. When false, returns the immediate task result (task ID and status) without awaiting completion. Both paths include a _raw field with the full SDK response.

Links

Discussion