API reference
Make a project for each of your clients, add their files, and ask with citations.
Authentication
Every request sends a key as a bearer token. An organization key, gwo_…, makes projects and keys. A project key, gwp_…, opens one project. Keep both on your server.
To try it without an organization, POST /v1/sessions returns a session key that lasts three idle hours. The get started page makes one too.
https://groundwork.computer
# Header on every request
Authorization: Bearer $GW_KEY
# Or, to try it, start a session
curl -X POST https://groundwork.computer/v1/sessionsErrors
Errors use HTTP status codes and a JSON body with a readable error. An answer with no supporting evidence is not an error: it returns 200 and says what is missing.
| 400 | The body is missing or not JSON |
| 401 | No key, or a key that opens nothing |
| 403 | The key cannot do this, such as a read key adding a file |
| 404 | No such endpoint |
| 409 | The files are not built yet |
| 413 | No room left for this file or source |
| 422 | The link or file could not be read |
| 429 | Over a limit for now, such as the sessions an address may start in an hour |
| 500 | The answer model failed; try again |
| 503 | Every session slot is taken; try again later |
{
"error": "Send a question"
}Projects and keys
An organization key makes a project for each of your clients, and keys that open one project each. Guide
Make a project
POST /v1/projects
Make an empty project. Each project is isolated: its own files, index and build, and nothing it holds is read by another project. Make one for each of your clients. Takes the organization key.
Parameters
slugstringRequirednamestring
curl -X POST "https://groundwork.computer/v1/projects" \
-H "Authorization: Bearer $GW_ORG_KEY" \
-H "content-type: application/json" \
-d '{"slug":"halvorsen-riley","name":"Riley Moreno"}'{
"slug": "halvorsen-riley",
"name": "Riley Moreno",
"createdAt": "2026-11-19T14:02:11.000Z"
}List projects
GET /v1/projects
The organization's projects. Takes the organization key.
curl "https://groundwork.computer/v1/projects" \
-H "Authorization: Bearer $GW_ORG_KEY"{
"projects": [
{
"slug": "halvorsen-riley",
"name": "Riley Moreno",
"createdAt": "2026-11-19T14:02:11.000Z"
}
]
}Delete a project
DELETE /v1/projects/{project}
Delete a project with all its files and its index, and revoke every key that opened it. Takes the organization key.
Parameters
projectstringRequiredThe project's slug, such as
halvorsen-riley
curl -X DELETE "https://groundwork.computer/v1/projects/halvorsen-riley" \
-H "Authorization: Bearer $GW_ORG_KEY"{
"deleted": "halvorsen-riley"
}Make a key
POST /v1/keys
Make a key. With project, it opens only that project, for read (search and ask), write (add and build) or both. Without one, it is another organization key. The key is in the reply once and never stored; keep it on your server. To rotate, make a new key, switch to it, then revoke the old one.
Parameters
projectstringThe project's slug.
scopesstring[]labelstringexpiresInDaysinteger
curl -X POST "https://groundwork.computer/v1/keys" \
-H "Authorization: Bearer $GW_ORG_KEY" \
-H "content-type: application/json" \
-d '{"project":"halvorsen-riley","scopes":["read","write"],"label":"Coaching app"}'{
"key": "gwp_…",
"record": {
"id": "k_1a2b3c4d",
"kind": "project",
"project": "halvorsen-riley",
"scopes": [
"read"
],
"label": "Riley's app",
"start": "gwp_9f3e",
"createdAt": "2026-11-19T14:03:00.000Z"
}
}List keys
GET /v1/keys
Every key the organization has made, revoked ones included, without their secrets. Takes the organization key.
curl "https://groundwork.computer/v1/keys" \
-H "Authorization: Bearer $GW_ORG_KEY"{
"keys": [
{
"id": "k_1a2b3c4d",
"kind": "project",
"project": "halvorsen-riley",
"scopes": [
"read"
],
"start": "gwp_9f3e",
"createdAt": "2026-11-19T14:03:00.000Z"
}
]
}Revoke a key
DELETE /v1/keys/{id}
Revoke a key. It stops working at once. Takes the organization key.
Parameters
idstringRequiredThe key's id, such as
k_1a2b3c4d
curl -X DELETE "https://groundwork.computer/v1/keys/k_1a2b3c4d" \
-H "Authorization: Bearer $GW_ORG_KEY"{
"id": "k_1a2b3c4d",
"revokedAt": "2026-11-19T15:00:00.000Z"
}Project files
Add text and files, then build. Guide
Add text, a link or a file
POST /v1/projects/{project}/add
Add one of: plain text, such as notes or a transcript, kept as a Markdown file named for its title; a public web page by its url, read as text; or a small file as base64 file with its name. Tags let search and ask read some files only. Build the project once you have added everything.
Parameters
projectstringRequiredThe project's slug, such as
halvorsen-rileytextstringurlstringfilestringThe file's bytes, up to about 3.5 MB. Larger files go to PUT …/files.
namestringThe file's name, with its extension, when sending
file.titlestringtagsstring[]
curl -X POST "https://groundwork.computer/v1/projects/halvorsen-riley/add" \
-H "Authorization: Bearer $GW_KEY" \
-H "content-type: application/json" \
-d '{"title":"1:1 with Dana","text":"Riley Moreno: Before you start, here's where the Tacoma numbers are…"}'{
"id": "f1a2b3c4d",
"name": "1 1 with Dana.md",
"bytes": 2311,
"addedAt": "2026-11-19T14:05:00.000Z",
"tags": [
"meetings"
]
}Add a file
PUT /v1/projects/{project}/files
Add one file up to 100 MB, its bytes as the body: a PDF, Word, PowerPoint, Excel, CSV, Markdown, text or captions file. Build the project once you have added everything.
Parameters
projectstringRequiredThe project's slug, such as
halvorsen-rileynamestringRequiredThe file's name, with its extension
tagsstringRequiredTags, separated by commas
bodybytesRequiredThe file's bytes.
curl -X PUT "https://groundwork.computer/v1/projects/halvorsen-riley/files?name=handbook.pdf" \
-H "Authorization: Bearer $GW_KEY" \
--data-binary @handbook.pdf{
"id": "f1a2b3c4d",
"name": "1-1-dana.vtt",
"bytes": 48211,
"addedAt": "2026-11-19T14:05:00.000Z"
}List files
GET /v1/projects/{project}/files
The project's files.
Parameters
projectstringRequiredThe project's slug, such as
halvorsen-riley
curl "https://groundwork.computer/v1/projects/halvorsen-riley/files" \
-H "Authorization: Bearer $GW_KEY"{
"files": [
{
"id": "f1a2b3c4d",
"name": "1-1-dana.vtt",
"bytes": 48211,
"addedAt": "2026-11-19T14:05:00.000Z"
}
]
}Remove a file
DELETE /v1/projects/{project}/files/{id}
Remove a file, and its passages from the index.
Parameters
projectstringRequiredThe project's slug, such as
halvorsen-rileyidstringRequiredThe file's id
curl -X DELETE "https://groundwork.computer/v1/projects/halvorsen-riley/files/f1a2b3c4d" \
-H "Authorization: Bearer $GW_KEY"{
"deleted": "f1a2b3c4d"
}Build
POST /v1/projects/{project}/build
Build what was added, so search and ask read it. A build already queued or running is the one you get.
Parameters
projectstringRequiredThe project's slug, such as
halvorsen-riley
curl -X POST "https://groundwork.computer/v1/projects/halvorsen-riley/build" \
-H "Authorization: Bearer $GW_KEY"{
"state": "queued"
}Build status
GET /v1/projects/{project}/build
Where the build stands: none, queued, run, done or err, with its steps and files.
Parameters
projectstringRequiredThe project's slug, such as
halvorsen-riley
curl "https://groundwork.computer/v1/projects/halvorsen-riley/build" \
-H "Authorization: Bearer $GW_KEY"{
"state": "done",
"steps": [
{
"id": "chunk",
"label": "Passages",
"state": "ok",
"done": 8,
"total": 8,
"detail": "212 passages"
}
],
"files": [
{
"name": "1-1-dana.vtt",
"state": "ok"
}
]
}Project ask
Ask as a chatbot or an agent, in any shape, or search. Guide
Ask
POST /v1/projects/{project}/ask
A prompt answered from the project's files, citing each claim with [^s1] markers. mode is chat (one search, then an answer), agent (plans, searches, queries tables and draws charts) or auto, which picks agent only for counting or charting over tables. Search reads the prompt alone, so put the words that find the evidence there, and how the answer should read in instructions. Send earlier turns as messages; nothing is stored. With format of json or csv, the answer also comes back in that shape as data, matching schema or columns.
Parameters
projectstringRequiredThe project's slug, such as
halvorsen-rileypromptstringRequiredinstructionsstringHow the answer should read: voice, length, form. It never changes what the answer may claim.
modeauto | chat | agentmessagesobject[]roleuser | assistantRequiredcontentstringRequired
formatmarkdown | json | csvschemaobjectA JSON Schema the
jsonresult must match.columnsstring[]The keys of each row, for
jsonwithout a schema or forcsv.tagsstring[]Read only files with one of these tags. Asks with tags run in chat mode.
curl -X POST "https://groundwork.computer/v1/projects/halvorsen-riley/ask" \
-H "Authorization: Bearer $GW_KEY" \
-H "content-type: application/json" \
-d '{"prompt":"What are Riley's growth edges, and where do they show up in the meetings?","instructions":"A coach's voice. Three bullets.","format":"json"}'{
"answer": "Riley tends to give the update before asking what Dana needs. [^s1]",
"sources": [
{
"id": "s1",
"title": "1:1 with Dana",
"label": "1:1 with Dana, 04:12",
"file": "1-1-dana.vtt",
"excerpt": "Riley Moreno: Before you start, here's where the Tacoma numbers are…",
"start": 252
}
],
"mode": "chat",
"run": "4f0c1a2b-…",
"data": [
{
"edge": "Gives the update before asking what Dana needs",
"sources": [
"s1"
]
}
]
}Search
POST /v1/projects/{project}/search
The passages that best match a query, best first. No model call.
Parameters
projectstringRequiredThe project's slug, such as
halvorsen-rileyquerystringRequiredWhat to look for.
kintegertagsstring[]Read only files with one of these tags.
curl -X POST "https://groundwork.computer/v1/projects/halvorsen-riley/search" \
-H "Authorization: Bearer $GW_KEY" \
-H "content-type: application/json" \
-d '{"query":"Tacoma shipments","k":5}'{
"passages": [
{
"id": "f1a2b3c4d#3",
"title": "1:1 with Dana",
"text": "Riley Moreno: Before you start…",
"score": 0.82,
"start": 252
}
]
}Sessions
Start a session, then follow its build. Guide
Start a session
POST /v1/sessions
Start an empty session and get its key, with no page and no files yet. Then add files and sources, wait for GET /v1/build, and ask. The key is shown once. A session holds the same files, bytes and answers as one made on the get started page, is deleted after three idle hours, and each client address may start a few an hour.
curl -X POST "https://groundwork.computer/v1/sessions"{
"key": "gwd_…",
"expiresAt": "2026-11-19T09:00:00.000Z",
"limits": {
"files": 60,
"bytes": 50000000,
"answers": 30
}
}Build status
GET /v1/build
Where the session's build stands: none before any file, queued or run while it builds, then done or err. built is true once there is an index to ask, which can be while a newer build runs. Adding a file or source starts a build on its own.
curl "https://groundwork.computer/v1/build" \
-H "Authorization: Bearer $GW_KEY"{
"state": "done",
"built": true,
"steps": [
{
"id": "chunk",
"label": "Split into passages",
"state": "done",
"detail": "38 passages"
}
],
"files": [
{
"name": "ops-review.vtt",
"state": "ok"
}
]
}Add
Files and sources. Each one starts a build. Guide
Add a file
PUT /v1/files
Add one file, its bytes as the body: a PDF, Word, PowerPoint, Excel, CSV, Markdown, text or captions file. The files build again on their own.
Parameters
namestringRequiredThe file's name, with its extension
bodybytesRequiredThe file's bytes.
curl -X PUT "https://groundwork.computer/v1/files?name=handbook.pdf" \
-H "Authorization: Bearer $GW_KEY" \
--data-binary @handbook.pdf{
"status": "ok",
"added": 1,
"building": true
}Add a source
POST /v1/sources
Add a web page, a YouTube video, a Google Drive file shared by link, or a service by name: notion, slack or drive. A service you haven't signed in to answers wait with a signIn link; open it, then send the same call again. The files build again on their own.
Parameters
fromstringRequiredA link, or a service's name.
curl -X POST "https://groundwork.computer/v1/sources" \
-H "Authorization: Bearer $GW_KEY" \
-H "content-type: application/json" \
-d '{"from":"https://example.com/pricing"}'{
"status": "ok",
"added": 1,
"building": true
}Ask
A question in, a cited answer out, or the passages alone. The agent also queries tables and draws charts. Guide
Ask with citations
POST /v1/ask
Answer a question from your files. The answer is Markdown with [^s1] markers, each naming one of sources by its id. Each source gives the uploaded file it came from, a short excerpt, and its page or start in seconds. instructions shape the answer's form and voice and never change what counts as evidence. thread holds the earlier turns of a conversation, so a follow-up such as "and then?" is read in context; reading it counts as one more answer.
Parameters
questionstringRequiredThe question, in plain words.
instructionsstringHow to answer: a role to play, a length, a format. The evidence rules still apply.
threadobject[]Earlier turns, oldest first. Only the last four are read, each answer cut to 600 characters.
questionstringRequiredanswerstringRequired
curl -X POST "https://groundwork.computer/v1/ask" \
-H "Authorization: Bearer $GW_KEY" \
-H "content-type: application/json" \
-d '{"question":"Who signs off large repairs?"}'{
"answer": "Repairs over 500 dollars need the shop manager's sign-off. [^s1]",
"sources": [
{
"id": "s1",
"title": "Larkspur staff handbook",
"label": "Larkspur staff handbook, page 3",
"file": "handbook.docx",
"excerpt": "Repairs over 500 dollars need the shop manager's sign-off…",
"page": 3
}
],
"run": "4f0c1a2b-…"
}Search passages
POST /v1/search
The passages that best match a query, best first. No model call, so it costs nothing and keeps working after the key's answers are used up.
Parameters
querystringRequiredWhat to look for.
kintegerHow many passages.
curl -X POST "https://groundwork.computer/v1/search" \
-H "Authorization: Bearer $GW_KEY" \
-H "content-type: application/json" \
-d '{"query":"repair sign-off","k":5}'{
"passages": [
{
"id": "docs/handbook#3",
"title": "Larkspur staff handbook.docx",
"text": "Repairs over 500 dollars…",
"score": 0.82,
"page": 3
}
]
}Run an agent
POST /v1/agent
Run Groundwork's agent over your files as the product instructions describe: it searches, queries tables and draws charts, then answers with citations. Charts come back as data in figures, and diagrams as SVG.
Parameters
messagestringRequiredWhat the user asked.
instructionsstringYour product's system prompt: who it is for and how it answers.
curl -X POST "https://groundwork.computer/v1/agent" \
-H "Authorization: Bearer $GW_KEY" \
-H "content-type: application/json" \
-d '{"message":"Which repairs went over budget last quarter?","instructions":"You help a property manager. Answer in two short paragraphs."}'{
"answer": "Repairs over 500 dollars need the shop manager's sign-off. [^s1]",
"sources": [
{
"id": "s1",
"title": "Larkspur staff handbook",
"label": "Larkspur staff handbook, page 3",
"file": "handbook.docx",
"excerpt": "Repairs over 500 dollars need the shop manager's sign-off…",
"page": 3
}
],
"run": "4f0c1a2b-…",
"figures": [
{
"type": "chart",
"title": "Orders by month",
"chart": {
"kind": "bar",
"title": "Orders by month",
"labels": [
"Jul",
"Aug",
"Sep"
],
"series": [
{
"name": "Orders",
"values": [
21,
26,
25
]
}
]
}
}
]
}MCP
The same session as tools for an agent. Guide
MCP
POST /mcp
Model Context Protocol over streamable HTTP, one JSON-RPC message at a time, with the ask, search and add tools.
Parameters
jsonrpcanyRequiredidanymethodstringRequiredparamsobject
curl -X POST "https://groundwork.computer/mcp" \
-H "Authorization: Bearer $GW_KEY" \
-H "content-type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'{
"jsonrpc": "2.0",
"id": 1,
"result": {
"tools": [
{
"name": "ask"
},
{
"name": "search"
}
]
}
}
Groundwork