$API_TOKEN=<YOUR_API_TOKEN>
$cat > input.json << 'EOF'
<{
< "records": [
< {
< "chunkId": "guide-0",
< "documentId": "guide",
< "sourceUrl": "https://example.com/guide",
< "chunkIndex": 0,
< "title": "Getting started",
< "headingPath": [
< "Getting started"
< ],
< "chunkText": "Install the package, create a client, and verify the connection before indexing production content."
< },
< {
< "chunkId": "guide-1",
< "documentId": "guide",
< "sourceUrl": "https://example.com/guide",
< "chunkIndex": 1,
< "title": "Getting started",
< "headingPath": [
< "Getting started"
< ],
< "chunkText": "Install the package, create a client, and verify the connection before indexing production content."
< },
< {
< "chunkId": "guide-3",
< "documentId": "guide",
< "sourceUrl": "https://example.com/guide",
< "chunkIndex": 3,
< "title": "Configuration",
< "headingPath": [
< "Configuration"
< ],
< "chunkText": "Configure the index name, embedding dimensions, and metadata fields used for retrieval."
< },
< {
< "chunkId": "overlap-0",
< "documentId": "overlap",
< "sourceUrl": "https://example.com/overlap",
< "chunkIndex": 0,
< "title": "Overlap example",
< "headingPath": [
< "Overlap example"
< ],
< "chunkText": "This intentionally repeated sample demonstrates an oversized chunk. This intentionally repeated sample demonstrates an oversized chunk. This intentionally repeated sample demonstrates an oversized chunk. This intentionally repeated sample demonstrates an oversized chunk. Verify the source records before embedding them. Keep stable identifiers and source URLs."
< },
< {
< "chunkId": "missing-provenance",
< "chunkIndex": 0,
< "chunkText": "As shown above, use the same configuration for the next operation."
< },
< {
< "chunkId": "overlap-1",
< "documentId": "overlap",
< "sourceUrl": "https://example.com/overlap",
< "chunkIndex": 1,
< "chunkText": "Verify the source records before embedding them. Keep stable identifiers and source URLs. Keep stable identifiers and source URLs for every chunk."
< }
< ]
<}
<EOF
$curl "https://api.apify.com/v2/acts/sebastian-actors~rag-dataset-linter/runs?token=$API_TOKEN" \
< -X POST \
< -d @input.json \
< -H 'Content-Type: application/json'