---
title: "Make an agent key with a spending limit (wallet key only)"
method: POST
path: "/wallet/keys"
tags: ["Balance"]
---

# Make an agent key with a spending limit (wallet key only)

`POST /wallet/keys`

## Request

- Base URL: `https://api.phoenixlabs.space`
- URL: `https://api.phoenixlabs.space/wallet/keys`
- Auth: HTTP bearer

## Request body

- object
  - `label` string
  - `limit_cents` integer, required

## Response `200`

key (pak_…, shown once) and its details.

- object

## Other responses

- `400`: Bad input. `detail` says what to fix.
- `401`: Missing or unrecognised key.
- `402`: The balance, or the agent key's limit, doesn't cover the price. `needs_topup` or `over_limit` says which.

---

[API](https://skmtc.dev/phoenixlabs/apis/phoenix-labs-api.md) · [All operations](https://skmtc.dev/phoenixlabs/apis/phoenix-labs-api/llms.txt) · [OpenAPI document](https://skmtc.dev/phoenixlabs/apis/phoenix-labs-api/revisions/7648b94d8dd2?raw)
