Knowledge & Context Integration
Give your application reference material before it generates an answer. Use public sources for shared context. Use a Khizana collection for documents that you control.
Choose a source
| Need | API |
|---|---|
| Web pages and social content | Maktaba |
| News editions, headlines, and articles | Akhbar |
| Places, geographic features, and routes | Atlas |
| Search your own document collection | Khizana |
Public-source retrieval uses the documented endpoint for each source. This guide does not define a separate universal knowledge-base endpoint.
Ground an answer
- Search the appropriate source API with the user's query.
- Select the relevant results. Keep their source references.
- Add the selected text to your chat completion request as reference material.
- Ask the model to cite those references. Check citations before you show the answer.
Treat retrieved text as source material. Keep it separate from the instructions that control your application.
Private documents
Create a collection in Khizana. Read the Khizana API guide for search-key access, document formats, widgets, and assistant integration. A path that contains /api/public/knowledge/ still requires the collection's configured access checks. It does not make all collections public.
Access and usage
Read authentication and billing before integration. Reading this documentation does not require sign-in. Calling an API or opening a private workspace can require an account, API key, and available credits.