Complete reference for all Zero Point Logic endpoints. Use the ZPL engine to generate mathematically balanced sequences, or the AI filter to analyze and rebalance text responses for neutrality.
Base URL: https://zpl-backend.onrender.com
Authentication HOW TO AUTHENTICATE
Two authentication methods:
1. API Key — add header X-Api-Key: zpl_your_key_here to every request. Best for server-to-server.
2. JWT Token — add header Authorization: Bearer your_jwt_token. Used after login from web app.
Anonymous — /compute and /sweep work without auth for N≤9 (free tier demo).
GET/sweepSweep bias range, returns AIN scoresAnonymous N≤9
Runs ZPL across a range of bias values (0.0 to 1.0) and returns AIN scores for each step. Useful for visualizations and analysis.
Parameter
Type
Description
Nopt
int
Sequence size. Default: 9
samplesopt
int
Iterations per step. Default: 500
stepsopt
int
How many bias values to test (5–50). Default: 20
GET /sweep?N=9&samples=500&steps=20
X-Api-Key: zpl_your_key
AI Filter BIAS-NEUTRAL AI
POST/ai/chatZPL AI Chat — uses server Groq keyJWT / API Key
Chat with Groq-hosted AI (Llama, Qwen, Mixtral) filtered through ZPL. No user API key needed — uses ZPL's server key. Every response includes an AIN neutrality score.
Parameter
Type
Description
messages*
array
Array of {role, content} objects. Roles: user, assistant, system
modelopt
string
Groq model ID. Default: llama-3.1-8b-instant
zpl_optionsopt
object
{"filter_mode": "analyze|rebalance|strict"}
Filter modes:
• analyze — return response + AIN score, no changes
• rebalance — if AIN < 0.4, retry with neutralizing prompt
• strict — retry up to 3x until AIN > 0.7
POST/ai/analyzeAnalyze any text for bias — no AI callJWT / API Key
Run ZPL bias analysis on any text. Returns AIN score, bias direction, and word ratios. No AI provider needed.
Parameter
Type
Description
text*
string
Text to analyze. Max 10,000 characters.
POST /ai/analyze
X-Api-Key: zpl_your_key
{ "text": "Electric cars are completely useless and a total scam." }
POST/ai/proxyProxy to OpenAI / Anthropic / Groq with ZPL filterBasic+ plan
Forward messages to any AI provider using your own API key, filtered through ZPL. The user's key is never stored or logged.
Parameter
Type
Description
provider*
string
One of: openai, anthropic, groq
user_api_key*
string
Your API key for the chosen provider
messages*
array
Array of {role, content} message objects
modelopt
string
Model ID for the chosen provider
zpl_optionsopt
object
{"filter_mode": "analyze|rebalance|strict"}
API Keys KEY MANAGEMENT
GET/api-keysList all your API keysJWT required
GET /api-keys
Authorization: Bearer your_jwt_token
POST/api-keysCreate a new API keyJWT required
Important: The full API key is only returned once at creation. Store it securely — it cannot be retrieved again.
Parameter
Type
Description
nameopt
string
Label for this key. Default: "Default Key"
POST /api-keys
Authorization: Bearer your_jwt_token
Content-Type: application/json
{ "name": "My Game Server" }
// Response:
{
"id": 42,
"name": "My Game Server",
"key": "zpl_abc123...", // SAVE THIS — shown once only"key_prefix": "zpl_abc1",
"created_at": "2026-03-29T..."
}
DELETE/api-keys/{key_id}Revoke an API keyJWT required
GET/usage/statsGet your usage statisticsJWT / API Key
GET /usage/stats
X-Api-Key: zpl_your_key
Billing SUBSCRIPTION & TOP-UPS
POST/billing/checkoutCreate a Stripe checkout sessionJWT required
POST /billing/checkout
Authorization: Bearer your_jwt_token
Content-Type: application/json
{
"plan": "pro"// basic | pro | gamepro | studio | enterprise | enterprise_xl
}
// Response:
{
"checkout_url": "https://checkout.stripe.com/pay/cs_..."
}
POST/billing/topupBuy a one-time compute top-upJWT required
POST /billing/topup
Authorization: Bearer your_jwt_token
Content-Type: application/json
{
"topup": "topup_10k"// topup_10k (€4.99) → +10K compute, +200 AI calls// topup_25k (€9.99) → +25K compute, +500 AI calls// topup_50k (€17.99) → +50K compute, +1K AI calls// topup_100k (€29.99)→ +100K compute, +2K AI calls// topup_500k (€99.99)→ +500K compute, +10K AI calls// topup_2m (€349.99) → +2M compute, +40K AI calls
}
// Response:
{
"checkout_url": "https://checkout.stripe.com/pay/cs_..."
}
GET/billing/topupsList available top-up packagesJWT required
GET /billing/topups
Authorization: Bearer your_jwt_token
// Response: list of available top-up packs for your plan
[
{ "id": "topup_10k", "compute": 10000, "ai_calls": 200, "price_eur": 4.99 },
{ "id": "topup_25k", "compute": 25000, "ai_calls": 500, "price_eur": 9.99 }
]
POST/billing/cancelCancel current subscriptionJWT required
POST /billing/cancel
Authorization: Bearer your_jwt_token
// Cancels at end of current billing period.// Response:
{ "status": "cancelled", "effective": "end_of_period" }