Hosted API

From API key to first audit.

The hosted API is synchronous and audit-only. One request consumes one job plus the number of parsed rows.

Quickstart

Not ready to create an account? Generate a browser-local report first.

  1. 1. Create a key. Sign in with a one-time email code and copy the full key when it appears.
  2. 2. Download the sample. Replace its rows with sanitized data you own or are allowed to process.
  3. 3. Send the request. Use the key as a bearer token.
curl https://kikuai.dev/v1/patas/audits \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  --data @sample-audit-request.json

Request contract

FieldRequiredMeaning
input_formatYescsv, json, jsonl, ndjson, or text
policyYescommercial_spam_patterns
rowsYesString or array of objects containing message-like rows
source_nameNoA filename or source label, up to 120 characters
returnNosummary, clusters, candidate_rules, risk_notes

For labeled exports, keep the message text and your spam/ham label. Additional columns may help local review, but do not send credentials, payment data, private URLs, or unrelated customer records.

Response

summary
Rows parsed, findings, high-severity findings, candidate-rule count, and selected message fields.
clusters
Pattern type, severity, confidence, count, sanitized evidence, and recommendation.
candidate_rules
Review-only rule candidates. Hosted output never authorizes automatic enforcement.
risk_notes
Known false-positive scenarios and local checks to perform.
usage
Free and paid credit consumption after this job.
Open full sample response

Endpoints

POSThttps://kikuai.dev/v1/patas/audits
GEThttps://kikuai.dev/v1/patas/audits/:job_id
GEThttps://kikuai.dev/v1/patas/usage
POSThttps://kikuai.dev/v1/patas/checkout

Limits and billing

  • Free daily: 10 jobs and 2,500 rows per key.
  • Per audit: 500 parsed rows and a 262,144-byte request body.
  • Paid pack: $19 once adds 100 jobs and 100,000 account-wide rows.
  • Order: the free allowance is used first only when the whole request fits; otherwise PATAS uses paid credits.
Compare free and paid usage
curl https://kikuai.dev/v1/patas/usage \
  -H "Authorization: Bearer YOUR_API_KEY"

Errors

HTTPTypical codeAction
401PATAS_UNAUTHORIZEDCheck the bearer key.
413PATAS_PAYLOAD_TOO_LARGEReduce the body below 262,144 bytes.
422PATAS_ROW_LIMIT_EXCEEDEDSplit the export into batches of 500 rows or fewer.
429PATAS_CREDITS_REQUIREDWait for the daily reset or add credits.
503PATAS_SANDBOX_BINDING_MISSINGService configuration is unavailable; retry later or contact support.

Data handling

Hosted audits do not persist raw input rows. PATAS stores an input hash, usage counters, job metadata, and the sanitized report so the same key can fetch the completed job. Customer report processing does not require cloud AI.