Origin Docs

Gateway Quickstart

Create an API key, send your first verified inference request through ORGN Gateway, and inspect attestation metadata.

This guide walks you through creating an API key, making your first request to ORGN Gateway, and verifying that a TEE model request produces an attestation receipt.

Gateway is OpenAI-compatible. Model IDs use underscores (for example phala_deepseek_r1, near_qwen3_30b) — not slashes.

Prerequisites

  • An ORGN account (sign in via id-orgn)
  • Access to the Gateway console
  • Basic familiarity with HTTP or JavaScript

Create an API key

All requests to the Gateway API require a Bearer token.

  1. Open gateway.orgn.com and sign in with id-orgn.
  2. Navigate to API Keys.
  3. Click Generate Key, enter a descriptive name, and copy the key.

Your API key is shown once. Store it securely — do not commit it to version control or expose it in frontend code.

Authenticate requests

Send your API key in the Authorization header:

Request Headers
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

Make your first request

Production API base URL:

https://api.gateway.orgn.com/v1

Example: TEE chat completion (curl)

cURL Request
curl -X POST https://api.gateway.orgn.com/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "phala_deepseek_r1",
    "messages": [
      { "role": "user", "content": "Hello" }
    ]
  }'

Example: JavaScript

fetch-request.js
const res = await fetch("https://api.gateway.orgn.com/v1/chat/completions", {
  method: "POST",
  headers: {
    Authorization: "Bearer YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    model: "near_qwen3_30b",
    messages: [{ role: "user", content: "Hello" }],
  }),
});
const data = await res.json();
console.log(data);

List available models:

curl https://api.gateway.orgn.com/v1/models \
  -H "Authorization: Bearer YOUR_API_KEY"

Verify the request in Scanner

After sending a TEE model request, open scanner.orgn.com to inspect the request:

  • Request status, model, provider, token usage, and latency
  • Attestation status — Verified, Pending, or Failed
  • Cryptographic verification details

Scanner shows metadata and attestation artifacts. It does not display prompt contents or model outputs — transparency without exposing inference data.

See Verify a request for independent attestation verification steps.

Understand attestation status

Each TEE request includes an attestation result:

StatusMeaning
VerifiedRequest executed inside a verified Trust Domain; cryptographic proof available
PendingAttestation still being finalized
FailedRequest did not meet verification requirements

ZDR (Zero Data Retention) models routed through Vercel AI Gateway do not produce hardware attestation receipts. See Platform trust model for TEE vs ZDR trade-offs.

Error handling

401 Unauthorized — missing, malformed, or revoked API key. Confirm the Authorization: Bearer header is present and the key is active in the console.

What's next

On this page