Getting Started

API Credits & Pricing Per Operation

TokPortal credit system explained. Costs per account creation, video upload, niche warming, and how to check your balance via API.

Credits & Pricing

TokPortal uses a credit-based system as its unified currency. The same credit balance is shared between the API and the web UI — there is no separate API billing.

Credit Costs

OperationCost
Account creation25 credits
Video slot2 credits per video
Niche warming7 credits
Deep warming (Instagram only)40 credits
Video editing3 credits per edit slot
Comment moderation25 credits
Sound volume control1 credit per video

How Credits Are Debited

  • Bundle creation — Credits for account creation, video slots, warming, editing, and moderation are calculated server-side and debited atomically when the bundle is created. The client never determines the cost; the server computes the total from the bundle configuration.
  • Add video slots — When you add video slots to an existing bundle, credits are debited immediately.
  • Add edit slots — When you add edit slots to an existing bundle, credits are debited immediately.
  • Sound volume control — 1 credit is debited the first time volume_original_sound or volume_added_sound is set on a video. Subsequent updates to the same fields on the same video are free.
  • No refunds on unpublish — Unpublishing an account does not refund credits.

Endpoints

Get Credit Balance

curl -X GET https://app.tokportal.com/api/ext/credits/balance \
  -H "X-API-Key: sk_xxx"
{
  "data": {
    "total_credits": 1250,
    "expiring_within_7_days": 0,
    "upcoming_expirations": [
      {
        "amount": 638,
        "expires_at": "2026-06-08T04:47:51.413+00:00",
        "source": "farmer_topup"
      }
    ],
    "last_updated": "2026-05-19T22:42:36.885166+00:00"
  }
}
FieldTypeDescription
total_creditsnumberCurrent available credit balance.
expiring_within_7_daysnumberSum of credits that will expire in the next 7 days.
upcoming_expirationsarrayCredit lots expiring in the next 30 days (sorted by expires_at ascending). Each entry has amount, expires_at (ISO-8601), and source.
last_updatedstring | nullTimestamp of the last balance update.

Get Credit History

curl -X GET https://app.tokportal.com/api/ext/credits/history?page=1&per_page=10 \
  -H "X-API-Key: sk_xxx"
{
  "data": [
    {
      "id": "txn_abc123",
      "type": "debit",
      "amount": -52,
      "description": "Bundle created: 1 TikTok account, 10 videos, niche warming",
      "breakdown": {
        "account_creation": 25,
        "video_slots": 20,
        "niche_warming": 7
      },
      "balance_after": 1198,
      "created_at": "2025-11-20T14:30:00Z"
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 10,
    "total": 47,
    "total_pages": 5
  }
}

Get Credit Costs

Retrieve the current cost table programmatically:

curl -X GET https://app.tokportal.com/api/ext/credit-costs \
  -H "X-API-Key: sk_xxx"
{
  "data": {
    "account_creation": 25,
    "video_slot": 2,
    "niche_warming": 7,
    "deep_warming": 40,
    "video_editing": 3,
    "comment_moderation": 25,
    "sound_volume": 1
  }
}

Cost Breakdown Example

Creating a bundle with the following configuration:

  • 1 TikTok account
  • 10 video slots
  • Niche warming enabled
  • Video editing enabled (10 edit slots)
ItemCalculationCost
Account creation1 x 2525 credits
Video slots10 x 220 credits
Niche warming1 x 77 credits
Video editing10 x 330 credits
Total82 credits

If your balance is below the required total, the API returns an INSUFFICIENT_CREDITS error with full details:

{
  "error": {
    "code": "INSUFFICIENT_CREDITS",
    "message": "Not enough credits to complete this operation.",
    "details": {
      "required": 82,
      "available": 50,
      "missing": 32,
      "breakdown": {
        "account_creation": 25,
        "video_slots": 20,
        "niche_warming": 7,
        "video_editing": 30
      }
    }
  }
}