---
title: "Deduct Credits"
method: POST
path: "/v0/credits/deduct"
tags: ["Credits"]
---

# Deduct Credits

`POST /v0/credits/deduct`

Deducts credits from the user's account.

The amount must be positive. The balance is allowed to go negative so
that the spending-limit hook (which checks ``credit_balance <= 0``)
will correctly block subsequent LLM calls. If auto-recharge is
configured, it is triggered after the deduction.

## Request body

- DeductCreditsRequest — Request model for deducting credits. Attributes: amount (float): The amount of credits to deduct (must be positive).
  - `amount` number, required

## Response `200`

Credits deducted successfully

- DeductCreditsResponse — Response model for deduct credits endpoint. Attributes: previous_credits (float): Credits before deduction. deducted (float): Amount deducted. current_credits (float): Credits after deduction.
  - `previous_credits` number, required
  - `deducted` number, required
  - `current_credits` number, required

## Other responses

- `400` — Invalid request (billing not set up)
- `422` — Validation Error

---

[API](https://skmtc.net/unify/apis/unifyai-http-api-reference.md) · [All operations](https://skmtc.net/unify/apis/unifyai-http-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/unify/unifyai-http-api-reference/revisions/900377f918b6/schema)
