---
title: "Approve a queued IC Credits request and mint the key"
method: POST
path: "/api/credits/admin/approve"
tags: ["keys"]
---

# Approve a queued IC Credits request and mint the key

`POST /api/credits/admin/approve`

## Request

- Base URL: `https://www.immersivecommons.com`
- URL: `https://www.immersivecommons.com/api/credits/admin/approve`
- Auth: one of:
  - API key in cookie `__session`
  - HTTP bearer

Clerk operator session OR an agt_ token carrying `admin:llm_keys`, live tier re-checked. TWO-STEP: without `confirm` it returns a dry-run preview of the block that WOULD be minted, mutates nothing and charges no rate budget; `confirm: true` mints. IDEMPOTENT on request_id: a second confirmed approve returns the same record with `minted: false` and NO plaintext, because the plaintext is surfaced exactly once. `budget_usd` sets the monthly IC Credits on member / benchmark keys.

## Request body

- ZaiKeyApproveRequest
  - `request_id` string, required: The pending request to approve.
  - `budget_usd` 5 | 10 | 20 | 50 | 100: Member/benchmark keys: the monthly budget of IC Credits in USD to mint (default 20 member / 50 benchmark, or the request's ask). Ignored for workshop keys ($5 lifetime, fixed).
  - `multiplier` integer: LEGACY weekly multiplier. Validated (1, 2, 5, 10, 20) and otherwise ignored; use budget_usd.
  - `confirm` boolean: Omit or false for a dry-run preview; true mints. Default false.

## Response `200`

The dry-run preview, or the approved (possibly already-minted) record.

- ZaiKeyApproveResponse: Preview and result share one envelope. `dry_run` says which you got; `minted` says whether THIS call created the key, and the plaintext appears at most once — on the call that minted it.
  - `ok` boolean, required
  - `dry_run` boolean: True on the preview call.
  - `request_id` string
  - `kind` string
  - `multiplier` integer
  - `minted` boolean: True only on the call that actually created the key.
  - `already_minted` boolean: Preview only: whether a confirmed call would be a fresh mint or a free replay.
  - `agent_token` string: The plaintext, surfaced ONCE on the minting call. Never returned again.

## Other responses

- `400`: Invalid JSON, missing request_id, or an out-of-set budget_usd / multiplier.
- `401`: No auth.
- `403`: Not an operator / scope not authorized.
- `404`: No such request.
- `409`: The request was already denied.
- `429`: Per-actor daily review cap reached; only a fresh mint charges it.
- `500`: Mint or KV write failed.

---

[API](https://skmtc.dev/immersivecommons/apis/immersive-commons-agent-rest-api.md) · [All operations](https://skmtc.dev/immersivecommons/apis/immersive-commons-agent-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/immersivecommons/apis/immersive-commons-agent-rest-api/revisions/be67c1f67c27?raw)
