Platform API
Build moderation into your own product and run it on behalf of your users. The Platform API gives you OAuth2 client credentials, per-user provisioning, and optional revenue-share billing.
Who it's for
The Platform API is for products that moderate content for many of their own end-users (a community platform, a SaaS, a marketplace). Instead of one API key, you get a client_id / client_secret, link your users by email, and moderate against each user's own plan and credits. It requires a Premium subscription.
1. Register a platform
In your dashboard, open Platform API and click Register Platform. You'll set a name and a redirect URI, and receive a client_id and client_secret. The secret is shown once — store it securely. You can register multiple platforms and rotate the secret at any time.
2. Get an access token
Exchange your credentials for a short-lived bearer token (valid 1 hour). The SDKs do this for you automatically; the raw call is:
curl -X POST https://supervisor.gg/api/platform/token \
-H "Content-Type: application/json" \
-d '{
"grant_type": "client_credentials",
"client_id": "YOUR_CLIENT_ID",
"client_secret": "sk_platform_..."
}'
# -> { "access_token": "...", "token_type": "Bearer", "expires_in": 3600 }Send the token on every other Platform API call as Authorization: Bearer <access_token>.
3. Provision a user
Link one of your users to your platform by email. This creates a Supervisor account for them if they don't have one yet.
curl -X POST https://supervisor.gg/api/platform/users/provision \
-H "Authorization: Bearer ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "email": "user@example.com" }'
# -> { "user_id": "...", "email": "...", "is_new_account": true, "is_newly_linked": true }4. Moderate on behalf of a user
Once a user has authorized your platform, moderate content against their plan and credits. The request and response match the standard moderation endpoint, plus a user_email field.
curl -X POST https://supervisor.gg/api/platform/moderate \
-H "Authorization: Bearer ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"user_email": "user@example.com",
"text": "text to check",
"model": "auto"
}'
# -> { "flagged": false, "labels": [], "model_version": "2.0" }Note: moderation requires the user to have authorized your platform. If they haven't, the call returns 403 — send them through the authorization (consent) flow first.
Endpoints
| Method | Path | Purpose |
|---|---|---|
POST | /api/platform/token | Exchange client credentials for an access token |
POST | /api/platform/users/provision | Create or link a user by email |
GET | /api/platform/users | List your linked users |
GET | /api/platform/users/{user_id} | Get a linked user |
POST | /api/platform/moderate | Moderate on behalf of a user |
POST | /api/platform/checkout | Create a Stripe checkout for a user (revenue share) |
GET | /api/platform/connect/status | Stripe Connect onboarding status |
Use an SDK
Every official SDK has a PlatformClient that handles the token exchange and refresh for you. For example, in Python:
from supervisor import PlatformClient
async with PlatformClient(client_id="...", client_secret="sk_platform_...") as p:
await p.provision_user("user@example.com")
result = await p.moderate("user@example.com", text="text to check")See the per-language SDK pages for Go, Rust, Java, and JavaScript equivalents.