Docs for your API
Syndai writes reference docs for the API in your project, checks every example against your running app, and keeps them current as your code changes.
If your project has an HTTP API, Syndai can write its reference docs for you. Every example in them is a real request, sent to your app while it runs. The response you see is the one your app sent back. An example that could not be checked says NOT CHECKED, so the docs never show a response nobody saw.
You turn this on per project, in the app or through the API.
What you get
Syndai writes these files into your repository, in the same pull request as the code they describe:
| File | What it holds |
|---|---|
docs/api.md | The whole reference on one page |
docs/api/<operationId>.md | One page per endpoint |
docs/openapi.json | Your OpenAPI spec, with the checked responses as examples |
docs/llms.txt | An index AI agents can read |
docs/receipts.json | The commit the docs were checked at, and which examples passed |
The files are yours. They stay in your repository if you stop using Syndai.
Your app needs an OpenAPI spec. If your project already uses Mintlify, Fern, MkDocs or Docusaurus, Syndai leaves your docs alone and keeps only the spec and examples fresh.
Turn it on
Open your project in the app and go to Docs. You have two switches:
- Keep docs up to date. Off by default. When it is on, every run that changes your API also rebuilds the docs. That adds time on the computer that runs your app, so those runs cost a few more credits. A run that touches only docs, tests or Markdown skips the rebuild and costs nothing extra.
- Publish docs. Off by default, because some APIs are internal. When it is on and your project has a site on Syndai, the docs go live at
<your site>/docs. They follow your site's privacy setting: a private site keeps its docs private.
If your repository has no docs yet, Generate docs now starts one run that writes them.
When your code changes outside Syndai
If you push to your repository yourself, the Docs page shows how many commits came after the docs were last checked. Refresh docs starts one run that brings them up to date. Nothing runs on its own and nothing is charged unless you tap it.
From the API
Read a project's docs status. Your key needs coding:policy:read.
curl -s https://api.syndai.ai/api/v1/external/coding/repos/<REPO_ID>/docs \
-H "Authorization: Bearer $SYNDAI_API_KEY"
The answer says whether docs are on and whether they are live. It gives the commit they were checked at and how many commits came after it. It counts the examples that passed, and gives the public address once the docs are live.
Change the switches. Your key needs coding:policy:write.
curl -s -X PUT https://api.syndai.ai/api/v1/external/coding/repos/<REPO_ID>/docs \
-H "Authorization: Bearer $SYNDAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"enabled": true, "published": true}'
AI agents can do the same through the MCP server's project_settings_set tool, with docs and docs_published. See MCP.
If publishing is off
Your site already serves its own /docs. Syndai keeps yours and does not publish over it. The Docs page tells you when this happens.