Skip to Content

Documentation

Credits

Where each call's cost is, your balance, auto top-up and limits per key.

Every call is paid in credits from your workspace's balance. Credits never expire.

What a Call Costs

Each endpoint's cost is on its page in the API Reference. A call that fails, or an answer from the cache, costs nothing.

Read Your Balance

Reading your balance is free.

import { SocialAPI } from "@socialapihq/sdk";

const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });

const answer = await client.account.getCredits();
Response
{
  "balance": 319668
}

Every answer also says what it cost and what is left.

X-Credits-Charged: 1
X-Credits-Remaining: 2499

A call the balance cannot cover returns 402 INSUFFICIENT_CREDITS, at no cost.

Auto Top-Up

Auto top-up buys a pack with your saved card when the balance falls below a threshold you set. Turn it on in Settings → Billing. If the card is declined, it turns itself off and emails the workspace owner.

Limits per Key

A key can be capped at a number of credits a month, so one integration cannot spend the whole balance. A call past the cap returns 402 KEY_CREDIT_LIMIT_REACHED, at no cost. See Authentication.