api reference
Consent verification API
One endpoint gates your render pipeline; one lets anyone verify a receipt. Check pre-render, re-check at publish, attach the receipt to your provenance manifest.
Authentication
Bearer token with an API key minted from Developers. cam_live_ and cam_test_ keys behave identically — test keys keep integration traffic separate.
Authorization: Bearer cam_live_4f2a…
POST /api/v1/check
The pre-render gate. Verifies that a license grant covers the render you are about to run. Every call — allowed or denied — writes an HMAC-signed receipt and an audit-trail event.
curl -X POST https://built-different-eosin.vercel.app/api/v1/check \
-H "Authorization: Bearer cam_live_…" \
-H "Content-Type: application/json" \
-d '{
"grant_id": "9c1e07ab-…",
"platform": "dramabox",
"action": "render",
"category": "romance"
}'{
"result": "allowed",
"reason_code": "WITHIN_SCOPE",
"reason": "within granted scope",
"valid_until": "2026-07-30T21:41:03.512Z",
"receipt": {
"id": "b7f3a2c1-…",
"signature": "3f9ac2…",
"timestamp": "2026-07-30T21:26:03.512Z",
"verify_url": "https://built-different-eosin.vercel.app/api/v1/verify"
}
}Reason codes
Branch on reason_code, not the prose.
| Code | Meaning | Pipeline behavior |
|---|---|---|
| WITHIN_SCOPE | Allowed — render may proceed | Proceed; cache until valid_until |
| GRANT_NOT_FOUND | Grant ID does not belong to your organization | Fail the job; check config |
| GRANT_PENDING | Rights holder has not approved yet | Queue and retry after approval |
| GRANT_DECLINED | Rights holder declined the request | Fail the job; request new clearance |
| GRANT_REVOKED | Rights holder revoked the license | Halt renders and purge cached allows |
| GRANT_EXPIRED | License term has ended | Request renewal from the rights holder |
| PLATFORM_OUT_OF_SCOPE | Platform not in the granted scope | Do not publish to this platform |
| CATEGORY_RESTRICTED | Content category restricted by the rights holder | Do not render this content |
| RENDER_BUDGET_EXHAUSTED | The grant's render budget has been spent | Halt renders; request a larger budget |
Decision leases & revocation
Allows carry a valid_untiltimestamp — at most 15 minutes, never past the grant's term. Cache the decision until then; re-check at publish time. Revocation flips the API immediately: the next check returns GRANT_REVOKED and is receipted like every other decision. Design your pipeline to fail closed — no valid lease, no render.
Render budgets
A grant may carry a render budget. Each allowed check with action: "render" spends one render; once the budget is spent, further render checks return RENDER_BUDGET_EXHAUSTED. Non-render actions (previews, dry runs) never draw down the budget.
POST /api/v1/verify
Public, unauthenticated. Recomputes the HMAC over receipt_id.grant_id.result.timestamp so platforms, brands, or counsel can confirm a receipt without a Cameo account.
curl -X POST https://built-different-eosin.vercel.app/api/v1/verify \
-H "Content-Type: application/json" \
-d '{"receipt_id": "b7f3a2c1-…", "signature": "3f9ac2…"}'{
"valid": true,
"receipt": {
"id": "b7f3a2c1-…",
"grant_id": "9c1e07ab-…",
"result": "allowed",
"reason_code": "WITHIN_SCOPE",
"platform": "dramabox",
"action": "render",
"timestamp": "2026-07-30T21:26:03.512Z"
}
}Audit integrity
Every event in a studio's ledger is hash-chained: each entry's SHA-256 hash covers its contents plus the previous entry's hash. Editing or deleting any past event breaks every hash after it, so the Certificate of Verification can attest that the chain of custody is intact. Two-stage consent — approving the actual output before release, not just the scope — is on the roadmap.
Where the check sits
┌─────────────┐ check ┌──────────────┐ re-check ┌─────────────┐
│ render job │ ─────────► │ Runway/Kling │ ───────────► │ publish │
│ (pre-gate) │ allowed? │ render │ still valid?│ + receipt │
└─────────────┘ └──────────────┘ │ in C2PA │
50ms · fail closed $1/clip └─────────────┘Gate before the expensive step, re-verify before the irreversible one, and ship the receipt with the asset's provenance manifest.