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

> Private Confidential Compute Infrastructure: end-to-end encrypted AI with hardware-enforced privacy and post-quantum cryptography.

<Info>
  **In one sentence:** Prem API gives you AI through the same API that you already know, but no person can see your data. Prem servers, Prem staff, and the infrastructure provider cannot see your data. The hardware enforces this protection. You can verify this protection cryptographically.
</Info>

## The Problem

When you use a standard AI API today, your data goes through servers that you do not control. This data includes your prompts, files, and conversations. The provider can read everything. HTTPS protects the data in transit. But after the data arrives, the data is plaintext on the provider's infrastructure.

For many teams, this risk is acceptable. But some teams work with patient records, financial data, legal documents, or trade secrets. Regulations or good judgment say that this information must stay private. For these teams, standard AI APIs require trust that they cannot verify.

**Prem API removes the need for this unverified trust.**

## What Prem API Does

Prem API (Prem Confidential Compute Infrastructure) gives you **the same AI capabilities as any OpenAI-compatible API**, with one fundamental difference. The system encrypts your data from end to end. All processing occurs inside tamper-proof hardware that no person can access.

<CardGroup cols={3}>
  <Card title="Encrypted in Transit" icon="arrow-right-arrow-left">
    Your device encrypts the data before the data leaves. The network carries only encrypted bytes.
  </Card>

  <Card title="Encrypted at Rest" icon="hard-drive">
    The system stores files and keys in encrypted form. No plaintext goes to Prem storage.
  </Card>

  <Card title="Encrypted in Use" icon="microchip">
    Processing occurs inside hardware-sealed environments. These environments are Trusted Execution Environments (TEEs). A person with physical access to the server cannot extract your data.
  </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 | Only you                                                               |
| **Effect of a compromised server**    | An attacker can see your data                                   | An attacker sees only encrypted bytes                                  |
| **Proof of privacy**                  | You trust the provider's privacy policy                         | You verify privacy with hardware-signed cryptographic proof            |
| **Protection against future threats** | Not protected if quantum computers break current encryption     | Protected today by quantum-resistant algorithms                        |
| **Access by the cloud provider**      | The cloud provider can examine server memory                    | Hardware isolation prevents this access, for all owners of the machine |
| **API compatibility**                 | OpenAI-compatible                                               | The same OpenAI-compatible interface, with no rewrite necessary        |

## Who Prem API Is For

<CardGroup cols={2}>
  <Card title="Regulated Industries" icon="building-columns">
    Healthcare, finance, legal, and government organizations that must obey HIPAA, GDPR, nFADP, SOC 2, or internal compliance mandates when they use AI.
  </Card>

  <Card title="AI Application Builders" icon="laptop-code">
    Development teams that build products on LLMs and must guarantee data privacy to their users. These teams do not have to build custom infrastructure.
  </Card>

  <Card title="Security-First Organizations" icon="shield-halved">
    Teams for which data privacy is a hard technical requirement, not only a policy item. For these teams, a promise from the provider is not sufficient.
  </Card>

  <Card title="Enterprises with Sensitive IP" icon="vault">
    Companies that want to use AI for internal documents, proprietary code, or strategic planning. These companies do not want to show this information to third parties.
  </Card>
</CardGroup>

## What You Can Do Today

Prem API is a direct replacement for OpenAI-compatible APIs. If you used ChatGPT or an OpenAI-compatible service before, you know the interface. All functions operate the same, but with encryption:

* **Chat with AI models**: Streaming conversations, multi-step reasoning, and tool use
* **Transcribe and translate audio**: Upload recordings and get text back

Each of these capabilities operates fully inside hardware-sealed environments on the Prem confidential infrastructure.
Prem hosts all models itself. Your data does not leave the Prem CVMs. The system does not send requests to third-party AI providers.
Your data is plaintext only on your device and in the sealed processing environment.

## 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="Use it exactly like OpenAI">
    ```typescript theme={"system"}
    const response = await client.chat.completions.create({
      model: "glm-5.2",
      messages: [{ role: "user", content: "Hello, privately." }],
    });
    ```
  </Step>
</Steps>

If you use Python, Go, or a different language, use the local proxy server that the SDK includes. Point your existing OpenAI client at the local proxy server. The proxy applies encryption automatically. You do not have to change your code.

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