PathFinder

Quick Start

Route your first AI request in 60 seconds.

1. Get an API key

Create a free account, then go to Dashboard → API Keys and create your first key. Top up your balance in Billing to start making requests.

2. Make a request

PathFinder uses the standard Chat Completions format. Point any OpenAI-compatible client at PathFinder and it just works.

curl https://api.pathfinder.dev/v1/chat \
  -H "Authorization: Bearer pf_live_xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [
      { "role": "user", "content": "Write a quicksort in Python" }
    ]
  }'

PathFinder classifies the task (coding), picks the best model from live benchmarks, and proxies the call. You get a standard chat completion response.

3. Apply filters (optional)

Constrain model selection with the x-pathfinder-filters header.

curl https://api.pathfinder.dev/v1/chat \
  -H "Authorization: Bearer pf_live_xxxxxxxxxxxxxxxx" \
  -H "x-pathfinder-filters: cheapest,eu" \
  -H "Content-Type: application/json" \
  -d '{ "messages": [{ "role": "user", "content": "Summarize this report..." }] }'
FilterEffectPlans
cheapestSort by lowest cost per tokenAll
fastestSort by lowest latencyAll
qualitySort by highest benchmark score (requires high data confidence)Builder+
ecoPrefer providers with greener infrastructureBuilder+
euOnly route to providers with EU data residencyBuilder+
usOnly route to providers with US data residencyBuilder+

4. Check the routing decision

Every response includes headers showing which model was selected and why.

X-Routed-Model: claude-sonnet-4
X-Task-Type: coding
X-Provider: anthropic
X-Routing-Fee: 0.0004
X-Classification-Confidence: 0.95
X-Data-Confidence: 0.82
X-Benchmark-Score: 87.3

Use these to debug routing or build observability into your application.

5. Stream responses

Set "stream": true for Server-Sent Events, compatible with the OpenAI streaming format.

curl https://api.pathfinder.dev/v1/chat \
  -H "Authorization: Bearer pf_live_xxxxxxxxxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "messages": [{ "role": "user", "content": "Explain recursion" }],
    "stream": true
  }'