Overview
The usage tracking system monitors creator activity against tier limits and enforces subscription boundaries server-side.GET /api/usage
Retrieve usage statistics for authenticated user.Authentication
Requires Directus JWT token.Response
string
Current pricing tier:
starter, creator, pro, or studioobject
Tier limits for all tracked operations
object
Current usage counts for billing period
object
Remaining capacity (limit - usage) for each operation
Example
cURL
Example Response
Example Response
POST /api/usage/increment
Increment usage counter for a specific operation.Authentication
Requires Directus JWT token or shared secret.Request Body
string
required
Operation name (e.g.,
posts_ai_assisted, taxonomy_ai_calls)number
Increment amount (default: 1)
Response
boolean
Whether increment succeeded
number
Updated usage count
boolean
Whether user has hit tier limit
Example
cURL
Example Response
Example Response
Tracked Operations
Operation Keys
Limit Value Convention
- Positive number: Hard limit enforced
-1: Unlimited (no enforcement)0: Feature disabled for tier
Usage Reset Schedule
Monthly counters reset on the 1st of each month at 00:00 UTC:posts_ai_assistedposts_publishedtaxonomy_ai_callswatermark_opsai_clip_opsthumbnail_ops
scheduled_queue_sizeplatforms_connectedteam_seats
Enforcement Points
Usage limits enforced at:- API endpoints:
/api/captions,/api/queue,/api/genie/stream-chat - Media worker: Job creation in
media-worker/index.js - Dashboard UI: Proactive warnings before limit reached
- Post scheduler: Queue size check before adding posts
Upgrade Prompts
When user hits limit:Implementation
Source:server/endpoints/api/usage.js
Usage data stored in user_personas collection:
- Fields:
{operation}_usedand{operation}_limit - Server-side validation on every increment
- Atomic updates to prevent race conditions
Usage tracking is essential for monetization. All AI/media operations must call
/api/usage/increment before execution.Related Endpoints
Pricing Tiers
Detailed tier limits and pricing structure
User Profile
View and update user tier assignment
