v1

latestOpenAPI 3.0.02026-07-228239173.7 KB
Client API

Endpoint for calculating price for text2img inference

post/api/v1/client/txt2img/price-calculation

Headers

Accept'application/json' required

Request body

promptstring required

The main prompt for image generation

negative_promptstring nullable

Elements to avoid in the generated image

modelstring required

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

widthinteger required

Width of the generated image in pixels

heightinteger required

Height of the generated image in pixels

guidancenumber required

Guidance scale for the generation

stepsinteger required

Number of inference steps

seedinteger required

Random seed for generation

Example request

{
  "prompt": "A beautiful sunset over mountains",
  "negative_prompt": "blur, darkness, noise",
  "model": "Flux1schnell",
  "loras": [
    {
      "name": "style_lora",
      "weight": 0.75
    }
  ],
  "width": 512,
  "height": 512,
  "guidance": 7.5,
  "steps": 20,
  "seed": 42
}

Response

Calculated price for text2img inference.

Example response

{
  "data": {
    "price": 0.25
  }
}