Dify provides a complete set of Knowledge Base APIs that let you manage knowledge bases, documents, and chunks programmatically. This is useful for automating data synchronization or integrating knowledge base operations into CI/CD pipelines. API access is enabled by default when you create a knowledge base. To start making API calls, all you need is your API credentials: an endpoint and a key.Documentation Index
Fetch the complete documentation index at: https://docs.dify.ai/llms.txt
Use this file to discover all available pages before exploring further.
A single Knowledge Base API key has access to all visible knowledge bases under the same account. Handle your credentials carefully to avoid unintended data exposure.
Get Your API Endpoint and Key
Navigate to Knowledge in Dify. In the top-right corner, click Service API to open the API configuration panel. From here you can:- Get the Service API endpoint. This is the base URL for all Knowledge Base API requests.
- Click API Key to create new keys and manage existing ones.