Skip to main content
The TokenPath API is a JSON-over-HTTPS REST API. There is no SDK to install. Any HTTP client works.

Authentication

Small POST /v1/attributions requests support free keyless access. Omit Authorization to use it. Supplied keys retain normal scope checks and billing. GET /health is also public. Send an API key as a Bearer token on protected requests:
Create keys at platform.tokenpath.ai. See Authentication for scopes and rotation.

Endpoints

Requests and responses are application/json, except /v1/generate, which streams text/event-stream. Large responses are gzip-compressed when your client sends Accept-Encoding: gzip.

Conventions

  • Offsets. Every character offset is half-open ([start, end)) and counted in the request’s offset_encoding, which defaults to utf-16. See Offsets and encoding.
  • Strings are never rewritten. Offsets index into the exact document and answer you sent.
  • Request IDs. Every response has an X-Request-ID header. Include it when you contact support.
  • Versioning. Endpoints live under /v1/. Breaking changes will ship under a new version prefix.

Limits

The table below describes keyed access. See keyless limits for the smaller input caps and shared budget. For higher rate limits, email [email protected].

Errors

Every error uses one envelope:
Branch on code. details appears only when there is extra context. The authentication errors below can come from any authenticated endpoint. Errors lists every code with retry guidance.