> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sciforium.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Image Generations

**Method:** `POST`\
**Endpoint:** `https://api.sciforium.com/v1/images/generations`

### Overview

The `/v1/images/generations` endpoint creates images from a text prompt and generation parameters.

### Request Body Parameters

The API expects a JSON body. `model` and `prompt` are required.

| Parameter         | Type    | Required | Description                                                                                                   |
| ----------------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------- |
| `model`           | string  | Yes      | The model ID to use.                                                                                          |
| `prompt`          | string  | Yes      | A text description of the desired image.                                                                      |
| `n`               | integer | No       | Number of images to generate (commonly `1`).                                                                  |
| `size`            | string  | No       | Output dimensions. Typical values include `1024x1024`, `1536x1024`, `1024x1536`, or `auto` (model-dependent). |
| `quality`         | string  | No       | Rendering quality (model-dependent), e.g. `low`, `medium`, `high`.                                            |
| `response_format` | string  | No       | Response payload format: `url` or `b64_json`.                                                                 |
| `background`      | string  | No       | Background mode (model-dependent), e.g. `transparent`, `opaque`, `auto`.                                      |
| `style`           | string  | No       | Not currently supported.                                                                                      |

### Example response

The API returns a JSON object containing a timestamp and a `data` array.

* `created`: Unix timestamp when the request was processed.
* `data`: Array of image objects, each with:
  * `url` or `b64_json`: image output
  * `revised_prompt`: prompt rewritten by the model

```json theme={null}
{
  "created": 1775612596,
  "data": [
    {
      "url": "https://oaidalleapiprodscus.blob.core.windows.net/...",
      "revised_prompt": "A sprawling, futuristic metropolitan skyline constructed entirely over shimmering turquoise ocean waters. Skyscrapers are connected by glass bridges, with neon lights reflecting off the waves. The scene is captured in a cinematic style with high contrast and sharp 8k detail."
    }
  ]
}
```
