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

# Deduct Credits

`POST /api/v1/credits/deduct`

## Request

- Base URL: `https://api.slidemaster.tw` (the document declares no server; this is the origin it was published from)
- URL: `https://api.slidemaster.tw/api/v1/credits/deduct`
- Auth: none declared

扣除 Credits（用於 agent-dev 等前端直接渲染場景）。

## Headers

- `Authorization` string, nullable
- `X-API-Key` string, nullable

## Request body

- CreditDeductRequest
  - `operation` string, required
  - `quantity` integer
  - `project_id` string, nullable

## Response `200`

Successful Response

- CreditDeductResponse
  - `balance_after` integer, required
  - `amount_deducted` integer, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/slidemaster/apis/slidemaster-ai-api.md) · [All operations](https://skmtc.dev/slidemaster/apis/slidemaster-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/slidemaster/apis/slidemaster-ai-api/revisions/a964c005977e?raw)
