API & SDK
Synth's programmatic query surface is deterministic retrieval. It does not generate prose or require a model provider.
from synth import Synth
client = Synth(server="http://localhost:8000", api_key="synth_sk_...")
results = client.knowledge_search("authentication middleware", project_id="prj_...")
for result in results.results:
print(result.page.title, result.page.path, result.page.revision)
page = client.knowledge_page(
project_id="prj_...",
page=results.results[0].page.page_id,
expected_snapshot_id=results.snapshot_id,
expected_revision=results.results[0].page.revision,
)
print(page.content)
The versioned REST endpoints are:
POST /api/v1/projects/{project_id}/searchPOST /api/v1/projects/{project_id}/pages/readPOST /api/v1/projects/{project_id}/context
Pin expected_snapshot_id on search and expected_revision on exact reads when
one workflow must not mix knowledge revisions. Treat revision conflicts as a
signal to search again.
For coding agents, MCP exposes the same search-first contract through
synth_search and synth_get_page.