Create Knowledge Base
POST
https://api.konpro.ai/v1/streaming/knowledge_base/createCreate a new knowledge base by specifying its name, an opening line, and a custom prompt. This knowledge base will be used to provide context and guidance for AI avatar conversations.
Request History
Log in to see full request history
| TIME | STATUS | USER AGENT |
|---|---|---|
| Make a request to see history. | ||
0 Requests This Month
cURL Request
shell
curl --request POST \
--url https://api.konpro.ai/v1/streaming/knowledge_base/create \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-api-key: <your-api-key>' \
--data '{
"name": "SupportKnowledgeBase",
"opening": "Welcome! How may I assist you today?",
"prompt": "You are a knowledgeable assistant providing expert support."
}'Request Body Parameters
| Field | Type | Description |
|---|---|---|
| name | string | The name of the knowledge base |
| opening | string | Opening message or introduction text |
| prompt | string | Custom prompt to steer avatar responses |
Response
Response Structure
Returns success confirmation including the newly created knowledge base ID. Error details provided if creation fails.
Sample Successful Response
json
{
"knowledge_base_id": "kb_001",
"name": "SupportKnowledgeBase",
"status": "created",
"message": "Knowledge base created successfully"
}Notes
- Requires API authentication.
- Knowledge base names must be unique within your account.
- The opening message will be used as the initial greeting for avatar interactions.
- The prompt helps guide the avatar's responses and behavior.
- Refer to Error Responses for error information.
Example Usage
Shell
curl --request POST \
--url https://api.konpro.ai/v1/streaming/knowledge_base/create \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'x-api-key: <your-api-key>' \
--data '{
"name": "SupportKnowledgeBase",
"opening": "Welcome! How may I assist you today?",
"prompt": "You are a knowledgeable assistant providing expert support."
}'LANGUAGE
CREDENTIALS
HEADER
RESPONSE
Examples
Choose an example:
application/json
200 - Success
400 - Bad Request
LANGUAGE
CREDENTIALS
HEADER
RESPONSE
Examples
Choose an example:
application/json
200 - Success
400 - Bad Request