# Security & Privacy

URL: https://interfaze-landing-1am6r0242-jigsaw-stack.vercel.app/docs/security

Interfaze is built with security and privacy as core principles. We understand the importance of protecting your data and ensuring secure AI interactions.

If you require a security review with **SOC2** or **HIPAA** compliance, please contact us at support@interfaze.ai.

## Data Privacy

### Message Storage

- **Request logging is on by default** - prompts, responses, and intermediate task outputs are stored and available in the [dashboard logs](https://interfaze-landing-1am6r0242-jigsaw-stack.vercel.app/dashboard/logs)
- Disable storage of request contents per request with the `x-interfaze-zdr: true` header
- Request IDs, status, timestamps, and token counts are still kept when ZDR is enabled

### Data Processing

- All API requests are processed in real-time
- Prompt, response, and intermediate task contents are not retained when Zero Data Retention is enabled
- Data is encrypted in transit and at rest
- We do not use your data for model training without explicit consent

### Zero Data Retention (ZDR)

Zero Data Retention keeps request contents out of stored logs. Prompts, responses, and intermediate task outputs are not retained. The log entry still includes the request ID, status, timestamp, and token counts.

Turn it on per request with the `x-interfaze-zdr` header:

```text
x-interfaze-zdr: true
```

If you use the [Interfaze SDK](https://interfaze-landing-1am6r0242-jigsaw-stack.vercel.app/docs/integrations/interfaze-sdk), set `zdr: true` when creating the client instead and the header is added for you. There is no equivalent option anywhere else, including the native [Vercel AI SDK](https://interfaze-landing-1am6r0242-jigsaw-stack.vercel.app/docs/integrations/vercel-ai-sdk) and [LangChain](https://interfaze-landing-1am6r0242-jigsaw-stack.vercel.app/docs/integrations/langchain-sdk) integrations, so set the header as a default header on the client so every request carries it.

**Interfaze SDK · typescript**

```typescript
import { Interfaze } from "interfaze";

const interfaze = new Interfaze({
  apiKey: process.env.INTERFAZE_API_KEY,
  zdr: true, // no prompts, responses, or logs are retained
});
```

**Vercel AI SDK · typescript**

```typescript
import { createInterfaze } from "@interfaze-ai/ai-sdk";

const interfaze = createInterfaze({
  apiKey: process.env.INTERFAZE_API_KEY,
  headers: {
    "x-interfaze-zdr": "true",
  },
});
```

**LangChain SDK · typescript**

```typescript
import { ChatInterfaze } from "@interfaze-ai/langchain";

const interfaze = new ChatInterfaze({
  apiKey: process.env.INTERFAZE_API_KEY,
  configuration: {
    defaultHeaders: {
      "x-interfaze-zdr": "true",
    },
  },
});
```

**Interfaze SDK · python**

```python
import os
from interfaze import Interfaze

interfaze = Interfaze(
    api_key=os.environ["INTERFAZE_API_KEY"],
    zdr=True,  # no prompts, responses, or logs are retained
)
```

**LangChain SDK · python**

```python
import os
from interfaze_langchain import ChatInterfaze

interfaze = ChatInterfaze(
    api_key=os.environ["INTERFAZE_API_KEY"],
    default_headers={"x-interfaze-zdr": "true"},
)
```

## Infrastructure Security

### API Security

- **HTTPS Only**: All API communications are encrypted using TLS 1.3
- **API Key Authentication**: Secure token-based authentication
- **Rate Limiting**: Built-in protection against abuse and DDoS attacks
- **Request Validation**: All inputs are validated and sanitized

### Code Execution Security

When using code execution features:

- **Sandboxed Environment**: All code runs in isolated containers
- **Resource Limits**: Controlled CPU and memory usage
- **Network Isolation**: No external network access for security
- **Time Limits**: Automatic termination of long-running processes
- **Safe Execution**: Restricted access to system resources

### Infrastructure

- **Cloud Security**: Built on secure, enterprise-grade cloud infrastructure
- **Regular Audits**: Continuous security monitoring and vulnerability assessments
- **Backup & Recovery**: Robust disaster recovery and data backup systems
- **Compliance**: Adherence to industry security standards and best practices

### Monitoring

- Real-time usage monitoring
- Automatic rate limit enforcement
- Request logs and token usage in the [dashboard](https://interfaze-landing-1am6r0242-jigsaw-stack.vercel.app/dashboard/logs)
