Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ const page = await vapi.docs.read("/agents/quickstart");
const answer = await vapi.docs.ask("How do agent spend caps work?");
```

The docs namespace returns plain objects: `docs.search` returns
`{ results: [{ title, url, excerpt }] }`, `docs.read` returns
`{ url, markdown }` with the page's Markdown, and `docs.ask` returns
`{ answer, sources }`. The examples above assign them without reading
fields, which is easy to misread as an empty result.

Lower-level code can import `searchDocs`, `readDocs` and `askDocs` directly
from `@vapi-network/core`. Documentation reads are restricted to the configured
docs origin, which defaults to `https://docs.vapinetwork.ai` and can be changed
Expand Down