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 = {
prompt: "A serene mountain landscape at sunset with a lake reflection",
quality: "high",
};Fields
| Field | Type | Required | Description |
|---|---|---|---|
model | string | ➖ | The model to use for image generation. Defaults to 'auto'. |
prompt | string | ✔️ | A text description of the desired image(s). The maximum length is 1000 characters. |
n | number | ➖ | The number of images to generate. Must be between 1 and 10. Defaults to 1. |
quality | components.Quality | ➖ | The quality tier of the generated image. Higher tiers may incur higher latency or cost. 'auto' lets the gateway pick a sensible value per model. 'standard' and 'hd' are accepted as legacy aliases. |
responseFormat | components.ImageGenerationRequestResponseFormat | ➖ | The 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'. |
size | components.Size | ➖ | The size of the generated image. 'auto' defers to the model's default. |
style | components.Style | ➖ | The style of the generated image. 'vivid' leans toward hyper-real and dramatic. 'natural' produces more naturalistic results. Conditionally supported. |
outputFormat | components.OutputFormat | ➖ | Output file format. Conditionally supported. |
user | string | ➖ | A unique identifier representing your end-user, which can help monitor and detect abuse. |