---
title: "Create image"
method: POST
path: "/1/ai/{product_id}/openai/images/generations"
tags: ["Usage > V1 > OpenAI-compatible"]
---

# Create image

`POST /1/ai/{product_id}/openai/images/generations`

Creates an image given a prompt.<br>
This route is mostly OpenAI-compliant, see the [OpenAI documentation](https://platform.openai.com/docs/api-reference/images/create).<br>
Supports English primarily, with limited understanding of French (FR), German (DE), Spanish (ES), and Italian (IT).

## Path parameters

- `product_id` integer, required

## Request body

- object
  - `model` string, required — Model name to use
  - `n` integer — The number of images to generate (default: 1)
  - `negative_prompt` string — The prompt does not guide the image generation. The maximum length is 77 tokens, Note that the "sdxl_lightning" and "flux" model does not support this feature.
  - `prompt` string, required — A text description of the desired image(s). The maximum length is 77 tokens
  - `quality` 'hd' | 'standard' — The quality of the image that will be generated (default: standard)
  - `response_format` 'b64_json' | 'url' — The format in which the generated images are returned. Currently, only 'b64_json' is supported as the response format
  - `size` '1024x1024' | '1024x1792' | '1792x1024' — The size of the generated images.
  - `style` 'cinematic' | 'comic_book' | 'digital_art' | 'disney_charactor' | 'enhance' | 'fantasy_art' | 'line_art' | 'lowpoly' | 'neonpunk' | 'photographic' — Change the style to guidance for the generation
  - `sync` boolean

## Response `200`

OK

- 4cee7ea0Base64imageresponse — Base64 image response
  - `data` 4cee7ea0Base64image[], required — list of images in base64 format.
    - `b64_json` string, required — Base64 format image
    - `revised_prompt` string, required — We are not currently revising the input prompt
  - `created` integer, required — The Unix timestamp (in seconds) of when the response was created.

---

[API](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools.md) · [All operations](https://skmtc.dev/infomaniak/apis/api-reference-developer-tools/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/infomaniak/api-reference-developer-tools/revisions/1c59d729611a/schema)
