/v1/* endpoints require an Authorization: Bearer <key> header. Use your publishable key (pk_live_...) for evaluation requests.
1
Get an API key
Sign in at pecta.ai, open Settings → API keys, and create a new key. Copy the
pk_live_... value — it is only shown once.Store it in an environment variable:2
Send your first evaluation
POST agent output to
/v1/evaluate. The minimum required fields are agent_id and output. Include tool and latency_ms to enable the latency gate and to improve dashboard visibility.3
Read the response
A successful evaluation returns HTTP 200 with the verdict, per-gate detail, total latency, and the agent’s current reputation score.When a gate fails,
passed is false and the failing gate includes a reason string:4
Handle errors
API errors return a non-2xx status with a structured body:Common status codes: