---
title: "POST /api/v1/client/txt2img/price-calculation"
method: POST
path: "/api/v1/client/txt2img/price-calculation"
tags: ["Client API"]
---

# POST /api/v1/client/txt2img/price-calculation

`POST /api/v1/client/txt2img/price-calculation`

Endpoint for calculating price for text2img inference

## Headers

- `Accept` 'application/json', required

## Request body

- object
  - `prompt` string, required — The main prompt for image generation
  - `negative_prompt` string, nullable — Elements to avoid in the generated image
  - `model` string, required — The model to use for image generation. Available models can be retrieved via the GET /api/v1/client/models endpoint.
  - `loras` object[] — Array of LoRA models to apply
    - `name` string, required — Name of the LoRA model
    - `weight` number, required — Weight of the LoRA model (must be non-negative)
  - `width` integer, required — Width of the generated image in pixels
  - `height` integer, required — Height of the generated image in pixels
  - `guidance` number, required — Guidance scale for the generation
  - `steps` integer, required — Number of inference steps
  - `seed` integer, required — Random seed for generation

## Response `200`

Calculated price for text2img inference.

- object
  - `data` object
    - `price` number, float — Calculated price for the inference

## Other responses

- `401` — Unauthorized user.
- `404` — Not found.
- `422` — Validation failed. Common errors include: model does not exist, model does not support the inference type for this endpoint, or invalid request parameters.
- `429` — Rate limit exceeded. Check X-RateLimit-Type header to determine if minute (RPM) or daily (RPD) limit was hit.

---

[API](https://skmtc.net/deapi/apis/deapi-rest-api.md) · [All operations](https://skmtc.net/deapi/apis/deapi-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deapi/deapi-rest-api/versions/c70b8b231ca8/schema)
