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.
- Open gateway.orgn.com and sign in with id-orgn.
- Navigate to API Keys.
- 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:
Authorization: Bearer YOUR_API_KEY
Content-Type: application/jsonMake your first request
Production API base URL:
https://api.gateway.orgn.com/v1Example: TEE chat completion (curl)
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
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:
| Status | Meaning |
|---|---|
| Verified | Request executed inside a verified Trust Domain; cryptographic proof available |
| Pending | Attestation still being finalized |
| Failed | Request 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
- Model catalog — TEE vs ZDR model selection
- OpenAI SDK integration — drop-in SDK migration
- Security model — threat boundaries and data handling
- API reference — full OpenAPI specification
ORGN Gateway
ORGN Gateway is the confidential inference API and console — OpenAI-compatible routing to TEE models with attestation receipts or ZDR frontier models with policy zero retention.
Authentication
Authenticate to ORGN Gateway with API keys for programmatic access or id-orgn SSO for the console. Covers Bearer token format, key management, and security best practices.