$API_TOKEN=<YOUR_API_TOKEN>
$cat > input.json << 'EOF'
<{
< "rawData": [
< {
< "timestamp": "2026-02-01T10:00:00Z",
< "model": "gpt-4o-mini",
< "prompt_tokens": 500,
< "completion_tokens": 200,
< "feature": "chatbot",
< "user_id": "user123"
< }
< ],
< "priceTable": {
< "gpt-4o": {
< "inputPer1K": 0.0025,
< "outputPer1K": 0.01
< },
< "gpt-4o-mini": {
< "inputPer1K": 0.00015,
< "outputPer1K": 0.0006
< },
< "claude-3-5-sonnet": {
< "inputPer1K": 0.003,
< "outputPer1K": 0.015
< }
< },
< "anomalyDetection": {
< "enabled": true,
< "thresholdMultiplier": 2.5,
< "groupByFeature": false
< },
< "enforcement": {
< "enabled": false,
< "maxDailyCost": 100,
< "action": "warn"
< },
< "idempotency": {
< "enabled": false,
< "ttlHours": 168,
< "allowedLateHours": 48
< },
< "n8n": {
< "enabled": false,
< "source": {
< "type": "raw",
< "rawEvents": []
< },
< "mapping": {
< "workflowIdField": "workflowId",
< "workflowNameField": "workflowName",
< "nodeIdField": "nodeId",
< "nodeNameField": "nodeName",
< "environmentField": "env",
< "tenantIdField": "tenantId",
< "userIdField": "userId",
< "runIdField": "runId",
< "eventIdField": "eventId",
< "timestampField": "timestamp"
< },
< "defaults": {
< "environment": "prod"
< },
< "derive": {
< "workflowNameFrom": "workflowId",
< "nodeIdFrom": "nodeName",
< "hashPrompt": true
< }
< },
< "privacy": {
< "redactIdsInLogs": true,
< "redactStrategy": "partial"
< },
< "retention": {
< "rawDays": 90,
< "aggregateDays": 365
< },
< "webhookUrl": ""
<}
<EOF
$curl "https://api.apify.com/v2/acts/quantifiable_bouquet~ai-cost-audit-anomaly-detection/runs?token=$API_TOKEN" \
< -X POST \
< -d @input.json \
< -H 'Content-Type: application/json'