Sign in Book a demo 135

TokenJam API

A read-only JSON API over everything published on tokenjam.dev. Public, unauthenticated, and described by an OpenAPI 3.1 document. Built so an agent can read the TokenJam docs without scraping HTML.

Base URL and authentication

Base URL is https://tokenjam.dev. There is no authentication: no API key, no OAuth flow, no signup. Do not send an Authorization header.

Rate limits

Served by the TokenJam Node front door, every response carries the IETF RateLimit fields, the ceiling is 600 requests per 60 seconds per client, and a refusal is a 429 with Retry-After:

RateLimit-Policy: "default";q=600;w=60
RateLimit: "default";r=598;t=57

q is the quota, w the window in seconds, r what you have left, t the seconds until it resets. Read r and slow down before you reach zero rather than waiting for the 429.

The static CDN deployment enforces no application-level limit and sends no such headers, so treat their absence as "no limit advertised", not as unlimited quota. Sustained abusive volume may still be throttled at the edge either way.

curl -s https://tokenjam.dev/api/v1/index.json

That discovery document lists every endpoint below, plus the other machine-readable files on this site. If you only remember one URL, remember that one.

JSON endpoints

OperationPathReturns
getApiIndex /api/v1/index.json API discovery document
listDeprecations /api/v1/deprecations.json List deprecated endpoints and the deprecation policy
listBlogPosts /api/v1/posts.json List all published blog posts
getBlogPost /api/v1/posts/{postId}.json Get one blog post, including its markdown body
listDocs /api/v1/docs.json List all documentation pages
getDoc /api/v1/docs/{docId}.json Get one documentation page, including its markdown body
listProducts /api/v1/products.json List the TokenJam optimization analyzers
getProduct /api/v1/products/{productSlug}.json Get one analyzer, including its mechanism and confidence tiers
getOpenApiDocument /openapi.json This OpenAPI document

Markdown and text endpoints

Every documentation page and blog post is also served as clean markdown by appending .md to its path. These are the cheapest way to fill a context window, since they carry no navigation, styles, or scripts.

OperationPathReturns
getAgentInstructions /agents.md Agent instructions: when to use TokenJam and how to call it
getLlmsIndex /llms.txt llms.txt index of the site
getLlmsFullText /llms-full.txt Full-text dump of the site for LLM ingestion
getBlogPostMarkdown /blog/{postId}.md Get a blog post as plain markdown
getDocMarkdown /docs/{docId}.md Get a documentation page as plain markdown

Example requests

# What exists, and where
curl -s https://tokenjam.dev/api/v1/index.json

# Every published post, newest first
curl -s https://tokenjam.dev/api/v1/posts.json

# One post, with its full markdown body
curl -s https://tokenjam.dev/api/v1/posts/2026-08-05-ai-budget-overruns-forecasting-agent-spend.json

# The docs tree, with section and ordering
curl -s https://tokenjam.dev/api/v1/docs.json

# One analyzer, with mechanism, confidence tiers, and citations
curl -s https://tokenjam.dev/api/v1/products/downsize.json

# The same doc as raw markdown instead of JSON
curl -s https://tokenjam.dev/docs/quickstart.md

Response shape

Collections use a list envelope and are returned in full; there is no pagination. Every item carries three links so you can move between representations without guessing at URLs: url for the HTML page, markdown_url for the markdown, and api_url for the JSON.

{
  "object": "list",
  "resource": "doc",
  "count": 34,
  "data": [
    {
      "object": "doc",
      "id": "quickstart",
      "title": "Quickstart",
      "description": "Peek in 15 seconds with no install…",
      "section": "getting-started",
      "order": 2,
      "url": "https://tokenjam.dev/docs/quickstart",
      "markdown_url": "https://tokenjam.dev/docs/quickstart.md",
      "api_url": "https://tokenjam.dev/api/v1/docs/quickstart.json",
      "updated_at": null
    }
  ]
}

Errors

Errors follow RFC 9457 problem details, served as application/problem+json. Branch on code; title and detail are for humans reading a log. Every operation documents the same set: 404, 405, 406, 429, 500.

{
  "type": "https://tokenjam.dev/errors/not-found",
  "title": "Resource not found",
  "status": 404,
  "detail": "No such resource: /api/v1/posts/nope.json",
  "instance": "/api/v1/posts/nope.json",
  "code": "not_found",
  "hint": "List valid identifiers at https://tokenjam.dev/api/v1/posts.json",
  "documentation_url": "https://tokenjam.dev/api#errors"
}

Served by the TokenJam Node front door. The static CDN deployment returns the same 404 status with the markdown 404 page instead of a problem document; both are documented in the OpenAPI spec.

Versioning and deprecation

The version lives in the path, and v1 is current. Breaking changes ship as a new version segment (/api/v2/), never in place. Within a version, fields may be added but existing fields are not removed, renamed, or retyped.

A deprecation is announced four ways at once:

A deprecated endpoint keeps responding for at least 90 days after the Deprecation header first appears. The full policy is at /deprecation, machine-readable as x-api-lifecycle in the OpenAPI document and lifecycle in the discovery document. What is deprecated right now is a single fetch: /api/v1/deprecations.json, currently an empty list.

This is not the TokenJam local API

The TokenJam CLI runs its own REST API on http://127.0.0.1:7391 when you run tj serve. That one reads your private telemetry, its read routes are unauthenticated until you enable [api.auth] in your config, and it publishes its own OpenAPI document at /api/v1/openapi.json on the local host. See Export & integrate for it. The API on this page only serves public website content.

Related resources

Support

Questions about the API go to support@tokenjam.dev. If an endpoint returns something the spec does not describe, that is a bug worth filing.