> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prem.io/llms.txt
> Use this file to discover all available pages before exploring further.

# What is Prem API

> Client-encrypted model APIs with confidential-computing evidence and explicit assurance boundaries.

> [!NOTE]
>
> **In one sentence:** Prem API provides OpenAI- and Anthropic-compatible model routes with client-side encryption and confidential-computing evidence. Review the current measurement-policy and route-assurance gaps before making a workload-specific guarantee.

## The Problem

When you use a standard AI API, your prompts, files, and conversations are processed on infrastructure that you do not control. HTTPS protects data in transit, but the service normally receives plaintext for processing.

For many teams, this model is acceptable. Teams handling patient records, financial data, legal documents, source code, or trade secrets may need a narrower processing boundary and evidence they can inspect.

Prem API changes where plaintext is available and adds confidential-computing evidence. It does not remove every dependency or trust assumption.

## What Prem API Does

Prem API exposes supported chat and audio routes. The TypeScript SDK or local Confidential Proxy encrypts the request payload before network egress. The gateway handles ciphertext and operational metadata, and the selected processing runtime decrypts the payload for inference.

> [card] Client-side encryption
>
> The SDK or local proxy encrypts the request payload before sending it to the Prem gateway.

> [card] Gateway boundary
>
> The gateway receives payload ciphertext plus authentication, model, size, timing, routing, and billing metadata.

> [card] Protected processing
>
> Supported confidential routes process plaintext inside a Trusted Execution Environment (TEE). Attestation evidence and policy define what the client can conclude about that runtime.

## The Comparison with a Standard AI API

| | Standard AI API | Prem API |
| - | - | - |
| **Access to your data** | The provider, the provider's staff, and possibly the cloud host | Your application and the protected processing runtime; a local proxy also sees plaintext when used |
| **Gateway payload** | The service normally receives the request body | The Prem gateway receives ciphertext plus operational metadata |
| **Processing boundary** | Provider-managed workload | A supported confidential route uses a protected runtime; verify the selected route |
| **Security evidence** | Provider policy, controls, and audit material | Hardware-signed evidence plus measurement, TCB, and route policy |
| **Host access control** | Defined by the provider's architecture | Confidential-computing hardware is designed to restrict host access; deployment validation still applies |
| **API compatibility** | Provider-specific | Supported subsets of OpenAI- and Anthropic-compatible interfaces |

## Who Prem API Is For

> [card] Regulated Industries
>
> Healthcare, finance, legal, and government teams that need to map an AI data path to their own legal, compliance, and security controls.

> [card] AI Application Builders
>
> Development teams that need a client-encrypted inference path and can validate the supported API surface.

> [card] Security-First Organizations
>
> Teams that require hardware evidence and an explicit policy decision in addition to provider documentation.

> [card] Enterprises with Sensitive IP
>
> Companies evaluating AI for internal documents, proprietary code, or strategic planning under a defined threat model.

## What You Can Do Today

Prem API exposes a supported subset of OpenAI-compatible and Anthropic-compatible interfaces:

* **Chat with AI models**: Streaming conversations, multi-step reasoning, and tool use
* **Transcribe audio**: Use the currently enabled Deepgram model and its response shape
* **Make decisions**: Answer typed questions with probabilities through [Decisions](https://docs.prem.io/guides/decisions.md)

The Prem API has two inference modes:

* **Confidential inference**: Client-side encryption, a Trusted Execution Environment, and attestation evidence that you can examine. Use this mode for sensitive data and for production workloads.
* **[Zero Data Retention](https://docs.prem.io/zdr/overview.md)**: An OpenAI-compatible endpoint that needs no code changes. Prem sends the request to a trusted partner, and the partner keeps no content. Use this mode for evaluation, for prototypes, and for public data.

See [ZDR vs Confidential](https://docs.prem.io/zdr/comparison.md) for the decision.

The current response does not expose a provider-backed versus Reticle-verifiable assurance profile for each model route. A model alias does not inherit confidential-runtime properties without that evidence. See [Platform Status](https://docs.prem.io/platform-status.md).

## Get Started

You can integrate Prem API into an application, or you can evaluate Prem API for your organization. The procedure is the same:

**1. Install the SDK**

```bash theme={"system"}
npm install @premai/api-sdk
```

**2. Create a client with your encryption key**

```typescript theme={"system"}
import { createRvencClient } from "@premai/api-sdk";

const client = await createRvencClient({
  apiKey: process.env.PREM_API_KEY,
  clientKEK: process.env.CLIENT_KEK, // You generate this. We never see it.
});
```

**3. Send a chat request**

```typescript theme={"system"}
const response = await client.chat.completions.create({
  model: "deepseek-v4.1-flash-1017",
  messages: [{ role: "user", content: "Hello, privately." }],
});
```

For Python, Go, or another language, use the bundled local proxy with a client that supports a custom base URL and the documented routes. Check the [Confidential Proxy](https://docs.prem.io/confidential-proxy.md) compatibility limits before rollout.

## What to Read Next

> [card] [How It Works](https://docs.prem.io/how-it-works.md)
>
> Learn the architecture: the function of each component and the data flow through the system.

> [card] [Security Model](https://docs.prem.io/security-model.md)
>
> Examine the trust model: TEEs, attestation, the threat model, and the known limitations.

> [card] [Developer Experience](https://docs.prem.io/developer-experience.md)
>
> Read the integration guide: SDK options, capabilities, code examples, and the API reference.

> [card] [Platform Status](https://docs.prem.io/platform-status.md)
>
> See the features that are available today, the features that are not ready, and the roadmap.

> [card] [Agents & Automation](https://docs.prem.io/agents.md)
>
> Building an unattended or agentic system? Start here.

> [card] [Zero Data Retention](https://docs.prem.io/zdr/overview.md)
>
> The standard mode. It is OpenAI-compatible, it uses trusted partners, and nobody keeps your content.

> [!NOTE]
>
> Go to the [Quickstart guide](https://docs.prem.io/quickstart.md) to start immediately.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.