---
title: "API Reference — Retrace"
description: "Retrace REST API reference: traces, forks, evaluations, guardrails, enforcement, sessions, search, and insights — authenticated with an API key and rate-limited per route."
canonical: "https://retraceai.tech/developers/api-reference"
last-updated: 2026-08-26
format: text/markdown
---

# API Reference

A REST API for everything Retrace does — record runs, fork and replay, evaluate, enforce, search, and analyze — plus a streaming channel for runs that update in real time.

## What it does

- **REST + streaming** — A predictable REST API over JSON, plus a streaming channel for runs that update in real time.
- **Simple auth** — Authenticate with a project API key (rt_…) sent as a request header, or a session token for the web app.
- **Rate-limited per route** — Sensible per-route limits keep the platform fair, and responses tell you when to back off.
- **Everything is an endpoint** — Traces, tapes, forks, evaluations, eval-rules, prompts, datasets, memory, search, insights, analytics, guardrails, enforcement, sessions, feedback, governance, API keys, billing, and usage.
- **Built for automation** — Pairs with the CLI and SDKs — ideal for CI gates, internal dashboards, and back-office tooling.

## Examples

Every request authenticates with your API key header.

```terminal
curl "https://api.retraceai.tech/api/v1/traces?limit=20" \
  -H "x-retrace-key: rt_..."
```


## Selected endpoints

- `GET /api/v1/traces · GET /api/v1/traces/:id — runs`
- `POST /api/v1/forks · POST /api/v1/forks/:id/replay — fork & replay`
- `POST /api/v1/evaluations/:id/gate — eval gate`
- `POST /api/v1/enforcement/check — enforcement decision`
- `POST /api/v1/search — semantic search`
- `GET /api/v1/sessions/:id/graph — agent topology`
- `POST/GET /api/v1/guardrails — guardrails`
- `GET /api/v1/usage — plan usage`

## Related

- HTML page: https://retraceai.tech/developers/api-reference
- Documentation: https://docs.retraceai.tech
- OpenAPI specification: https://retraceai.tech/openapi.json
- Authentication for agents: https://retraceai.tech/auth.md
