Workspace/API & setup guide
Open workspace

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

  1. In your Pages project, open Settings → Bindings → Add → Workers AI. Name the binding AI.
  2. Create a D1 database named nexora-signal-usage. Apply the SQL shown below in its Console.
  3. In the Pages project, add a D1 database binding named DB and select that database.
  4. Add an encrypted secret named APP_ACCESS_KEY, using a randomly generated value of at least 24 characters. Keep it out of source control.
  5. Add text variables PAYMENT_MODE=access-key and DAILY_LIMIT=25.
  6. Redeploy the same upload ZIP so the new bindings and variables take effect. Open the app and choose Connect workspace.
Live requests use your Cloudflare Workers AI and D1 account usage. The limit counts admitted attempts, including model errors and timeouts. The counter resets at 00:00 UTC; it is an analysis-attempt limit, not a limit on your entire Cloudflare bill.

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-incident

Send 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.

EndpointPurpose
GET /api/healthApp health and live configuration status.
GET /api/statusWorkspace mode, limits and available examples.
GET /api/examples?id=dnsA prepared example: dns, service or web.
GET /api/usageToday'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.

  1. Obtain Gateway access through your eligible Cloudflare account.
  2. Set PAYMENT_MODE=gateway and PUBLIC_ORIGIN=https://YOUR_TOOL_DOMAIN.
  3. Set GATEWAY_SCHEME=upto and GATEWAY_PRICE_ATOMIC=50000. The amount is an illustrative US$0.05 price, not a revenue forecast.
  4. Create a Gateway rule for POST requests to /api/analyze-incident, with variable pricing and a maximum authorization of at least US$0.05.
  5. 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.

Payment verification is tested with signed fixtures. Real Gateway payments, wallet settlement, retries and the uniqueness of the provider's payment contexts must be validated in your approved account before selling access. The gateway adapter does not create a customer billing database or an MCP server.

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.

Read the privacy information.

References