Skip to Content

Credits

The credits left in your workspace.

GET
/v1/credits

Authorization

apiKey
headerAuthorizationBearer <token>

An API key from the dashboard: Authorization: Bearer sapi_….

Response Body

The answer.

application/json
  1. response
balance*integer

Credits available to this API key's workspace.

Formatint64
Example Request
import { SocialAPI } from "@socialapihq/sdk";const client = new SocialAPI({ apiKey: process.env.SOCIALAPI_API_KEY });const answer = await client.account.getCredits();
Example Response
{  "balance": 319668}