Skip to main content
POST
/
v1
/
images
/
generations
Generate
curl --request POST \
  --url https://api.studio.nebius.com/v1/images/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "black-forest-labs/flux-schnell",
  "loras": {
    "scale": 1,
    "url": "https://civitai.com/api/download/models/244808?type=Model&format=SafeTensor"
  },
  "prompt": "<string>",
  "width": 512,
  "height": 512,
  "num_inference_steps": 40,
  "seed": -1,
  "guidance_scale": 50,
  "negative_prompt": "",
  "response_extension": "webp",
  "response_format": "b64_json"
}'
{
  "data": [
    {
      "b64_json": "<string>",
      "url": "<string>"
    }
  ],
  "id": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

ai_project_id
string | null

current project ID

Body

application/json
model
string
required

ID of the model to use.

Examples:

"black-forest-labs/flux-schnell"

prompt
string
required

A text description of the desired image(s).

Required string length: 1 - 2000
loras
LoRA · object[] | null

List of publicly accessible LoRAs compatible with the selected model

Required array length: 1 - 10 elements
Examples:
{
"scale": 1,
"url": "https://civitai.com/api/download/models/244808?type=Model&format=SafeTensor"
}
width
integer
default:512

The width of the generated image(s) in pixels.

Required range: 64 <= x <= 2048
height
integer
default:512

The height of the generated image(s) in pixels.

Required range: 64 <= x <= 2048
num_inference_steps
integer | null

Number of denoising steps in the diffusion process. Higher values generally result in higher quality images but take longer to generate.

Required range: 1 <= x <= 80
seed
integer
default:-1

Random seed for image generation. Use -1 for a random seed.

Required range: x >= -1
guidance_scale
number | null

Guidance scale for the model. Higher values make the image adhere more closely to the prompt.

Required range: 0 <= x <= 100
negative_prompt
string
default:""

A text description of the non-desired image(s).

Maximum length: 2000
response_extension
enum<string>
default:webp

The format of the output image(s).

Available options:
webp,
jpg,
png
response_format
enum<string>
default:url

The way output image will be returned.

Available options:
b64_json,
url

Response

Successful Response

data
ImageObject · object[]
required
id
string
required