Platform Plan
Product boundaries for using 0xinf as the internal billing and relay foundation.
Keep 0xinf internal
Platform
0xinf remains the billing, access, usage ledger, and relay engine. Customer portals call stable product APIs instead of exposing New API administration screens.
Separate product surfaces
Product
Developer Portal focuses on keys, docs, models, usage, and request traces. Enterprise Portal focuses on tenants, seats, budgets, policies, invoices, and audit trails.
Use correlation as the control plane
Ops
Every customer-facing request keeps a local request ID, upstream request ID, and admin-only diagnostic metadata so support can drill into 0xinf, sub2api, and edge systems.
Boundary map
Developer Portal
Individual builders and app teams
Expose: API keys, base URL, model names, request status, token usage, docs, friendly errors
Internal: Channel IDs, provider secrets, account pools, retry internals, raw upstream payloads
Enterprise Portal
Admins, finance, security, and team leads
Expose: Departments, members, budgets, policies, invoices, audit events, request diagnostics
Internal: 0xinf channel setup, sub2api accounts, Cloudflare internals, provider credential routing
Internal Ops
Platform operators
Expose: 0xinf logs, upstream request IDs, sub2api Ops records, CF-Ray, channel health, retries
Internal: Nothing operationally necessary; this remains admin-only and access controlled
Implementation track
- 1Foundation
Stabilize the internal gateway contract
DoneDocument stable portal APIs for key creation, usage summaries, request traces, and billing settlement.
The portals stop depending on 0xinf UI internals.
- 2Developer Portal
Expose the happy path for builders
Demo shellBack each page with portal-safe APIs: keys, model catalog, setup snippets, request history, and friendly error categories.
Developers can self-serve without seeing routing, account-pool, or provider credentials.
- 3Enterprise Portal
Add org administration above 0xinf
Demo in progressModel tenants, departments, members, budget policies, cost centers, SSO, audit log, and invoice exports.
Enterprise buyers manage governance while 0xinf keeps doing billing and relay underneath.
- 4Ops Console
Create an internal diagnosis surface
Correlation IDs availableJoin 0xinf logs, sub2api Ops, Cloudflare Ray IDs, and edge reports into a single support timeline.
Support gets full internals; customers only get safe, understandable status.
Portal API contracts
Portal identity
Design/portal/v1/me0xinf users + org mapping
Key management
Demo-ready/portal/v1/api-keys0xinf token APIs
Usage summary
Design/portal/v1/usage/summary0xinf logs + billing ledger
Request trace
Ready for backend/portal/v1/requests/:id0xinf request IDs + upstream IDs
Org budgets
New/enterprise/v1/budgetsnew org policy layer + 0xinf quotas
Invoice export
New/enterprise/v1/invoicesbilling ledger + cost centers