---
title: "Generate Image"
method: POST
path: "/api/generate-image"
tags: ["image-generation"]
---

# Generate Image

`POST /api/generate-image`

Generate an image using OpenAI's image generation API.

This endpoint accepts an image upload and various parameters to transform
the image according to the provided prompt and style settings.

## Headers

- `x-user-id` string, nullable

## Response `200`

Successful Response

- ImageGenerationResponse — Response model for image generation
  - `success` boolean, required — Whether the generation was successful
  - `data` ImageData[], required — List of generated images
    - `url` string, nullable — URL of the generated image
    - `b64_json` string, nullable — Base64 encoded image data
  - `error` string, nullable — Error message if generation failed

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/usecreed/apis/creed-api.md) · [All operations](https://skmtc.net/usecreed/apis/creed-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/usecreed/creed-api/versions/523833f9e819/schema)
