---
title: "Buy credits"
method: POST
path: "/v1/buy-credits"
tags: ["Account"]
---

# Buy credits

`POST /v1/buy-credits`

Purchase additional credits for your organization. Saved-card purchases cost $20.00 per 1,000 credits on a subscription, or $30.00 per 1,000 credits on a pay-as-you-go plan. A one-time payment authorization charges the pay-as-you-go rate. This endpoint immediately charges real money. Confirm with a human operator before calling it from an agent.

<span>⚡ <strong>Rate limit:</strong> 2 requests per 1 minute</span>

<span>💰 <strong>Cost:</strong> FREE! No credits are charged for this API.&nbsp;<span title="Pricing shown is default pricing. Actual pricing may vary.">ⓘ</span></span>

## Request body

- object
  - `apiKey` string, required — Your Fiber API key
  - `subscriptionId` string, nullable — The subscription to add credits to. Required when the organization has more than one subscription, or when charging a saved payment method. Must be omitted when paying with a one-time payment authorization; sending both is rejected.
  - `creditsToBuy` integer, required — Number of credits to purchase. One-time payment authorizations require at least 100 credits. Saved-card purchases require at least 1,000 credits.
  - `sharedPaymentGrantedToken` string, nullable — A one-time payment authorization from your payment provider. When set, this purchase charges that authorization instead of a saved card. Each purchase needs a freshly minted authorization.
  - `idempotencyKey` string, nullable — A unique key to safely retry a purchase. If a request fails or times out, resend with the same key to avoid being charged twice. When omitted, each call is a new purchase.

## Response `200`

Default Response

- object
  - `output` object, required
    - `message` string, required
    - `creditsPurchased` integer, required
    - `centsSpent` integer, required — Total amount charged in US cents for this purchase
  - `chargeInfo` union, required
    - object — Credits were charged immediately for this operation
      - `method` 'charged-now', required
      - `creditsCharged` number, required
      - `lowCreditAlert` object, nullable — Contains a link to get more credits, a warning message, and the remaining credit count.
        - `getMoreCreditsUrl` string, uri, required — URL to top up credits or restart billing cycle to get fresh credits.
        - `message` string, required — Human-readable credits warning.
        - `availableCredits` number, required — Number of credits remaining in the current billing period.
    - object — Credits will be charged after the operation completes
      - `method` 'charging-later', required
      - `message` string, required
      - `lowCreditAlert` object, nullable — Contains a link to get more credits, a warning message, and the remaining credit count.
        - `getMoreCreditsUrl` string, uri, required — URL to top up credits or restart billing cycle to get fresh credits.
        - `message` string, required — Human-readable credits warning.
        - `availableCredits` number, required — Number of credits remaining in the current billing period.
    - object — Credits that were charged for an asynchronous operation
      - `method` 'charged-for-async-process', required
      - `creditsCharged` number, required
      - `message` string, required
      - `lowCreditAlert` object, nullable — Contains a link to get more credits, a warning message, and the remaining credit count.
        - `getMoreCreditsUrl` string, uri, required — URL to top up credits or restart billing cycle to get fresh credits.
        - `message` string, required — Human-readable credits warning.
        - `availableCredits` number, required — Number of credits remaining in the current billing period.
    - object — No credits were charged for this operation
      - `method` 'free', required
      - `message` string, required
      - `lowCreditAlert` object, nullable — Contains a link to get more credits, a warning message, and the remaining credit count.
        - `getMoreCreditsUrl` string, uri, required — URL to top up credits or restart billing cycle to get fresh credits.
        - `message` string, required — Human-readable credits warning.
        - `availableCredits` number, required — Number of credits remaining in the current billing period.
    - object — Credits were refunded for this operation
      - `method` 'credits-refunded', required
      - `creditsRefunded` number, required
      - `message` string, required
      - `lowCreditAlert` object, nullable — Contains a link to get more credits, a warning message, and the remaining credit count.
        - `getMoreCreditsUrl` string, uri, required — URL to top up credits or restart billing cycle to get fresh credits.
        - `message` string, required — Human-readable credits warning.
        - `availableCredits` number, required — Number of credits remaining in the current billing period.
  - `warnings` object[], nullable — Warnings about extraneous fields in request
    - `field` string, required — Full path to extraneous field (e.g., 'searchParams.ExtraField')
    - `message` string, required — Warning message
  - `advice` string[], nullable — Tips, recommendations, and suggestions for using this API effectively.

## Other responses

- `400` — Default Response
- `401` — Default Response
- `402` — Default Response
- `403` — Default Response
- `404` — Default Response
- `422` — Default Response
- `429` — Default Response
- `500` — Default Response
- `503` — Default Response

## Changes

- **2026-09-01** `f8a78c729da9` — 1 warning, 5 info
  - removed the optional property `outOfCreditsAlert` from the response with the `402` status
  - added the new optional request property `sharedPaymentGrantedToken`
  - the request property `subscriptionId` became nullable
  - the request property `subscriptionId` became optional
  - …2 more
- **2026-07-31** `4002aa81d4fb` — 3 breaking, 1 info
  - added the new required request property `subscriptionId`
  - the response property `advice` became nullable for the status `200`
  - the response property `advice` became optional for the status `200`
  - the `advice` response's property default value `` was removed for the status `200`

[Change history](https://skmtc.dev/fiber/apis/fiber-ai-api/changes/v1/buy-credits/post.md)

---

[API](https://skmtc.dev/fiber/apis/fiber-ai-api.md) · [All operations](https://skmtc.dev/fiber/apis/fiber-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/fiber/fiber-ai-api/revisions/4124c1dafb12/schema)
