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. Create a key. Sign in with a one-time email code and copy the full key when it appears.
- 2. Download the sample. Replace its rows with sanitized data you own or are allowed to process.
- 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.jsonRequest contract
| Field | Required | Meaning |
|---|---|---|
| input_format | Yes | csv, json, jsonl, ndjson, or text |
| policy | Yes | commercial_spam_patterns |
| rows | Yes | String or array of objects containing message-like rows |
| source_name | No | A filename or source label, up to 120 characters |
| return | No | summary, 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.
Endpoints
POST
https://kikuai.dev/v1/patas/auditsGET
https://kikuai.dev/v1/patas/audits/:job_idGET
https://kikuai.dev/v1/patas/usagePOST
https://kikuai.dev/v1/patas/checkoutLimits 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.
curl https://kikuai.dev/v1/patas/usage \
-H "Authorization: Bearer YOUR_API_KEY"Errors
| HTTP | Typical code | Action |
|---|---|---|
| 401 | PATAS_UNAUTHORIZED | Check the bearer key. |
| 413 | PATAS_PAYLOAD_TOO_LARGE | Reduce the body below 262,144 bytes. |
| 422 | PATAS_ROW_LIMIT_EXCEEDED | Split the export into batches of 500 rows or fewer. |
| 429 | PATAS_CREDITS_REQUIRED | Wait for the daily reset or add credits. |
| 503 | PATAS_SANDBOX_BINDING_MISSING | Service 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.