/v1/* endpoints require an Authorization: Bearer <key> header. Use your publishable key (pk_live_...) for evaluation requests.
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: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.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:Request body reference
| Field | Type | Required | Description |
|---|---|---|---|
agent_id | string | Yes | Identifier for the agent. Determines which reputation score is updated. |
output | unknown | Yes | The agent’s output to evaluate. Passed to each gate but never stored. |
tool | string | No | Name of the tool that produced the output (e.g. shell.run). |
latency_ms | number | No | Time taken for the agent to produce the output. Required to trigger the latency gate. |
input | unknown | No | Original tool input. Used by RTB gates for request/response matching. Never stored. |