---
title: "Changes to Generate an image based on a prompt. This is the endpoint for making generation requests to image generation models."
method: POST
path: "/v1/images/generations"
---

# Changes to Generate an image based on a prompt. This is the endpoint for making generation requests to image generation models.

`POST /v1/images/generations`

> Every recorded change to this endpoint, newest first.

## Timeline

Changed in 2 of 9 revisions.

- **2026-08-22** `0b56d0413ce0` — 2 info
- **2026-08-08** `8f6014272113` — 5 info

## Changes

- **2026-08-22** `0b56d0413ce0` — 2 info
  - added the new `21:9` enum value to the request property `aspect_ratio/oneOf[#/components/schemas/ImageAspectRatio]/`
  - added the new `5:2` enum value to the request property `aspect_ratio/oneOf[#/components/schemas/ImageAspectRatio]/`
- **2026-08-08** `8f6014272113` — 5 info
  - added the optional property `usage/oneOf[#/components/schemas/MediaUsage]/input_tokens` to the response with the `200` status
  - added the optional property `usage/oneOf[#/components/schemas/MediaUsage]/input_tokens_details` to the response with the `200` status
  - added the optional property `usage/oneOf[#/components/schemas/MediaUsage]/output_tokens` to the response with the `200` status
  - added the optional property `usage/oneOf[#/components/schemas/MediaUsage]/output_tokens_details` to the response with the `200` status
  - added the optional property `usage/oneOf[#/components/schemas/MediaUsage]/total_tokens` to the response with the `200` status

---

[Operation](https://skmtc.dev/x/apis/xai-s-rest-api/docs/v1/images/generations/post.md) · [API](https://skmtc.dev/x/apis/xai-s-rest-api.md) · [Page](https://skmtc.dev/x/apis/xai-s-rest-api/changes/v1/images/generations/post)
