---
title: "Buy a credit pack"
method: POST
path: "/accounts/payment/ai-budget"
tags: ["Payment"]
---

# Buy a credit pack

`POST /accounts/payment/ai-budget`

## Request

- Base URL: `https://api.quiva.ai`
- URL: `https://api.quiva.ai/accounts/payment/ai-budget`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/docs/accounts/payment/ai-budget/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a checkout for a credit pack. Admin, root or billing role on a subscribed paid plan. `return_path` is an app-relative path to return to.

## Request body

- object
  - `pack` string, required: Credit pack key
  - `return_path` string: App-relative return path

## Response `200`

Success

- object
  - `data` object

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Role not allowed

## Changes

- **2026-11-12** `700eb1ace61a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/changes/accounts/payment/ai-budget/post.md)

---

[API](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway.md) - [All operations](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/llms.txt) - [OpenAPI document](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway/revisions/700eb1ace61a?raw)
