xAdmin API Overview
Version: v1.0
Last Updated: 2026-01-09
Introduction
xAdmin is a centralized authentication and billing platform designed to decouple user management and billing logic from business services. This allows your core services (such as AI inference APIs) to remain stateless and focused purely on business logic.
Core Capabilities
| Feature | Description |
|---|---|
| Token Verification | Validate token authenticity, expiration, and permissions |
| Automatic Billing | Deduct points/credits automatically on verified requests |
| Access Control | Block requests from banned or over-quota clients |
Supported Architectures
| Type | Description |
|---|---|
| Internal (Service Binding) | Cloudflare Workers via Service Bindings for zero-latency calls |
| External (HTTP API) | Any HTTP-capable client (Python, Go, Node.js, cURL) |
Authentication Flow
The integration pattern follows a simple pass-through verification model:
mermaid
sequenceDiagram
participant User as End User
participant Worker as Your Service
participant XAdmin as xAdmin
User->>Worker: API Request (Authorization: Bearer <token>)
Note over Worker: 1. Intercept request
Worker->>XAdmin: 2. Pass-through verify (Service Binding / HTTP)
alt Verification Success
XAdmin-->>Worker: HTTP 200 OK (remaining balance)
Note over Worker: 3. Execute business logic
Worker-->>User: Return business data
else Verification Failed
XAdmin-->>Worker: HTTP 403 Forbidden
Worker-->>User: Return error message
endQuick Start
Step 1: Obtain API Credentials
Contact your xAdmin administrator to obtain:
- Your service's Token for authentication
- The API endpoint URL
Step 2: Integrate Verification
Choose your integration method:
- Cloudflare Workers (Service Binding) - Recommended for Cloudflare-hosted services
- External HTTP API - For services hosted elsewhere
Step 3: Handle Responses
All API calls must check the response status:
200 OK- Proceed with business logic401/403- Reject the request immediately
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/v1/verify | POST | Verify token and deduct quota |
Performance
xAdmin is optimized for high-performance scenarios:
- L1 Cache (Memory): Hot data served in < 1ms
- L2 Cache (KV): Distributed cache for global consistency
- Service Binding: Internal calls with zero TLS overhead
Next Steps
- API Reference - Complete endpoint documentation
- Integration Guide - Step-by-step integration examples