---
title: "Create image generation"
method: POST
path: "/v1/images/generations"
tags: ["images"]
---

# Create image generation

`POST /v1/images/generations`

## Request

- Base URL: `http://localhost:8080`
- URL: `http://localhost:8080/v1/images/generations`
- Auth: none declared
- TypeScript: <https://skmtc.dev/atomaai/apis/atoma-service/docs/v1/images/generations/post.ts> (a function with typed inputs; its response is checked against the schema)

This handler simply forwards the request to the image generations service and returns the response.

# Arguments

* `state` - Application state containing service URLs
* `payload` - The image generation request body

# Returns

Returns the JSON response from the image generations service

# Errors

Returns a `AtomaServiceError::InternalError` if:
- The image generations service request fails
- Response parsing fails

## Request body

- unknown

## Response `200`

Images generated successfully

- unknown

## Other responses

- `500`: Internal server error

---

[API](https://skmtc.dev/atomaai/apis/atoma-service.md) - [All operations](https://skmtc.dev/atomaai/apis/atoma-service/llms.txt) - [OpenAPI document](https://skmtc.dev/atomaai/apis/atoma-service/revisions/a3d329cb3125?raw)
