Authentication
All conversion and billing endpoints require a valid, active API key in the request header.
API key header
Include your key on every authenticated request:
X-API-Key: dc_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Obtaining a key
Register via POST /v1/auth/register with your email. The response includes:
api_key— shown once; store it securelycheckout_url— Stripe checkout to activate billingplan— initiallypayg(inactive until payment)
Important: New keys are created with
is_active: false. You cannot call /v1/convert until Stripe confirms your subscription via webhook. Attempting to use an inactive key returns 402 PAYMENT_REQUIRED.
Key lifecycle
- Register — key created, Stripe customer created, checkout session returned
- Checkout — user completes payment on Stripe
- Activated —
customer.subscription.createdwebhook setsis_active: true - Use API — conversions count against monthly quota
Error responses
| Status | Code | Meaning |
|---|---|---|
| 401 | INVALID_API_KEY | Missing, unknown, or malformed key |
| 402 | PAYMENT_REQUIRED | Valid key but not yet activated (checkout incomplete) |
| 429 | QUOTA_EXCEEDED | Monthly plan limit reached |
| 429 | RATE_LIMITED | Too many requests per minute |
Full error reference: Errors