ConnectorsUpdated 2026-03-18
Hugging Face Connector
Hugging Face Connector reference and workflow guide.
What this page helps you do
Use this connector to ingest external content into your RetainDB project for retrieval and memory grounding.
Prerequisites
- A project id.
- Connector-specific credentials/config.
- API key or dashboard access.
Request and response
Create source
json
{
"name": "Hugging Face Connector",
"connectorType": "huggingface",
"config": {
"repo_id":"microsoft/phi-3-mini-4k-instruct"
}
}Trigger sync
bash
curl -X POST "https://api.retaindb.com/v1/sources/src_123/sync" \
-H "Authorization: Bearer $RETAINDB_API_KEY"Step-by-Step Workflow
- Create source under
/v1/projects/:projectId/sources. - Trigger
/v1/sources/:sourceId/sync. - Poll
/v1/sync-jobs/:jobId. - Validate retrieval against freshly synced material.
Try it
bash
curl -X POST "https://api.retaindb.com/v1/projects/proj_123/sources" \
-H "Authorization: Bearer $RETAINDB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name":"Hugging Face Connector",
"connectorType":"huggingface",
"config":{"repo_id":"microsoft/phi-3-mini-4k-instruct"}
}'What to expect
- Source creation is immediate.
- Sync latency depends on source size and provider limits.
- Retrieval consistency improves after sync reaches terminal success.
Troubleshooting
- Missing cards/files: validate repo visibility.
- Slow sync: reduce artifact scope.
- Sync job stuck/failed: inspect
/v1/sync-jobs/:jobIdand retry.
Security notes
- Store connector credentials in secure secrets.
- Keep source/project ownership tenant-scoped.
Verify your setup
- Source listed under project.
- Sync job completes.
- Synced content appears in search results.
Next step
Was this page helpful?
Your feedback helps us prioritize docs improvements weekly.