Hoppa till innehåll

Importera innehåll från externa källor till Knowledge Base. Dessa endpoints bearbetar innehåll asynkront.

Importera innehåll från externa källor till Knowledge Base. Dessa endpoints bearbetar innehåll asynkront.

Skrapa en enskild webbsida eller en hel webbplats och importera innehållet.

Scope: write_all

POST https://app.quickchat.ai/v1/api/knowledge_base/import_external/website

Request Body

ParameterDescription
url
string, required
URL att skrapa
mode
string
"individual" (standard), "site_wide" eller "individual_with_summary"
phrases
array of strings
Nyckelfraser att extrahera
html_selector
string
CSS-selektor för att rikta in specifikt innehåll
Terminal window
curl -X POST https://app.quickchat.ai/v1/api/knowledge_base/import_external/website \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://example.com/docs",
"mode": "individual"
}'

Response 202 Accepted

{
"status": "success",
"url": "https://example.com/docs",
"article": {}
}

Importera transkriptionen från en YouTube-video.

Scope: write_all

POST https://app.quickchat.ai/v1/api/knowledge_base/import_external/youtube

Request Body

ParameterDescription
url
string, required
YouTube-videons URL
toast_process_uuid
string, required
UUID v4 för att spåra importprocessen
Terminal window
curl -X POST https://app.quickchat.ai/v1/api/knowledge_base/import_external/youtube \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"toast_process_uuid": "550e8400-e29b-41d4-a716-446655440000"
}'

Response 202 Accepted — Transkriptionen bearbetas asynkront.

Importera innehåll från alla länkar i en XML-sitemap.

Scope: write_all

POST https://app.quickchat.ai/v1/api/knowledge_base/import_external/site-map

Request Body

ParameterDescription
site_map
string, required
URL till en XML-sitemap
link_filter_regex
string
Regex för att filtrera vilka länkar som importeras (standard: ".*")
html_selector
string
CSS-selektor för att rikta in specifikt innehåll
summarize
boolean
Om importerat innehåll ska sammanfattas (standard: false)
Terminal window
curl -X POST https://app.quickchat.ai/v1/api/knowledge_base/import_external/site-map \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"site_map": "https://example.com/sitemap.xml"
}'

Response 202 Accepted

{
"status": "success",
"links": ["https://example.com/page1", "https://example.com/page2"]
}

Importera innehåll från en specifik lista med URL:er.

Scope: write_all

POST https://app.quickchat.ai/v1/api/knowledge_base/import_external/scrape-list

Request Body

ParameterDescription
links
array of strings, required
Lista med URL:er att skrapa (får inte vara tom)
tags
array of strings
Taggar att tilldela importerade artiklar
html_selector
string
CSS-selektor för att rikta in specifikt innehåll
summarize
boolean
Om importerat innehåll ska sammanfattas (standard: false)
Terminal window
curl -X POST https://app.quickchat.ai/v1/api/knowledge_base/import_external/scrape-list \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"links": ["https://example.com/page1", "https://example.com/page2"],
"tags": ["imported"]
}'

Response 202 Accepted

{
"status": "success",
"links": ["https://example.com/page1", "https://example.com/page2"]
}

Ta bort tidigare importerade URL-artiklar från Knowledge Base.

Scope: write_all

DELETE https://app.quickchat.ai/v1/api/knowledge_base/import_external

Request Body

ParameterDescription
links
array of strings, required
Lista med URL:er att ta bort (minst 1)
Terminal window
curl -X DELETE https://app.quickchat.ai/v1/api/knowledge_base/import_external \
-H 'Authorization: Bearer <API_TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"links": ["https://example.com/page1"]
}'

Response 200 OK