retrace_
source ↗

Settings

api key

rt_demo_public_9f4c2a7ePublic demo key — anyone can send traces into this project.

send a trace

typescript
import { Retrace } from "@retrace/sdk"; // packages/sdk in the repo

const rt = new Retrace({ apiKey: "rt_demo_public_9f4c2a7e", baseUrl: "https://retrace-neel.netlify.app" });

const trace = rt.trace({ name: "support-bot", input: { question } });
const gen = trace.generation({ name: "answer", model: "claude-haiku-4-5", input: { question } });
gen.end({ output: answer, usage: { promptTokens: 812, completionTokens: 164 } });
await trace.end({ output: answer });
curl
ID=$(uuidgen | tr A-Z a-z); NOW=$(date -u +%Y-%m-%dT%H:%M:%SZ)
curl -s https://retrace-neel.netlify.app/api/ingest \
  -H "authorization: Bearer rt_demo_public_9f4c2a7e" \
  -H "content-type: application/json" \
  -d '{"batch":[
    {"type":"trace.create","id":"'$ID'","timestamp":"'$NOW'","name":"curl-test"},
    {"type":"trace.end","id":"'$ID'","timestamp":"'$NOW'"}]}'

Send token counts, not dollars — cost is computed on the server from the pricing table below.

model pricing · usd per million tokens

modelinputoutput
claude-haiku-4-5$1.00$5.00
claude-haiku-4-5-20251001$1.00$5.00
gpt-4o-mini$0.15$0.60
sim-1$1.00$5.00