# GDPR & PII-Safe Private AI Batch Processor (Zero-Retention)

**Use case:** 

Process sensitive datasets with LLMs without leaking personal data. Automatically masks emails, phone numbers, credit cards, and SSNs before prompts leave the Actor, enforces OpenRouter Zero Data Retention (ZDR), disables caching, and outputs validated JSON.

## Input

```json
{
  "mode": "batch",
  "modelChain": [
    "anthropic/claude-3.5-sonnet",
    "openai/gpt-4o-mini"
  ],
  "policyPreset": "ultra-private",
  "taskClass": "extraction",
  "route": "chat",
  "maxCostPerRunUsd": 5,
  "timeoutMs": 30000,
  "maxRetries": 2,
  "enableExactCache": false,
  "cacheTtlSeconds": 86400,
  "cacheNamespace": "default",
  "enablePrefixCache": true,
  "userScopedCache": true,
  "jsonStrictMode": true,
  "enableDeterministicRepair": true,
  "maxRepairAttempts": 1,
  "enableRepairModel": false,
  "repairModel": "openai/gpt-4o-mini",
  "enableDebugArtifacts": true,
  "piiMasking": true,
  "zdrOnly": true,
  "redactLogs": true,
  "requestTemplate": {
    "text": "Analyze the following PII-redacted record and extract key insights as JSON:\n\n{{text}}",
    "jsonSchema": {
      "type": "object",
      "properties": {
        "category": {
          "type": "string"
        },
        "riskLevel": {
          "type": "string",
          "enum": [
            "low",
            "medium",
            "high"
          ]
        },
        "sanitizedSummary": {
          "type": "string"
        },
        "actionItems": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "category",
        "riskLevel",
        "sanitizedSummary"
      ]
    }
  },
  "sampleSize": 10,
  "autoCompressContext": true,
  "maxInputTokens": 8000,
  "enableVisionOptimizer": true
}
```

## Output

```json
{
  "rowIndex": {
    "label": "Row Index",
    "format": "integer"
  },
  "status": {
    "label": "Status",
    "format": "string"
  },
  "success": {
    "label": "Success",
    "format": "boolean"
  },
  "retries": {
    "label": "Retries",
    "format": "integer"
  },
  "error": {
    "label": "Error",
    "format": "string"
  },
  "meta.requestId": {
    "label": "Request ID",
    "format": "string"
  },
  "meta.route": {
    "label": "Route",
    "format": "string"
  },
  "meta.finalModel": {
    "label": "Final Model",
    "format": "string"
  },
  "meta.estimatedCostUsd": {
    "label": "Estimated Cost (USD)",
    "format": "number"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The OpenRouter Ultra V2 – MCP Server & Deterministic JSON API Actor is ready to run with the inputs already set for "GDPR & PII-Safe Private AI Batch Processor (Zero-Retention)". [Sign up or log in](https://console.apify.com/create-task-from-example/DrbEEGolLCZjNkJWB) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "GDPR & PII-Safe Private AI Batch Processor (Zero-Retention)" task

The OpenRouter Ultra V2 – MCP Server & Deterministic JSON API Actor will start running based on the input automatically. You can also change all the input fields, like execution mode, model fallback chain, and more, to match your specific use case.

### 3. Receive the "GDPR & PII-Safe Private AI Batch Processor (Zero-Retention)" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as row index, status, success, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "GDPR & PII-Safe Private AI Batch Processor (Zero-Retention)" task via API](https://apify.com/chriskelch77/openrouter-ultra.md).

## FAQ

### When is PII redacted during batch processing?

Before the request ever leaves the Apify container. Emails, phone numbers, credit cards, and SSNs are masked locally before calling OpenRouter.

### Does this store any prompts in cache or logs?

No. Exact caching is disabled (enableExactCache: false), console logs are redacted (redactLogs: true), and only Zero Data Retention (zdrOnly: true) LLM providers are used.

## About this Actor

This example demonstrates how to use [OpenRouter Ultra V2 – MCP Server & Deterministic JSON API](https://apify.com/chriskelch77/openrouter-ultra.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/chriskelch77/openrouter-ultra.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/chriskelch77/openrouter-ultra.md

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).
