> ## 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.

<Info>
  **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.
</Info>

## 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.

<CardGroup cols={3}>
  <Card title="Client-side encryption" icon="arrow-right-arrow-left">
    The SDK or local proxy encrypts the request payload before sending it to the Prem gateway.
  </Card>

  <Card title="Gateway boundary" icon="server">
    The gateway receives payload ciphertext plus authentication, model, size, timing, routing, and billing metadata.
  </Card>

  <Card title="Protected processing" icon="microchip">
    Supported confidential routes process plaintext inside a Trusted Execution Environment (TEE). Attestation evidence and policy define what the client can conclude about that runtime.
  </Card>
</CardGroup>

## 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

<CardGroup cols={2}>
  <Card title="Regulated Industries" icon="building-columns">
    Healthcare, finance, legal, and government teams that need to map an AI data path to their own legal, compliance, and security controls.
  </Card>

  <Card title="AI Application Builders" icon="laptop-code">
    Development teams that need a client-encrypted inference path and can validate the supported API surface.
  </Card>

  <Card title="Security-First Organizations" icon="shield-halved">
    Teams that require hardware evidence and an explicit policy decision in addition to provider documentation.
  </Card>

  <Card title="Enterprises with Sensitive IP" icon="vault">
    Companies evaluating AI for internal documents, proprietary code, or strategic planning under a defined threat model.
  </Card>
</CardGroup>

## 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

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](/platform-status).

## Get Started

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

<Steps>
  <Step title="Install the SDK">
    ```bash theme={"system"}
    npm install @premai/api-sdk
    ```
  </Step>

  <Step title="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.
    });
    ```
  </Step>

  <Step title="Send a chat request">
    ```typescript theme={"system"}
    const response = await client.chat.completions.create({
      model: "glm-5.2",
      messages: [{ role: "user", content: "Hello, privately." }],
    });
    ```
  </Step>
</Steps>

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](/confidential-proxy) compatibility limits before rollout.

## What to Read Next

<CardGroup cols={2}>
  <Card title="How It Works" icon="diagram-project" href="/how-it-works" arrow="true">
    Learn the architecture: the function of each component and the data flow through the system.
  </Card>

  <Card title="Security Model" icon="shield-halved" href="/security-model" arrow="true">
    Examine the trust model: TEEs, attestation, the threat model, and the known limitations.
  </Card>

  <Card title="Developer Experience" icon="code" href="/developer-experience" arrow="true">
    Read the integration guide: SDK options, capabilities, code examples, and the API reference.
  </Card>

  <Card title="Platform Status" icon="road" href="/platform-status" arrow="true">
    See the features that are available today, the features that are not ready, and the roadmap.
  </Card>

  <Card title="Agents & Automation" icon="robot" href="/agents" arrow="true">
    Building an unattended or agentic system? Start here.
  </Card>
</CardGroup>

<Note>
  Go to the [Quickstart guide](/quickstart) to start immediately.
</Note>
