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

# Run Attestation

> Run confidential enclave attestation directly with Reticle.

The Prem SDK and the Confidential Proxy verify attestation automatically. To check a confidential runtime yourself, use `@premai/reticle`, the same verifier they use.

> [!NOTE]
>
> You need a Prem API key. Create one in the [Prem Dashboard](https://dashboard.prem.io).

## 1. Install Reticle

```bash theme={"system"}
npm install @premai/reticle@0.6.2
```

Reticle runs on Node.js, Bun, Deno, modern browsers, and mobile devices (iOS and Android via [React Native](https://docs.prem.io/guides/react-native.md)).

## 2. Verify the runtime

```typescript theme={"system"}
import { ClientBuilder, QueryParams } from "@premai/reticle";

const apiKey = process.env.PREM_API_KEY;
const proxyUrl = process.env.PROXY_URL || "https://gateway.prem.io";

if (!apiKey) {
  throw new Error("Set the PREM_API_KEY environment variable");
}

const client = await new ClientBuilder(proxyUrl)
  .with_authorization(apiKey)
  .build();

client.set_query(new QueryParams().with("model", "deepseek-v4.1-flash-1017"));

const result = await client.attest();

console.log("Verified modules:", result.modules());
console.log("Session ID:", result.headers().get("x-session-id"));
```

The builder loads and verifies signed policies and measurement references from [Trustbase](https://github.com/prem-research/trustbase). `client.attest()` then:

1. Generates a fresh challenge and requests a unified report for the selected model.
2. Verifies CPU evidence and manufacturer collateral, including the challenge bound to the workload manifest.
3. Checks supplied GPU evidence, including signatures, digest links and the nonce bound to the CPU report.
4. Evaluates policy claims and CPU measurements against the signed release references for registered PodVM releases and workload initialization data.

> [!WARNING]
>
> `request_attestation(nonce)` retrieves raw evidence without performing these checks. Use `attest()` for a verification decision.

## 3. Read the result

`attest()` throws if a required verification or policy check fails. On success, the result exposes:

| Method | Returns |
| - | - |
| `modules()` | The verified modules |
| `headers()` | Response headers, including `x-session-id` |
| `pod_report()` | The workload manifest |

A standalone Reticle call does not send an inference request. The Prem SDK is what forwards the session ID with protected requests.

This guide uses the standard attestation flow for the [Confidential chat models](https://docs.prem.io/models-and-pricing.md#confidential-models).
See [Attestation](https://docs.prem.io/attestation.md) for what a pass does and does not show.

## Related

> [card] [Attestation Concept](https://docs.prem.io/attestation.md)
>
> Read the full attestation architecture and current implementation status.

> [card] [Security Model](https://docs.prem.io/security-model.md)
>
> Understand the threat model and confidential computing boundaries.

> [card] [Trustbase](https://github.com/prem-research/trustbase)
>
> Inspect signed release references and attestation policies.

> [card] [Mobile Example (Expo)](https://github.com/prem-research/reticle-expo)
>
> See how to run on-device Reticle verification in React Native.


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