Ask your files from code over the API, or from an agent over MCP, with the key the demo gives you. The samples on this page name this site, so they work as you copy them.
The API host
https://api.groundwork.computer serves the API alone: web fetch and search, projects and keys, with /openapi.json and /llms.txt. The same calls also work on this site.
An id.orgsoft.org key, om_sk_…, opens all of it. Each call is charged to its account, from the Greenfield Pro allowance first and then purchased credit, and the reply says what it cost. Call it from your server: requests from a browser page are refused.
curl -X POST https://api.groundwork.computer/v1/web/fetch \
-H "Authorization: Bearer $OM_KEY" -H "content-type: application/json" \
-d '{"url": "https://example.com"}'
curl -X POST https://api.groundwork.computer/v1/web/search \
-H "Authorization: Bearer $OM_KEY" -H "content-type: application/json" \
-d '{"query": "retrieval evals", "limit": 5}'| Endpoint | Body | Returns |
|---|---|---|
POST /v1/web/fetch |
{ "url" } |
url, title, text, and meta.charge_usd |
POST /v1/web/search |
{ "query", "limit" } |
results, each with title, url and snippet |
POST /v1/projects |
{ "slug", "name" } |
The new project |
POST /v1/keys |
{ "project", "scopes" } |
A project key, shown once |
POST /v1/projects/{project}/add |
{ "text" }, { "url" } or { "file", "name" } |
The file added |
POST /v1/projects/{project}/search |
{ "query", "k" } |
passages, best first |
POST /v1/projects/{project}/ask |
{ "prompt" } |
answer with [^s1] markers, and sources |
The id key works as its account's organization key, so the project calls below take it in place of gwo_….
Projects
An app with clients of its own uses projects. Each project is isolated: its own files, index and build, and nothing in it is read by another project. Make one for each client.
An organization key, gwo_…, makes projects and keys. It comes from us, is shown once, and belongs on your server. A project key, gwp_…, opens one project, to read (search and ask), write (add and build) or both.
curl -X POST https://<demo>/v1/projects \
-H "Authorization: Bearer $GW_ORG_KEY" -H "content-type: application/json" \
-d '{"slug": "halvorsen-riley"}'
curl -X POST https://<demo>/v1/keys \
-H "Authorization: Bearer $GW_ORG_KEY" -H "content-type: application/json" \
-d '{"project": "halvorsen-riley", "scopes": ["read", "write"]}'Add text or files, build, then ask:
curl -X POST https://<demo>/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…"}'
curl -X POST https://<demo>/v1/projects/halvorsen-riley/build -H "Authorization: Bearer $GW_KEY"
curl -X POST https://<demo>/v1/projects/halvorsen-riley/ask \
-H "Authorization: Bearer $GW_KEY" -H "content-type: application/json" \
-d '{"prompt": "What are Riley'"'"'s growth edges in the meetings?", "format": "json"}'ask takes a prompt, and optionally instructions for how the answer reads, messages for earlier turns, a mode of chat, agent or auto, and a format of json or csv with a schema or columns. Nothing is stored between calls: your app keeps the conversation.
To rotate a key, make a new one, switch to it, then revoke the old one with DELETE /v1/keys/{id}.
Try it with a session
Start a session from code. It returns a key, shown once:
curl -X POST https://<demo>/v1/sessions
export GW_KEY=gwd_…Or add files at /demo/start, let them build, and choose Make a key in the Use step.
The key opens only that session's files, and stops working when the session is deleted, after three idle hours. A new key from the page replaces the old one. Every call sends it as Authorization: Bearer $GW_KEY. Keep it in that environment variable rather than in code or a chat.
Ask
Ask from code with the API, or add the MCP server to an agent.
Groundwork