docspack.dev
The machine-readable half of docspack.dev.
Every route here is a static file served from the edge: no credential, no rate limit, no state. They exist because an agent reading this site should not have to scrape HTML for the specification, the manual or the measurements behind the numbers on the landing page.
This document is itself served at /openapi.json, and it is what renders the page you are reading — the same source produces a reference a person reads and a digest an agent is answered from.
- Base URL
https://docspack.dev- Authentication
- None. Every route is a static file, so there is no credential to send and no rate limit to hit.
- Operations
- 14
For an agent: /api.lapis — the whole API in the notation docspack answers with, about a tenth of the tokens. One endpoint: /api/<operationId>.md . The document itself: /openapi.json.
Every route here is a public GET. For what the same page does with a bearer token, a request
body and a DELETE, see the worked example.
agents
Routes written for a model rather than a browser.
GET/llms.txt
The site's table of contents for an agent.
An llms.txt index: one line per document, each with a link and a one-line description. Start here, then fetch what the question needs.
Authentication
No credential required.
Response
Request
cURL
curl -X GET 'https://docspack.dev/llms.txt'JavaScript
const response = await fetch("https://docspack.dev/llms.txt", {
method: "GET",
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();Python
import requests
response = requests.get(
"https://docspack.dev/llms.txt",
)
response.raise_for_status()
data = response.json()Go
req, err := http.NewRequest("GET", "https://docspack.dev/llms.txt", nil)
if err != nil {
return err
}
resp, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
defer resp.Body.Close()Try it
GET/llms-full.txt
Every document on the site, concatenated.
The whole corpus in one response. Useful for a one-off ingest; for a question about one thing, /llms.txt and one page cost far less.
Authentication
No credential required.
Response
Request
cURL
curl -X GET 'https://docspack.dev/llms-full.txt'JavaScript
const response = await fetch("https://docspack.dev/llms-full.txt", {
method: "GET",
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();Python
import requests
response = requests.get(
"https://docspack.dev/llms-full.txt",
)
response.raise_for_status()
data = response.json()Go
req, err := http.NewRequest("GET", "https://docspack.dev/llms-full.txt", nil)
if err != nil {
return err
}
resp, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
defer resp.Body.Close()Try it
GET/ai-rules.md
The block `docspack agent install` writes, as Markdown.
Authentication
No credential required.
Response
Request
cURL
curl -X GET 'https://docspack.dev/ai-rules.md'JavaScript
const response = await fetch("https://docspack.dev/ai-rules.md", {
method: "GET",
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();Python
import requests
response = requests.get(
"https://docspack.dev/ai-rules.md",
)
response.raise_for_status()
data = response.json()Go
req, err := http.NewRequest("GET", "https://docspack.dev/ai-rules.md", nil)
if err != nil {
return err
}
resp, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
defer resp.Body.Close()Try it
GET/api.lapis
This API in LAPIS notation, for a model.
The same document as /openapi.json, rendered in the notation docspack answers with. Around a tenth of the tokens, and the one artifact here that grows with the size of the API — for a question about a single endpoint, fetch that endpoint’s digest instead.
Authentication
No credential required.
Response
Request
cURL
curl -X GET 'https://docspack.dev/api.lapis'JavaScript
const response = await fetch("https://docspack.dev/api.lapis", {
method: "GET",
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();Python
import requests
response = requests.get(
"https://docspack.dev/api.lapis",
)
response.raise_for_status()
data = response.json()Go
req, err := http.NewRequest("GET", "https://docspack.dev/api.lapis", nil)
if err != nil {
return err
}
resp, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
defer resp.Body.Close()Try it
GET/api/{operationId}.md
Everything needed to call one endpoint, and nothing else.
The base URL, the credential, the inputs with their types, the response, the failures, the types they reference, and a runnable curl call — for one operation. This is the densest form of the question “how do I make this request”.
Authentication
No credential required.
Path parameters
operationIdstrrequiredAn operation's id, as listed in /api.lapis.
Response
Errors
Request
cURL
curl -X GET 'https://docspack.dev/api/getDocPage.md'JavaScript
const response = await fetch("https://docspack.dev/api/getDocPage.md", {
method: "GET",
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();Python
import requests
response = requests.get(
"https://docspack.dev/api/getDocPage.md",
)
response.raise_for_status()
data = response.json()Go
req, err := http.NewRequest("GET", "https://docspack.dev/api/getDocPage.md", nil)
if err != nil {
return err
}
resp, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
defer resp.Body.Close()Try it
manual
The documentation, as its own source.
GET/docs/{slug}.md
One page of the manual, as the Markdown it already is.
The same bytes the page at /docs/{slug} is rendered from, with no HTML shell. A ::: presentation block is replaced by what it wraps, so the page a reader sees and the text an agent is given describe the same behaviour.
Authentication
No credential required.
Path parameters
slugstrrequiredA page's slug, as listed in /llms.txt.
Response
Errors
Request
cURL
curl -X GET 'https://docspack.dev/docs/searching.md'JavaScript
const response = await fetch("https://docspack.dev/docs/searching.md", {
method: "GET",
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();Python
import requests
response = requests.get(
"https://docspack.dev/docs/searching.md",
)
response.raise_for_status()
data = response.json()Go
req, err := http.NewRequest("GET", "https://docspack.dev/docs/searching.md", nil)
if err != nil {
return err
}
resp, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
defer resp.Body.Close()Try it
GET/docs/search.json
The manual split into searchable sections.
The same sections docspack build would cut, so a section found here is the chunk a model would have been given. Ranking is deliberately not included: emitting a corpus and ranking one are different jobs.
Authentication
No credential required.
Response
versionintrequiredBumped when the record shape changes in a way a reader would notice.
records[SearchRecord]requiredslugstrrequiredThe page's slug, for the URL.
titlestrrequiredThe page's title.
headingstrrequiredThe section's heading. Equal to the title for the text above the first `##`.
anchorstrrequiredFragment on the page. Empty for the lead section.
textstrrequiredThe section's prose, with Markdown syntax reduced to the words in it.
{
"version": 0,
"records": [
{
"slug": "string",
"title": "string",
"heading": "string",
"anchor": "string",
"text": "string"
}
]
}Request
cURL
curl -X GET 'https://docspack.dev/docs/search.json'JavaScript
const response = await fetch("https://docspack.dev/docs/search.json", {
method: "GET",
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();Python
import requests
response = requests.get(
"https://docspack.dev/docs/search.json",
)
response.raise_for_status()
data = response.json()Go
req, err := http.NewRequest("GET", "https://docspack.dev/docs/search.json", nil)
if err != nil {
return err
}
resp, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
defer resp.Body.Close()Try it
measurements
The runs behind every number on the site.
GET/benchmarks.json
What a query costs, measured.
The object bench/results.json holds, served verbatim: every percentile and the machine it was taken on. A benchmark a reader cannot inspect is a claim.
Authentication
No credential required.
Response
latency{coldAsk?: Timing, nodeBaseline?: Timing}requiredCold-start timings, split so that Node's own startup is not counted as docspack's work.
coldAskTimingnintrequiredHow many runs.
p50floatrequiredp95floatrequiredminfloatrequiredmaxfloatrequired
nodeBaselineTimingnintrequiredHow many runs.
p50floatrequiredp95floatrequiredminfloatrequiredmaxfloatrequired
context{corpusTokens?: int, queries?: [{query?: str, tokens?: int}]}requiredWhat an answer costs against the size of the corpus it came from.
corpusTokensintqueries[{query?: str, tokens?: int}]querystrtokensint
network{estimatedTokens?: int}What fetching the same documentation over the web would have cost.
estimatedTokensint
{
"latency": {},
"context": {}
}Request
cURL
curl -X GET 'https://docspack.dev/benchmarks.json'JavaScript
const response = await fetch("https://docspack.dev/benchmarks.json", {
method: "GET",
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();Python
import requests
response = requests.get(
"https://docspack.dev/benchmarks.json",
)
response.raise_for_status()
data = response.json()Go
req, err := http.NewRequest("GET", "https://docspack.dev/benchmarks.json", nil)
if err != nil {
return err
}
resp, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
defer resp.Body.Close()Try it
GET/coverage.json
How much of a library its own documentation covers.
bench/coverage.json, including the sample of exported names each library documents nowhere. Produced by comparing a library’s published documentation against the same library as installed.
Authentication
No credential required.
Response
targets[LibraryCoverage]requiredlibrarystrrequiredversionstrrequiredcoverage{names?: int, documented?: int, undocumented?: int, onDisk?: int, marked?: int}requirednamesintEvery name an entry point in the `exports` map publishes.
documentedintHow many of those the library's own documentation mentions anywhere.
undocumentedintonDiskintHow many undocumented names the installed build declares.
markedintThe same count, dropping names the library marks internal by convention.
{
"targets": [
{
"library": "string",
"version": "string",
"coverage": {}
}
]
}Request
cURL
curl -X GET 'https://docspack.dev/coverage.json'JavaScript
const response = await fetch("https://docspack.dev/coverage.json", {
method: "GET",
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();Python
import requests
response = requests.get(
"https://docspack.dev/coverage.json",
)
response.raise_for_status()
data = response.json()Go
req, err := http.NewRequest("GET", "https://docspack.dev/coverage.json", nil)
if err != nil {
return err
}
resp, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
defer resp.Body.Close()Try it
specification
The docs-package format itself.
GET/schema/v1.json
The JSON Schema for a docs package's manifest.
The URL docspack build writes into every manifest as $schema, and the one a validator fetches. It resolves at exactly this path because the $id inside the document says so.
Authentication
No credential required.
Response
{}Request
cURL
curl -X GET 'https://docspack.dev/schema/v1.json'JavaScript
const response = await fetch("https://docspack.dev/schema/v1.json", {
method: "GET",
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();Python
import requests
response = requests.get(
"https://docspack.dev/schema/v1.json",
)
response.raise_for_status()
data = response.json()Go
req, err := http.NewRequest("GET", "https://docspack.dev/schema/v1.json", nil)
if err != nil {
return err
}
resp, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
defer resp.Body.Close()Try it
GET/spec.md
The docs-package specification, as Markdown.
The chunk-id grammar, the path-escape rule and what every manifest field means.
Authentication
No credential required.
Response
Request
cURL
curl -X GET 'https://docspack.dev/spec.md'JavaScript
const response = await fetch("https://docspack.dev/spec.md", {
method: "GET",
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();Python
import requests
response = requests.get(
"https://docspack.dev/spec.md",
)
response.raise_for_status()
data = response.json()Go
req, err := http.NewRequest("GET", "https://docspack.dev/spec.md", nil)
if err != nil {
return err
}
resp, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
defer resp.Body.Close()Try it
GET/openapi.json
This document.
The OpenAPI 3.1 description of these routes, which is what the reference page and the per-operation digests are generated from.
Authentication
No credential required.
Response
{}Request
cURL
curl -X GET 'https://docspack.dev/openapi.json'JavaScript
const response = await fetch("https://docspack.dev/openapi.json", {
method: "GET",
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();Python
import requests
response = requests.get(
"https://docspack.dev/openapi.json",
)
response.raise_for_status()
data = response.json()Go
req, err := http.NewRequest("GET", "https://docspack.dev/openapi.json", nil)
if err != nil {
return err
}
resp, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
defer resp.Body.Close()Try it
example
A fictional API, served in both renderings so the two can be compared.
GET/api/example.json
The worked example's OpenAPI document.
A fictional invoicing API — bearer auth, request bodies, a DELETE, an error shape — kept so the reference at /api/example can demonstrate what this site’s own read-only API cannot. Point docspack build --openapi at this URL to see what it emits.
Authentication
No credential required.
Response
{}Request
cURL
curl -X GET 'https://docspack.dev/api/example.json'JavaScript
const response = await fetch("https://docspack.dev/api/example.json", {
method: "GET",
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();Python
import requests
response = requests.get(
"https://docspack.dev/api/example.json",
)
response.raise_for_status()
data = response.json()Go
req, err := http.NewRequest("GET", "https://docspack.dev/api/example.json", nil)
if err != nil {
return err
}
resp, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
defer resp.Body.Close()Try it
GET/api/example.lapis
The worked example in LAPIS.
The same document as /api/example.json, in the notation docspack answers with: every operation and every type in about a fifth of the tokens. The pair is here to be compared.
Authentication
No credential required.
Response
Request
cURL
curl -X GET 'https://docspack.dev/api/example.lapis'JavaScript
const response = await fetch("https://docspack.dev/api/example.lapis", {
method: "GET",
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const data = await response.json();Python
import requests
response = requests.get(
"https://docspack.dev/api/example.lapis",
)
response.raise_for_status()
data = response.json()Go
req, err := http.NewRequest("GET", "https://docspack.dev/api/example.lapis", nil)
if err != nil {
return err
}
resp, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
defer resp.Body.Close()Try it
Generated from openapi.json by @docspack/sheaf-react. The first endpoint below is GET /llms.txt.