Knowledge API
ํ์ผ, ํค์๋ ๋๋ ๋งํฌ๋ฅผ ํตํด ๋ง์ธ๋์ ์ง์์ ์ถ๊ฐํ์ธ์.
์ด API๋ Minds ์์์ ๋ง์ธ๋ ์ง์์ ๊ด๋ฆฌํฉ๋๋ค.
ํ์ผ, ํค์๋ ๋๋ ๋งํฌ์ ์ธ ๊ฐ์ง ๋ฐฉ๋ฒ์ ํตํด ๋ง์ธ๋์ ์ง์์ ์ถ๊ฐํ ์ ์์ต๋๋ค. ์ถ๊ฐ๋ ์ง์์ ํ๋ก์ธ์ฑ ๋ฐ ์๋ฒ ๋ฉ ๊ณผ์ ์ ๊ฑฐ์ณ ๋ํ ์ค์ ์๋์ผ๋ก ๊ฒ์ ๋ฐ ํ์ฉ๋ฉ๋๋ค.
์ฐธ๊ณ : v1 API๋ฅผ ํตํด ์ง์ ๋ชฉ๋ก ์กฐํ, ์ถ๊ฐ, ์ญ์ ๊ฐ ๊ฐ๋ฅํฉ๋๋ค. ํค์๋ ๊ฒ์์ ํตํ ์ง์ ๋ณด๊ฐ(enrichment) ์ญ์ ๋์ผํ ์ถ๊ฐ ์๋ํฌ์ธํธ๋ฅผ ํตํด ์ง์๋ฉ๋๋ค.
์ง์ ํญ๋ชฉ ๋ชฉ๋ก ์กฐํ
๋ง์ธ๋์ ๋ฑ๋ก๋ ๋ชจ๋ ์ง์ ํญ๋ชฉ์ ์กฐํํฉ๋๋ค.
์๋ํฌ์ธํธ: GET /api/v1/minds/{mindId}/knowledge
ํค๋:
Authorization: Bearer minds_your_api_key
์์:
curl -X GET "https://getminds.ai/api/v1/minds/{mindId}/knowledge" \
-H "Authorization: Bearer minds_your_api_key"
์๋ต:
{
"success": true,
"data": {
"items": [
{
"id": "660e8400-e29b-41d4-a716-446655440001",
"description": "Company Employee Handbook 2025",
"link": null,
"filePath": "portfolio/user-id/1234567890_handbook.pdf",
"isWatched": false,
"createdAt": "2025-12-10T12:00:00.000Z",
"updatedAt": "2025-12-10T12:00:00.000Z"
}
],
"total": 1
}
}
| ํ๋ | ํ์ | ์ค๋ช |
|---|---|---|
data.items | array | ์ง์ ํญ๋ชฉ ๊ฐ์ฒด ๋ฐฐ์ด |
data.total | number | ์ด ๋ง์ธ๋์ ์ด ์ง์ ํญ๋ชฉ ์ |
ํ์ผ ์ ๋ก๋
๋ง์ธ๋์ ๋ฌธ์๋ ์ด๋ฏธ์ง๋ฅผ ์ง์ ์ ๋ก๋ํฉ๋๋ค.
์๋ํฌ์ธํธ: POST /api/v1/minds/{mindId}/knowledge
Content-Type: multipart/form-data
| ํ๋ | ํ์ | ํ์ ์ฌ๋ถ | ์ค๋ช |
|---|---|---|---|
file | file | ํ์ | ์ ๋ก๋ํ ํ์ผ (์ต๋ 50MB) |
description | string | ํ์ | ์ฝํ ์ธ ์ ๋ํ ์ค๋ช |
์ง์๋๋ ํฌ๋งท:
- ๋ฌธ์: PDF, DOCX, DOC, TXT, MD, RTF, CSV, JSON, XML
- ์ด๋ฏธ์ง: JPG, JPEG, PNG, GIF, WEBP
์์:
curl -X POST "https://getminds.ai/api/v1/minds/{mindId}/knowledge" \
-H "Authorization: Bearer minds_your_api_key" \
-F "file=@./handbook.pdf" \
-F "description=Company Employee Handbook 2025"
์๋ต: 201 Created
{
"success": true,
"data": {
"id": "660e8400-e29b-41d4-a716-446655440001",
"description": "Company Employee Handbook 2025",
"filePath": "portfolio/user-id/1234567890_handbook.pdf",
"createdAt": "2025-12-10T12:00:00.000Z"
}
}
ํค์๋ ๊ฒ์
์น์์ ํค์๋๋ฅผ ๊ฒ์ํ์ฌ ์ง์์ ์ถ๊ฐํฉ๋๋ค. Exa์ YouTube๋ฅผ ๊ฒ์ํ๊ณ ์ฝํ ์ธ ๋ฅผ ์ถ์ถํ์ฌ ๋ง์ธ๋์ ์ง์ ๋ฒ ์ด์ค์ ์ถ๊ฐํฉ๋๋ค.
์๋ํฌ์ธํธ: POST /api/v1/minds/{mindId}/knowledge
Content-Type: application/json
์น ๊ฒ์ ๋ณด๊ฐ์ ํธ๋ฆฌ๊ฑฐํ๋ ค๋ฉด (link/file ๋์ ) keywords ๋ฐฐ์ด์ด ํฌํจ๋ JSON ๋ณธ๋ฌธ์ ์ ์กํฉ๋๋ค.
| ํ๋ผ๋ฏธํฐ | ํ์ | ํ์ ์ฌ๋ถ | ์ค๋ช |
|---|---|---|---|
keywords | string | ํ์ | ๊ฒ์ํ ํค์๋ (์ต๋ 35๊ฐ) |
regeneratePrompt | boolean | ์ ํ | ์๋ฃ ํ ์์คํ ํ๋กฌํํธ ์ฌ์์ฑ ์ฌ๋ถ (๊ธฐ๋ณธ๊ฐ: true) |
์์:
curl -X POST "https://getminds.ai/api/v1/minds/{mindId}/knowledge" \
-H "Authorization: Bearer minds_your_api_key" \
-H "Content-Type: application/json" \
-d '{"keywords": ["solar panel efficiency", "photovoltaic trends"]}'
์๋ต: 202 Accepted
{
"success": true,
"data": {
"sparkId": "660e8400-e29b-41d4-a716-446655440000",
"keywords": ["solar panel efficiency", "photovoltaic trends"],
"queued": true,
"regeneratePrompt": true,
"message": "Knowledge enrichment queued with 2 keyword(s)."
}
}
์ฐธ๊ณ : ์ด ์์ ์ ๋น๋๊ธฐ์์ผ๋ก ์งํ๋ฉ๋๋ค. ๋ฐฑ๊ทธ๋ผ์ด๋์์ ํ๋ก์ธ์ฑ์ด ์คํ๋๋ฉฐ ์๋ฃ๊น์ง ์ ๋ถ์ด ์์๋ ์ ์์ต๋๋ค.
๋งํฌ
URL์์ ์ง์์ ์ถ๊ฐํฉ๋๋ค. ์น ํ์ด์ง, YouTube ๋์์, ์ฐ๊ตฌ ๋ ผ๋ฌธ์ ์ง์ํฉ๋๋ค.
์๋ํฌ์ธํธ: POST /api/v1/minds/{mindId}/knowledge
Content-Type: application/json
| ํ๋ผ๋ฏธํฐ | ํ์ | ํ์ ์ฌ๋ถ | ์ค๋ช |
|---|---|---|---|
link | string | ํ์ | ์น ์ฝํ ์ธ URL |
description | string | ํ์ | ์ฝํ ์ธ ์ ๋ํ ์ค๋ช |
์์:
curl -X POST "https://getminds.ai/api/v1/minds/{mindId}/knowledge" \
-H "Authorization: Bearer minds_your_api_key" \
-H "Content-Type: application/json" \
-d '{"link": "https://example.com/article", "description": "Industry trends article"}'
์๋ต: 201 Created
{
"success": true,
"data": {
"id": "660e8400-e29b-41d4-a716-446655440001",
"link": "https://example.com/article",
"description": "Industry trends article",
"createdAt": "2025-12-10T12:00:00.000Z"
}
}
์ง์๋๋ ๋งํฌ ์ ํ:
- ์น ํ์ด์ง (์คํฌ๋ํ์ ํตํด ์ฝํ ์ธ ์ถ์ถ)
- YouTube ๋์์ (์๋ง/์คํฌ๋ฆฝํธ ์๋ ์ถ์ถ)
- ์ฐ๊ตฌ ๋ ผ๋ฌธ (arXiv ๋ฑ)
Watch (์๋ ์ ๋ฐ์ดํธ)
๋งํฌ ๊ธฐ๋ฐ ์ง์ ํญ๋ชฉ์ "Watch" ๊ธฐ๋ฅ์ ์ค์ ํ์ฌ ์ฃผ ๋จ์๋ก ์ฝํ ์ธ ์ ๋ฐ์ดํธ๋ฅผ ์๋์ผ๋ก ํ์ธํ ์ ์์ต๋๋ค. ๋ณ๊ฒฝ ์ฌํญ์ด ๊ฐ์ง๋๋ฉด ์ง์์ด ๋ค์ ํ๋ก์ธ์ฑ๋๊ณ ์ฌ์๋ฒ ๋ฉ๋ฉ๋๋ค.
Watch ๊ธฐ๋ฅ์ ์ ํ UI๋ฅผ ํตํด ๊ด๋ฆฌํ ์ ์์ต๋๋ค. Watch ์ํ๋ API๋ฅผ ํตํด ์ง์ ํญ๋ชฉ ๋ชฉ๋ก์ ์กฐํํ ๋ (isWatched ํ๋) ํ์ธํ ์ ์์ต๋๋ค.
์ฐธ๊ณ : Watch ๊ธฐ๋ฅ์ ๋งํฌ ๊ธฐ๋ฐ ์ง์์๋ง ์ฌ์ฉํ ์ ์์ผ๋ฉฐ, ํ์ผ์ด๋ ํค์๋ ๊ฒ์์๋ ์ง์๋์ง ์์ต๋๋ค.
์ง์ ํญ๋ชฉ ์์
๊ธฐ์กด ์ง์ ํญ๋ชฉ์ ์ค๋ช ์ ์์ ํฉ๋๋ค.
์๋ํฌ์ธํธ: PUT /api/v1/minds/{mindId}/knowledge/{itemId}
ํค๋:
Authorization: Bearer minds_your_api_key
Content-Type: application/json
์์ฒญ ๋ณธ๋ฌธ:
{
"description": "Updated description for this knowledge item"
}
| ํ๋ผ๋ฏธํฐ | ํ์ | ํ์ ์ฌ๋ถ | ์ค๋ช |
|---|---|---|---|
description | string | ํ์ | ์์ ํ ์ค๋ช (๋น์ด ์์ ์ ์์) |
์์:
curl -X PUT "https://getminds.ai/api/v1/minds/{mindId}/knowledge/{itemId}" \
-H "Authorization: Bearer minds_your_api_key" \
-H "Content-Type: application/json" \
-d '{"description": "Updated handbook description"}'
์๋ต:
{
"success": true,
"data": {
"id": "660e8400-e29b-41d4-a716-446655440001",
"description": "Updated handbook description",
"link": null,
"filePath": "portfolio/user-id/1234567890_handbook.pdf",
"isWatched": false,
"createdAt": "2025-12-10T12:00:00.000Z",
"updatedAt": "2025-12-15T08:30:00.000Z"
}
}
์๋ฌ ์๋ต
400 Bad Request - ์ ๋ฐ์ดํธํ ์ ํจํ ํ๋๊ฐ ์๊ฑฐ๋ ์ค๋ช ์ด ๋น์ด ์์
401 Unauthorized - ์ ํจํ์ง ์๊ฑฐ๋ ๋๋ฝ๋ API ํค
404 Not Found - ์ง์ ํญ๋ชฉ ๋๋ ๋ง์ธ๋๋ฅผ ์ฐพ์ ์ ์์
ํค์๋๋ฅผ ํตํ ๋ณด๊ฐ (ํธ์ ๊ธฐ๋ฅ)
ํค์๋ ๊ธฐ๋ฐ ์ง์ ๋ณด๊ฐ์ ์ํ ํธ์์ฉ ์จ๋ฆฌ์ด์ค(Alias)์ ๋๋ค.
์๋ํฌ์ธํธ: POST /api/v1/minds/{mindId}/knowledge/enrich
์ด๋ keywords ๋ณธ๋ฌธ์ ์ฌ์ฉํ๋ POST /api/v1/minds/{mindId}/knowledge๊ณผ ๋์ผํฉ๋๋ค. ์์ธํ ๋ด์ฉ์ ํค์๋ ๊ฒ์์ ์ฐธ๊ณ ํ์ธ์.
์์:
curl -X POST "https://getminds.ai/api/v1/minds/{mindId}/knowledge/enrich" \
-H "Authorization: Bearer minds_your_api_key" \
-H "Content-Type: application/json" \
-d '{"keywords": ["solar panel efficiency", "photovoltaic trends"]}'
์ง์ ํญ๋ชฉ ์ญ์
์ง์ ํญ๋ชฉ ๋ฐ ๊ด๋ จ๋ ๋ชจ๋ ๋ฐ์ดํฐ(์๋ฒ ๋ฉ, ํจํด, ํ์ผ)๋ฅผ ์๊ตฌ์ ์ผ๋ก ์ญ์ ํฉ๋๋ค.
์๋ํฌ์ธํธ: DELETE /api/v1/minds/{mindId}/knowledge/{itemId}
ํค๋:
Authorization: Bearer minds_your_api_key
์์:
curl -X DELETE "https://getminds.ai/api/v1/minds/{mindId}/knowledge/{itemId}" \
-H "Authorization: Bearer minds_your_api_key"
์๋ต: 204 No Content (์ฑ๊ณต ์ ๋น ๋ณธ๋ฌธ ๋ฐํ)
์ญ์ ๋๋ ๋ฐ์ดํฐ
- ์ง์ ํญ๋ชฉ ๋ ์ฝ๋
- ๊ด๋ จ๋ ๋ชจ๋ ๋ฒกํฐ ์๋ฒ ๋ฉ
- ๊ด๋ จ๋ ๋ชจ๋ ํจํด
- ์คํ ๋ฆฌ์ง์ ์ ๋ก๋๋ ํ์ผ (ํ์ผ ๊ธฐ๋ฐ์ธ ๊ฒฝ์ฐ)
๊ฒฝ๊ณ : ์ด ์์ ์ ์ทจ์ํ ์ ์์ต๋๋ค.
ํ๋ก์ธ์ฑ ๋์ ๋ฐฉ์
- ์ ๋ก๋ - ์ฝํ ์ธ ๊ฐ ์ ์ฅ๋๊ณ API๊ฐ ์ฑ๊ณต์ ๋ฐํํฉ๋๋ค.
- ์ถ์ถ - ๋ฐฑ๊ทธ๋ผ์ด๋ ํ๋ก์ธ์ฑ์ ํตํด ํ ์คํธ๋ฅผ ์ถ์ถํฉ๋๋ค (์คํฌ๋ํ, ์คํฌ๋ฆฝํธ ์ถ์ถ, OCR, ๋น์ ๊ธฐ์ ํ์ฉ).
- ์๋ฒ ๋ฉ - ์ถ์ถ๋ ์ฝํ ์ธ ๊ฐ ๋ฒกํฐ ์๋ฒ ๋ฉ์ผ๋ก ๋ณํ๋ฉ๋๋ค.
- ๊ฒ์ - ์ฑํ ์งํ ์, ์๋งจํฑ ๊ฒ์์ ํตํด ๊ด๋ จ ์ง์์ ์๋์ผ๋ก ์ฐพ์๋ด ํ์ฉํฉ๋๋ค.
์๋ฌ
| ์ฝ๋ | ๋ฉ์์ง | ์์ธ |
|---|---|---|
| 400 | Link and description are required | ํ์ ํ๋ ๋๋ฝ |
| 400 | keywords array is required and must not be empty | ํค์๋๊ฐ ๋น์ด ์๊ฑฐ๋ ๋๋ฝ๋จ |
| 400 | File too large | ํ์ผ ํฌ๊ธฐ๊ฐ 50MB ์ ํ์ ์ด๊ณผํจ |
| 400 | Can only watch link-based knowledge | ํ์ผ์ ๋ํด Watch ์ค์ ์ ์๋ํจ |
| 404 | Mind not found or access denied | ์ ํจํ์ง ์์ Mind ID์ด๊ฑฐ๋ ์ ๊ทผ ๊ถํ์ด ์์ |
| 415 | Unsupported Content-Type | ์๋ชป๋ Content-Type ํค๋ |


