Skip to main content
POST
cURL
API v1 is deprecated. This version is no longer being developed — new endpoints, parameters and models are added to v2 only. Use the v2 endpoints to stay current: v2 API documentation.

Authorizations

Authorization
string
header
required

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

Headers

Accept
enum<string>
default:application/json
required
Available options:
application/json

Body

application/json

Image generation parameters

prompt
string
required

The main prompt for image generation

Example:

"A beautiful sunset over mountains"

model
string
required

The model to use for image generation. Available models can be retrieved via the GET /api/v1/client/models endpoint.

Example:

"Flux_2_Klein_4B_BF16"

width
integer
required

Width of the generated image in pixels

Example:

512

height
integer
required

Height of the generated image in pixels

Example:

512

guidance
number
required

Guidance scale for the generation

Example:

7.5

steps
integer
required

Number of inference steps. The accepted range is model-specific - read info.limits.min_steps / info.limits.max_steps for your model from the Model Selection endpoint before sending the request; a value outside that range is rejected with 422. For the example model Flux_2_Klein_4B_BF16 the only accepted value is 4.

Required range: x >= 1
Example:

4

seed
integer
required

Random seed for generation

Example:

42

negative_prompt
string | null

Elements to avoid in the generated image

Example:

"blur, darkness, noise"

loras
object[]

Array of LoRA models to apply

Response

Calculated price for text2img inference.

data
object