Skip to main content
GET
https://api.scriptbase.app
/
api
/
v1
/
account
/
usage
curl "https://api.scriptbase.app/api/v1/account/usage" \
  -H "X-API-Key: sk_your_key_here"
{
  "success": true,
  "data": {
    "period": "2024-01",
    "creditsUsed": 1542,
    "creditsLimit": 10000,
    "percentUsed": 15.4,
    "topEndpoints": [
      {
        "endpoint": "/api/v1/transcript/{videoId}",
        "requests": 500,
        "creditsUsed": 1000
      },
      {
        "endpoint": "/api/v1/videos/{id}",
        "requests": 300,
        "creditsUsed": 300
      },
      {
        "endpoint": "/api/v1/search",
        "requests": 121,
        "creditsUsed": 121
      }
    ]
  }
}

Overview

Get detailed statistics about your API usage including requests per endpoint and credits consumed during the current billing period.

Authentication

X-API-Key
string
required
Your API key

Credits

  • Cost: 0 credits (free endpoint)

Response

success
boolean
Whether the request was successful
data
object
curl "https://api.scriptbase.app/api/v1/account/usage" \
  -H "X-API-Key: sk_your_key_here"
{
  "success": true,
  "data": {
    "period": "2024-01",
    "creditsUsed": 1542,
    "creditsLimit": 10000,
    "percentUsed": 15.4,
    "topEndpoints": [
      {
        "endpoint": "/api/v1/transcript/{videoId}",
        "requests": 500,
        "creditsUsed": 1000
      },
      {
        "endpoint": "/api/v1/videos/{id}",
        "requests": 300,
        "creditsUsed": 300
      },
      {
        "endpoint": "/api/v1/search",
        "requests": 121,
        "creditsUsed": 121
      }
    ]
  }
}

Error Codes

StatusCodeDescription
401INVALID_API_KEYAPI key is missing or invalid
500INTERNAL_ERRORServer error
  • This endpoint is free and does not consume credits.
  • Usage statistics are updated in near real-time.
  • Data resets at the beginning of each billing period.