Reference

REST API

HTTP endpoints exposed by gno serve for search, documents, graph data, models, jobs, and workspace automation.

The REST API is the HTTP version of the local GNO engine. Start it with gno serve, then call /api/* from curl, scripts, desktop launchers, internal dashboards, or small apps. It is best when you want automation without embedding the SDK or installing an MCP client.

What this is

Launch the server

gno serve # default port 3000
gno serve --port 8080
gno serve --detach # browser workspace + API in background

Read endpoints

Search endpoints

curl -X POST localhost:3000/api/search -d '{"q":"exact term"}'
curl -X POST localhost:3000/api/vsearch -d '{"q":"concept"}'
curl -X POST localhost:3000/api/query -d '{"q":"research question"}'
curl -X POST localhost:3000/api/ask -d '{"q":"what changed?"}'

Search bodies mirror the CLI: collection, limit, since, until, category, author, intent, exclude, tags_any, tags_all, and mode-specific controls such as noExpand, noRerank, candidateLimit, and queryModes.

curl localhost:3000/api/query \
  -H 'content-type: application/json' \
  -d '{
    "q": "authentication",
    "collection": "notes",
    "limit": 20,
    "tags_any": ["security"]
  }'

Write and job endpoints

Security model

export GNO_API_TOKEN="secret"
gno serve
curl -H "X-GNO-Token: secret" localhost:3000/api/status