POSTEndpoint:
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 adata array.
created: Unix timestamp when the request was processed.data: Array of image objects, each with:urlorb64_json: image outputrevised_prompt: prompt rewritten by the model