Live Capture API
The most powerful feature in AI Curator. Stream data in real-time from any source — for fine-tuning, RAG, or any LLM workflow — via simple HTTP POST requests.
Overview
The Live Capture API turns any tool into a data source. If your tool can make an HTTP POST request with JSON, it can stream data to AI Curator in real-time. Use captured data for fine-tuning or feed it into your RAG pipeline — same capture, different destinations. No batch processing required — data flows as it's generated.
Endpoint
POST http://localhost:3333/api/captureReal-time
Stream data as it's generated. No delays, no batching.
Simple
Single endpoint, JSON payload. One request to capture anything.
Local
Runs on your machine. No external APIs or cloud services.
POST /api/capture
| Property | Type | Required | Description |
|---|---|---|---|
source | string | yes | Identifier for the data source (e.g., "slack", "vscode", "my-script") |
records | array | yes | Array of data records — instruction-output pairs for fine-tuning, or content chunks for RAG indexing |
records[].instruction | string | yes | The instruction or question |
records[].output | string | yes | The expected response or answer |
records[].systemPrompt | string | no | System prompt for the sample |
records[].category | string | no | Category tag (e.g., "coding", "support", "writing") |
records[].qualityRating | number | no | Quality rating 1–5 |
records[].context | object | no | Additional metadata about the sample |
Request Body
JSON
{ "source": "vscode-extension", "records": [ { "instruction": "Explain this function", "output": "This function processes incoming data...", "systemPrompt": "You are a coding assistant", "category": "coding", "qualityRating": 5, "context": { "language": "typescript", "file": "utils.ts" } } ] }Integration Examples
cURL
Terminal
curl -X POST http://localhost:3333/api/capture \ -H "Content-Type: application/json" \ -d '{ "source": "slack", "records": [{ "instruction": "How do I reset my password?", "output": "Go to Settings → Account → Reset Password...", "category": "support", "qualityRating": 4 }] }'JavaScript / Fetch
JavaScript
await fetch("http://localhost:3333/api/capture", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ source: "vscode-extension", records: [{ instruction: "Explain this function", output: explanation, context: { code, language }, category: "coding", }], }), });Python
Python
import requests requests.post('http://localhost:3333/api/capture', json={ 'source': 'chat-interface', 'records': [{ 'instruction': user_message, 'output': assistant_response, 'qualityRating': 4 if user_thumbs_up else 3 }] })Shell Pipe
Terminal
# Extract error-resolution pairs from logs tail -f /var/log/app.log | grep "ERROR" | while read line; do curl -X POST localhost:3333/api/capture \ -d "{\"source\":\"logs\",\"records\":[{\"instruction\":\"$line\",\"output\":\"...\"}]}" doneResponse Format
200 OKSamples captured successfully
{ "success": true, "captured": 3, "datasetId": 1 }400 Bad RequestInvalid request body
{ "success": false, "error": "Missing required field: source" }Live Capture must be enabled
The Live Capture API is disabled by default. Enable it in Settings → Live Capture in the Web UI before sending requests.
Known Integrations
VS Code Extension
Capture code explanations, refactoring decisions, and debug sessions directly from your IDE.
VS Code
fetch("http://localhost:3333/api/capture", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ source: "vscode-extension", records: [{ instruction, output, context }] }) })OpenWebUI Plugin
Official plugin available in the OpenWebUI community. Automatically captures conversations from your self-hosted AI chat interface.
Available in OpenWebUI Community Plugins