---
title: "Tops up a pay-as-you-go balance (MPP or x402); without a key, opens the workspace."
method: POST
path: "/api/agent/v1/credits"
tags: ["Agent rail"]
---

# Tops up a pay-as-you-go balance (MPP or x402); without a key, opens the workspace.

`POST /api/agent/v1/credits`

## Request

- Base URL: `https://www.audioscrape.com`
- URL: `https://www.audioscrape.com/api/agent/v1/credits`
- Auth: none declared

## Request body

- BuyCreditRequest
  - `amount_cents` integer, nullable: Balance to buy in US cents, 500–10,000 (default 500).

## Response `200`

Paid: the balance; on a first top-up also the workspace API key and a claim link (shown once)

## Other responses

- `402`: Challenge: WWW-Authenticate (MPP, method=stripe) and/or PAYMENT-REQUIRED (x402)
- `409`: The key's workspace is on a plan
- `503`: Rail or both protocols not enabled

---

[API](https://skmtc.dev/audioscrape/apis/audioscrape-rest-api.md) · [All operations](https://skmtc.dev/audioscrape/apis/audioscrape-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/audioscrape/apis/audioscrape-rest-api/revisions/29b5788227cf?raw)
