retrace

// authentication

Retrace Authentication

Use a Retrace API key for agents, SDKs, CLI sessions, and server-to-server automation, or a short-lived bearer JWT for the web application.

Start freeRead the docs →

API keys for agents

Create an rt_ API key in the dashboard and send it as x-retrace-key to REST endpoints or as a Bearer token to the MCP server.

JWTs for the web app

The web application uses short-lived Better Auth JWTs verified through asymmetric JWKS; custom integrations should prefer API keys.

Keys are shown once

Copy a new API key when it is created. Retrace stores only a protected hash and cannot display the raw value again.

Scoped account access

Every authenticated read and write is scoped to the account or an authorized organization resource.

terminal
curl https://api.retraceai.tech/api/v1/traces \
  -H "x-retrace-key: rt_..."

Authenticate a REST request with an API key.

mcp.json
{
  "url": "https://api.retraceai.tech/mcp",
  "headers": { "Authorization": "Bearer rt_..." }
}

The MCP endpoint uses the HTTP Authorization header.

Authentication methods

  • x-retrace-key: rt_... — REST API and OTLP authentication
  • Authorization: Bearer rt_... — MCP and supported REST authentication
  • retrace auth login — interactive CLI device login

More for developers

// python sdkPython SDKRecord Python agents with one decorator// typescript sdkTypeScript SDKTrace TS/JS agents with a function wrapper// api referenceAPI ReferenceThe full REST + streaming API// webhooksWebhooksReceive signed Retrace events in your application// mcp serverMCP ServerCall Retrace from agents over Streamable HTTP// command lineCLIScript Retrace workflows from a terminal or CI