A PRACTICAL GUIDE / VERSION 1.0
From sample to live workspace.
Start with the prepared examples, then connect Workers AI, a usage database and your private access key. Paid Gateway access is a separate, optional integration.
1. Deploy the application
Upload Nexora_Signal_Cloudflare_Upload.zip as a new Cloudflare Pages project. It contains a compiled _worker.js backend as well as the website assets. Do not upload this tool over your personal portfolio project.
The app will start in a sample workspace. The sample reports are prepared examples and do not call an AI model.
To use your domain, add tools.xoradigita.com under the new project's Custom domains settings after deployment.
2. Connect live analysis
- In your Pages project, open Settings → Bindings → Add → Workers AI. Name the binding
AI. - Create a D1 database named
nexora-signal-usage. Apply the SQL shown below in its Console. - In the Pages project, add a D1 database binding named
DBand select that database. - Add an encrypted secret named
APP_ACCESS_KEY, using a randomly generated value of at least 24 characters. Keep it out of source control. - Add text variables
PAYMENT_MODE=access-keyandDAILY_LIMIT=25. - Redeploy the same upload ZIP so the new bindings and variables take effect. Open the app and choose Connect workspace.
D1 schema
CREATE TABLE IF NOT EXISTS daily_usage (
day TEXT PRIMARY KEY,
attempts INTEGER NOT NULL DEFAULT 0 CHECK (attempts >= 0)
);
CREATE TABLE IF NOT EXISTS payment_uses (
token_hash TEXT PRIMARY KEY,
expires_at INTEGER NOT NULL
);
CREATE INDEX IF NOT EXISTS payment_uses_expiry
ON payment_uses(expires_at);Use the API
POST /api/analyze-incidentSend an authenticated JSON request. In private workspace mode, the access key belongs in the Authorization header. Keep the key on a trusted server or in your own client, rather than embedding it in a public website.
curl https://YOUR_TOOL_DOMAIN/api/analyze-incident \
-H "Authorization: Bearer YOUR_WORKSPACE_KEY" \
-H "Content-Type: application/json" \
--data '{"title":"Database lookup failed",
"system":"Network / DNS",
"impact":"Several users",
"log":"getaddrinfo ENOTFOUND db.internal.example",
"context":"The host should resolve internally."}'The response contains analysis.summary, possible_causes, diagnostic_checks, missing_information and escalation. Report metadata identifies sample versus live output.
Download the OpenAPI specification.
| Endpoint | Purpose |
|---|---|
GET /api/health | App health and live configuration status. |
GET /api/status | Workspace mode, limits and available examples. |
GET /api/examples?id=dns | A prepared example: dns, service or web. |
GET /api/usage | Today's admitted attempts; requires the private key. |
Input and output limits
Logs: 8,000 characters. Context: 2,000 characters. Title: 120 characters. Maximum request body: 40 KB. The model call is capped at 1,200 output tokens. The server validates model output before presenting a report.
Common responses
400 invalid input · 401 missing or invalid access · 409 reused payment context · 413 input too large · 429 daily limit reached · 502 model failure · 503 setup incomplete · 504 analysis timeout.
Optional Monetization Gateway adapter
Cloudflare's Monetization Gateway is currently a closed beta restricted to eligible U.S.-based buyers and sellers. This package does not activate payment collection, create a wallet or bypass those requirements.
The source includes an origin-side adapter that verifies signed PAYMENT-CONTEXT authorizations against Cloudflare's pinned signing keys. It checks the signature, expiry, audience, pricing scheme and authorized amount. A payment context is accepted for one analysis attempt only.
- Obtain Gateway access through your eligible Cloudflare account.
- Set
PAYMENT_MODE=gatewayandPUBLIC_ORIGIN=https://YOUR_TOOL_DOMAIN. - Set
GATEWAY_SCHEME=uptoandGATEWAY_PRICE_ATOMIC=50000. The amount is an illustrative US$0.05 price, not a revenue forecast. - Create a Gateway rule for POST requests to
/api/analyze-incident, with variable pricing and a maximum authorization of at least US$0.05. - Use an x402-compatible paying client. The browser workspace remains available for sample reports; it does not contain a wallet checkout.
For the recommended upto scheme, a successful analysis returns the actual amount in PAYMENT-SETTLEMENT. Error responses omit that header. The Gateway performs settlement and creates the buyer receipt. Fixed exact mode is also supported when both the app and rule are configured to match.
How the tool treats your data
The application keeps the current incident and report in your browser memory. It does not save incident text or reports to the database. Live submissions go to Workers AI for processing. Common labelled secrets are redacted before the model call; this is a best-effort extra measure, so remove sensitive information yourself before submitting.
The app provides suggestions and never runs commands or changes systems. Review the report using your own incident procedures.