Account API
Manage registration, subscriptions, and usage tracking.
POST /v1/account/register
Create a new API account. No authentication required.
Request
json
{
"email": "bot@company.com",
"company_name": "Acme Corp"
}
| Field | Type | Required | Description |
|---|---|---|---|
email |
string | Yes | Account email address |
company_name |
string | Yes | Company or organization name |
Response 201 Created
json
{
"account_id": "acc_abc123",
"api_key_live": "sk_live_...",
"api_key_test": "sk_test_...",
"plan": "free_trial",
"credits_remaining": 5,
"message": "5 free credits to test. Subscribe for more."
}
GET /v1/account/usage
Check current plan, credit balance, and usage breakdown.
Response 200 OK
json
{
"plan": "api_growth",
"credits_total": 200,
"credits_used": 47,
"credits_remaining": 153,
"period_ends": "2026-04-01",
"usage_by_type": {
"articles": 38,
"ideas": 4,
"analytics": 3,
"research": 2
}
}
| Field | Type | Description |
|---|---|---|
plan |
string | Current plan name |
credits_total |
integer | Total credits for the billing period |
credits_used |
integer | Credits consumed so far |
credits_remaining |
integer | Credits available |
period_ends |
string | ISO date when current period ends |
usage_by_type |
object | Breakdown of credit usage by operation type |
POST /v1/account/subscribe
Subscribe to a plan. Returns a Stripe Checkout URL.
Request
json
{
"plan": "api_growth"
}
| Field | Type | Required | Description |
|---|---|---|---|
plan |
string | Yes | Plan ID: api_starter, api_growth, or api_scale |
Response 200 OK
json
{
"checkout_url": "https://checkout.stripe.com/..."
}
Redirect the user (or open in browser) to complete payment.
