Skip to main content

How Credits Work

ScriptBase uses a credit-based system where each API operation costs a certain number of credits. Your subscription plan determines your monthly credit quota.

Credit Costs

Different operations consume different amounts of credits:
OperationEndpointCreditsExample
Video MetadataGET /api/v1/videos/:id1Get video title, views, etc.
Video + TranscriptGET /api/v1/videos/:id?includeTranscript=true2Video metadata with transcript
Transcript OnlyGET /api/v1/transcripts/:videoId2Get video transcript
Transcript TranslationGET /api/v1/transcripts/:videoId/translate2Translate transcript
Channel InfoGET /api/v1/channels/:id1Get channel metadata
Playlist InfoGET /api/v1/playlists/:id1Get playlist metadata
Search VideosGET /api/v1/search5Search YouTube
Scrape URLGET /api/v1/scrape5Convert webpage to markdown
Website CrawlPOST /api/v1/scrape/crawl10 + 5/pageCrawl entire website
Account InfoGET /api/v1/account0Free - check your account
Job StatusGET /api/v1/jobs/:jobId0Free - poll job status
Batch operations (like POST /api/v1/transcripts/batch) cost credits per item processed. For example, fetching transcripts for 10 videos costs 20 credits (2 credits × 10 videos).

Subscription Tiers

Each tier provides a monthly credit quota:
TierMonthly CreditsRate LimitPrice
FREE20010/minFree
PRO10,000Unlimited$19/mo

What You Can Do With Credits

FREE (200 credits/month):
  • 200 video metadata requests
  • 100 transcript requests
  • 40 scraping requests
  • 50 video + transcript combos
PRO (10,000 credits/month):
  • 10,000 video metadata requests
  • 5,000 transcript requests
  • 2,000 scraping requests
  • Mix and match as needed
  • Auto-recharge available ($5/1,000 credits)

Tracking Your Usage

Check Credits in Response

Every API response includes credit information in the meta object:
{
  "success": true,
  "data": { ... },
  "meta": {
    "creditsUsed": 2,
    "creditsRemaining": 998,
    "rateLimit": {
      "limit": 10,
      "remaining": 59,
      "resetAt": 1704326400
    }
  }
}

Check Via Response Headers

Response headers also show credit usage:
X-Credits-Used: 2
X-Credits-Remaining: 998

View in Dashboard

Check your usage at any time:
curl "https://api.scriptbase.app/api/v1/account/usage" \
  -H "X-API-Key: sk_your_key"
Response:
{
  "success": true,
  "data": {
    "period": "2024-01",
    "creditsUsed": 450,
    "creditsLimit": 1000,
    "creditsRemaining": 550,
    "resetDate": "2024-02-01T00:00:00Z",
    "percentUsed": 45,
    "topEndpoints": [
      {
        "endpoint": "/api/v1/transcripts/:videoId",
        "requests": 200,
        "creditsUsed": 400
      },
      {
        "endpoint": "/api/v1/videos/:id",
        "requests": 50,
        "creditsUsed": 50
      }
    ]
  }
}

Quota Reset

Quotas reset on the first day of each month at midnight UTC.

Reset Date

Your next quota reset: Check /api/v1/account for exact date

Auto-Recharge

Never run out of credits mid-month with auto-recharge.

How It Works

  1. When you hit your quota limit, auto-recharge automatically adds credits
  2. You’re charged based on your plan’s overage rate
  3. You receive an email notification
  4. Your requests continue without interruption

Enable Auto-Recharge

1
2

Enable Auto-Recharge

Toggle “Auto-Recharge” to ON
3

Set Limit (Optional)

Set a maximum monthly overage limit to control costs

Auto-Recharge Response Header

When auto-recharge triggers, you’ll see this header:
X-Auto-Recharged: true

Quota Exceeded

If you exceed your quota without auto-recharge enabled, you’ll receive: HTTP Status: 429 Too Many Requests
{
  "success": false,
  "error": {
    "code": "QUOTA_EXCEEDED",
    "message": "Monthly quota exhausted. Enable auto-recharge or upgrade your plan.",
    "details": {
      "limit": 1000,
      "remaining": 0,
      "resetDate": "2024-02-01T00:00:00Z"
    }
  }
}

What to Do

Quotas reset on the 1st of each month. Your next reset date is in the error response.
Automatically add credits when you hit the limit to avoid interruptions.
Move to a higher tier for more monthly credits and higher rate limits.
  • Use batch endpoints to reduce overhead
  • Cache responses when possible
  • Request only the fields you need

Optimizing Credit Usage

Use Batch Endpoints

Instead of making 100 individual requests (100 credits overhead):
// ❌ Inefficient: 100 separate requests
for (const videoId of videoIds) {
  await fetch(`/api/v1/videos/${videoId}`);
}

// ✅ Efficient: 1 batch request
await fetch('/api/v1/videos/batch', {
  method: 'POST',
  body: JSON.stringify({ videoIds })
});

Request Only What You Need

Don’t include transcripts unless necessary:
// ❌ Costs 2 credits (includes transcript)
fetch('/api/v1/videos/abc123?includeTranscript=true')

// ✅ Costs 1 credit (metadata only)
fetch('/api/v1/videos/abc123')

Cache Responses

Cache video metadata and transcripts that don’t change:
const cache = new Map();

async function getVideo(videoId: string) {
  if (cache.has(videoId)) {
    return cache.get(videoId); // No API call = 0 credits
  }
  
  const data = await fetchFromAPI(videoId); // Costs credits
  cache.set(videoId, data);
  return data;
}

Need More Credits?

Need more than 10,000 credits per month? Upgrade to Pro and enable auto-recharge:
  • Automatic purchase of 1,000 credits for $5 when you run out
  • Never worry about running out of credits
  • Only pay for what you use
  • Cancel anytime
Upgrade to Pro