---
title: "Create an OpenAI-compatible image generation via the configured background model"
method: POST
path: "/v1/images/generations"
tags: ["OpenAI Compatible"]
---

# Create an OpenAI-compatible image generation via the configured background model

`POST /v1/images/generations`

## Request

- Base URL: `https://api.cernion.de`
- URL: `https://api.cernion.de/v1/images/generations`
- Auth: none declared

Inbound OpenAI-compatible facade over the configured Cernion LLM provider (default Gemini). Forwards the prompt to the background image-generation model and returns base64-encoded image data in the standard OpenAI images.generations response shape. Only `response_format: "b64_json"` is supported — no public URL/object storage is provisioned by this facade.

## Query parameters

- `token` string

## Request body

- object
  - `prompt` string, required
  - `model` string
  - `n` integer
  - `size` string
  - `response_format` 'b64_json' | 'url'
  - `token` string: Optional Cernion MCP token for this request. Overrides CERNION_TOKEN when provided.

## Response `200`

OpenAI-compatible image generation response

- object
  - `created` integer, required
  - `data` object[], required
    - `b64_json` string
  - `cernion` object

---

[API](https://skmtc.dev/cernion/apis/cernion-energy-tools-api.md) · [All operations](https://skmtc.dev/cernion/apis/cernion-energy-tools-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cernion/apis/cernion-energy-tools-api/revisions/cdb94473b538?raw)
