Quickstart
Get a first successful local inspection in five minutes after the API is already listening on http://localhost:5150. Cold Postgres bring-up and the first Rust compile are prerequisites outside that clock.
Prerequisites (untimed)
Section titled “Prerequisites (untimed)”From the repository root:
- Start Postgres 18.7:
just db-up. If you ran an older checkout that used Postgres 16, drop its volume first withdocker compose down -v, which permanently deletes that local database, so export anything you need before running it - Start the API and wait until it listens:
just start(defaulthttp://localhost:5150) - Have
curlavailable (jqoptional)
Timed path (≤ 5 minutes)
Section titled “Timed path (≤ 5 minutes)”1. Confirm the process is ready
Section titled “1. Confirm the process is ready”curl -fsS http://localhost:5150/health/readyExpect JSON with "status":"ready". "inference":"not_loaded" is normal on this scaffold — no weights are loaded.
2. Create an account and API key
Section titled “2. Create an account and API key”Start the API with ANANZI_OPERATOR_TOKEN exported (any non-empty value locally) and send the same value as a Bearer token; the route refuses without it.
curl -fsS http://localhost:5150/v1/accounts \ -H 'content-type: application/json' \ -H "authorization: Bearer $ANANZI_OPERATOR_TOKEN" \ -d '{"organization_name":"Quickstart Org"}'Save api_key.key once. It is shown only on create:
export ANANZI_API_KEY='paste-the-raw-key-here'3. Inspect text
Section titled “3. Inspect text”curl -fsS http://localhost:5150/v1/inspect \ -H 'content-type: application/json' \ -H "Authorization: Bearer ${ANANZI_API_KEY}" \ -H 'Idempotency-Key: demo-1' \ -d '{ "content":"AKIAIOSFODNN7EXAMPLE", "source":"user_prompt", "checks":["secrets"] }'Expect a 200 body shaped like:
{ "request_id": "…", "decision": "review", "findings": [ { "category": "secrets", "detector": "secrets-rules", "version": "mvp-0", "score": null, "severity": "high" } ], "usage": { "units": 1 }}That sample charges 1 because the content is shorter than 1024 bytes: units are ceil(content_bytes / 1024), not a constant. Reuse the same Idempotency-Key when you retry that call; a second success does not add another charge. A new logical call needs a new key. The example key is the AWS documentation sample. Do not treat this body as permission to store it.
4. Optional: benign text
Section titled “4. Optional: benign text”Repeat the inspect call with content that is not an MVP secret and checks: ["secrets"]. Expect decision: "no_findings" and an empty findings array when the scanner completes. checks: ["prompt_injection"] returns 503 detector_failed until a model is loaded. That is not no_findings.
When a model is loaded, successful prompt_injection responses report prompt_injection_truncated. If it is true, some submitted text was outside the model context. A no_findings response then covers only the inspected prefix.
Checks on this scaffold
Section titled “Checks on this scaffold”prompt_injection— registered, fails closed (detector_failed), notmock/scaffold-0secrets— registered rules scanner (secrets-rules/mvp-0). A match recommendsreview.
Limits: 512-token model context, special tokens included (longer text is right-truncated; the response sets prompt_injection_truncated when coverage is known), content 4096 bytes, HTTP body 32 KiB, request timeout 3 seconds, inference timeout 2 seconds. The latency target is p50 at most 100 ms and p95 at most 500 ms, warm, one request in flight, on a local Apple M2 container basis, covering tokenization and inference only. It is a target, not an SLA, and is unmeasured at 512 tokens (ADR 0039, ADR 0040).
Next: Authentication · Errors