Skip to content

ImageGenerationRequest

Request parameters for generating images. Creates one or more images from a text prompt.

Example Usage

typescript
import { ImageGenerationRequest } from "@meetkai/mka1/models/components";

let value: ImageGenerationRequest = {
  model: "openai:dall-e-3",
  prompt: "A serene mountain landscape at sunset with a lake reflection",
  quality: "hd",
};

Fields

FieldTypeRequiredDescription
modelstringThe model to use for image generation. Defaults to 'meetkai:z-image-turbo'.
promptstring✔️A text description of the desired image(s). The maximum length is 1000 characters.
nnumberThe number of images to generate. Must be between 1 and 10. Defaults to 1.
qualitycomponents.QualityThe quality of the image that will be generated. 'hd' creates images with finer details and greater consistency. Defaults to 'standard'.
responseFormatcomponents.ImageGenerationRequestResponseFormatThe format in which the generated images are returned. 'url' returns a URL to the image, 'b64_json' returns the image as a base64-encoded JSON string. Defaults to 'url'.
sizecomponents.SizeThe size of the generated images. Must be one of 256x256, 512x512, 1024x1024, 1792x1024, or 1024x1792. Defaults to 1024x1024.
stylecomponents.StyleThe style of the generated images. 'vivid' causes the model to lean towards generating hyper-real and dramatic images. 'natural' causes the model to produce more natural, less hyper-real looking images. Defaults to 'vivid'.
userstringA unique identifier representing your end-user, which can help monitor and detect abuse.