Documentation Index
Fetch the complete documentation index at: https://docs.zgi.cn/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
All API requests need to carry the API Key in the header:Base URL
| Environment | Base URL |
|---|---|
| Cloud SaaS | https://api.zgi.cn/v1 |
| Private deployment | http://YOUR_HOST:2678/v1 |
Core endpoint
-
POST /v1/chat/completions: Send conversation request, support knowledge base retrieval and streaming output -
GET /v1/models: Get the list of available models -
POST /v1/workflows/{workflow_id}/run: triggers the execution of the specified workflow -
POST /v1/knowledge-bases/{kb_id}/documents: Upload documents to the knowledge base -
POST /v1/knowledge-bases/{kb_id}/search: Query knowledge base search results
Dialog request example
Request parameters
| Parameters | Type | Required | Description |
|---|---|---|---|
model | string | required | Model ID to use |
messages | array | required | array of conversation messages |
knowledge_base_id | string | Optional | The associated knowledge base ID |
stream | boolean | Optional | Whether to enable streaming output |
temperature | float | optional | sampling temperature (0-2) |