Skip to main content
POST
/
service
/
v1
/
balance
/
add
Add to Balance
import requests

url = "https://api.parallel.ai/account/service/v1/balance/add"

payload = {
    "amount_cents": 123,
    "idempotency_key": "<string>"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
{
  "org_id": "<string>",
  "credit_balance_cents": 123,
  "pending_debit_balance_cents": 123,
  "will_invoice": true
}

Documentation Index

Fetch the complete documentation index at: https://docs.parallel.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Send Authorization: Bearer <access_token>. This must be an account API access token minted via Parallel's OAuth device flow, not a standard API key. See the account API docs.

Body

application/json

Request to charge the org's default payment method and add to balance.

amount_cents
integer
required

Amount in cents to charge and add to the balance. Must be between 1 and 10000 cents ($100.00).

Required range: x <= 10000
idempotency_key
string
required

Required idempotency key. Stripe dedupes the charge server-side for at least 24h when the same key is submitted again for the same org (see https://docs.stripe.com/api/idempotent_requests). Pick a high-entropy value (e.g. a UUID) so distinct agent attempts do not collide.

Required string length: 8 - 128

Response

Successful Response

Balance response for service clients.

org_id
string
required

Organization ID

credit_balance_cents
number
required

Total available prepaid balance in cents (credits + prepaid commits). Always 0 when will_invoice is true.

pending_debit_balance_cents
number
required

Balance in cents currently held for inflight tasks plus charges not yet synced to the billing provider. Always 0 when will_invoice is true.

will_invoice
boolean
required

True if this organization is billed by invoice (postpaid) rather than from a prepaid credit balance. Invoice-only orgs cannot add balance via this API.