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.

Base URL
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/sessions

Errors

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.

400The body is missing or not JSON
401No key, or a key that opens nothing
403The key cannot do this, such as a read key adding a file
404No such endpoint
409The files are not built yet
413No room left for this file or source
422The link or file could not be read
429Over a limit for now, such as the sessions an address may start in an hour
500The answer model failed; try again
503Every session slot is taken; try again later
Error body
{
  "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

  • slugstringRequired

  • namestring

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"}'
Response
{
  "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"
Response
{
  "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

  • projectstringRequired

    The project's slug, such as halvorsen-riley

curl -X DELETE "https://groundwork.computer/v1/projects/halvorsen-riley" \
  -H "Authorization: Bearer $GW_ORG_KEY"
Response
{
  "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

  • projectstring

    The project's slug.

  • scopesstring[]

  • labelstring

  • expiresInDaysinteger

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"}'
Response
{
  "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"
Response
{
  "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

  • idstringRequired

    The key's id, such as k_1a2b3c4d

curl -X DELETE "https://groundwork.computer/v1/keys/k_1a2b3c4d" \
  -H "Authorization: Bearer $GW_ORG_KEY"
Response
{
  "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

  • projectstringRequired

    The project's slug, such as halvorsen-riley

  • textstring

  • urlstring

  • filestring

    The file's bytes, up to about 3.5 MB. Larger files go to PUT …/files.

  • namestring

    The file's name, with its extension, when sending file.

  • titlestring

  • tagsstring[]

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…"}'
Response
{
  "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

  • projectstringRequired

    The project's slug, such as halvorsen-riley

  • namestringRequired

    The file's name, with its extension

  • tagsstringRequired

    Tags, separated by commas

  • bodybytesRequired

    The 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
Response
{
  "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

  • projectstringRequired

    The project's slug, such as halvorsen-riley

curl "https://groundwork.computer/v1/projects/halvorsen-riley/files" \
  -H "Authorization: Bearer $GW_KEY"
Response
{
  "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

  • projectstringRequired

    The project's slug, such as halvorsen-riley

  • idstringRequired

    The file's id

curl -X DELETE "https://groundwork.computer/v1/projects/halvorsen-riley/files/f1a2b3c4d" \
  -H "Authorization: Bearer $GW_KEY"
Response
{
  "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

  • projectstringRequired

    The project's slug, such as halvorsen-riley

curl -X POST "https://groundwork.computer/v1/projects/halvorsen-riley/build" \
  -H "Authorization: Bearer $GW_KEY"
Response
{
  "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

  • projectstringRequired

    The project's slug, such as halvorsen-riley

curl "https://groundwork.computer/v1/projects/halvorsen-riley/build" \
  -H "Authorization: Bearer $GW_KEY"
Response
{
  "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

  • projectstringRequired

    The project's slug, such as halvorsen-riley

  • promptstringRequired

  • instructionsstring

    How the answer should read: voice, length, form. It never changes what the answer may claim.

  • modeauto | chat | agent

  • messagesobject[]

    • roleuser | assistantRequired

    • contentstringRequired

  • formatmarkdown | json | csv

  • schemaobject

    A JSON Schema the json result must match.

  • columnsstring[]

    The keys of each row, for json without a schema or for csv.

  • 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"}'
Response
{
  "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

  • projectstringRequired

    The project's slug, such as halvorsen-riley

  • querystringRequired

    What to look for.

  • kinteger

  • tagsstring[]

    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}'
Response
{
  "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"
Response
{
  "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"
Response
{
  "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

  • namestringRequired

    The file's name, with its extension

  • bodybytesRequired

    The file's bytes.

curl -X PUT "https://groundwork.computer/v1/files?name=handbook.pdf" \
  -H "Authorization: Bearer $GW_KEY" \
  --data-binary @handbook.pdf
Response
{
  "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

  • fromstringRequired

    A 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"}'
Response
{
  "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

  • questionstringRequired

    The question, in plain words.

  • instructionsstring

    How 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.

    • questionstringRequired

    • answerstringRequired

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?"}'
Response
{
  "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-…"
}

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

  • messagestringRequired

    What the user asked.

  • instructionsstring

    Your 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."}'
Response
{
  "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

  • jsonrpcanyRequired

  • idany

  • methodstringRequired

  • paramsobject

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"}'
Response
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "tools": [
      {
        "name": "ask"
      },
      {
        "name": "search"
      }
    ]
  }
}