Images
The image and audio interfaces are used to generate images, edit images, transcribe speech, translate speech, and convert text to speech. Availability depends on the model, channel, and upstream service.
| Method | Path | Description |
|---|---|---|
| POST | /v1/images/generations | Create an image |
| POST | /v1/images/edits | Edit an image |
| POST | /v1/edits | Legacy path compatible with image editing |
Common fields include model, prompt, size, quality, response_format, image, and mask. The platform currently marks /v1/images/variations as unimplemented.
File Limitations
File size, format, duration, output type, and streaming audio support are determined by the upstream service. If a request fails, check whether the file is too large, whether the Content-Type is correct, and whether the model supports the target capability.
Generation Example
curl https://api.cloudaikit.com/v1/images/generations \
-H "Authorization: Bearer sk-your-token" \
-H "Content-Type: application/json" \
-d '{"model":"gpt-image-1","prompt":"一只戴眼镜的橘猫,扁平插画风格"}'The response may return an image URL or encoded data, depending on the model and channel. Do not assume that all channels support the same sizes, quality levels, editing capabilities, and output formats.
