Authentication
How to authenticate with the PathFinder API and connect from any OpenAI-compatible client.
API keys
All API requests require a Bearer token in the Authorization header.
Authorization: Bearer pf_live_xxxxxxxxxxxxxxxx
Create keys in Dashboard → API Keys. Keys are hashed with SHA-256 and stored securely. The full key is shown only once at creation.
Base URL
https://api.pathfinder.dev
OpenAI SDK
Point any OpenAI-compatible client at PathFinder and it just works.
import OpenAI from "openai"
const client = new OpenAI({
baseURL: "https://api.pathfinder.dev/v1",
apiKey: "pf_live_xxxxxxxxxxxxxxxx",
})
const response = await client.chat.completions.create({
model: "auto", // ignored — PathFinder picks the model
messages: [{ role: "user", content: "Hello!" }],
})The model field is ignored by PathFinder. You can pass any value.
Python
from openai import OpenAI
client = OpenAI(
base_url="https://api.pathfinder.dev/v1",
api_key="pf_live_xxxxxxxxxxxxxxxx",
)
response = client.chat.completions.create(
model="auto",
messages=[{"role": "user", "content": "Hello!"}],
)cURL
curl https://api.pathfinder.dev/v1/chat \
-H "Authorization: Bearer pf_live_xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{ "messages": [{ "role": "user", "content": "Hello!" }] }'