Gateway Integrations
Integrate ORGN Gateway into your applications with OpenAI-compatible SDKs, the Vercel AI SDK, and direct HTTP. One API key, hundreds of models, TEE and ZDR execution.
ORGN Gateway exposes an OpenAI-compatible API at https://api.gateway.orgn.com/v1. Existing applications, SDKs, and tools that speak the OpenAI wire format can route inference through Gateway with minimal changes — swap the base URL, add your sk-ollm-* API key, and select a model.
Authentication is always Authorization: Bearer sk-ollm-YOUR_API_KEY. Model IDs use underscores (near_qwen3_30b, vercel_claude_sonnet_4_6) — not slashes.
Integration options
| Approach | Best for | Documentation |
|---|---|---|
| Direct HTTP | Any language, curl, custom clients | Gateway Quickstart |
| OpenAI SDK | Python, Node, and other OpenAI SDK users | OpenAI SDK guide |
| Vercel AI SDK | Next.js, React, streaming apps | Vercel AI SDK |
| IDE tools | Cursor, VS Code, Cline, Roo Code | OpenAI-compatible provider config |
All approaches hit the same endpoint and support the same model catalog. The model you select determines execution security — TEE or ZDR — not the client library.
Core endpoints
| Endpoint | Method | Purpose |
|---|---|---|
/v1/chat/completions | POST | Chat and text generation |
/v1/models | GET | List available models |
/v1/embeddings | POST | Text embeddings |
/v1/audio/transcriptions | POST | Speech-to-text (Whisper) |
See Response anatomy for the full request and response contract, including attestation metadata on TEE model responses.
Minimal integration
curl -X POST https://api.gateway.orgn.com/v1/chat/completions \
-H "Authorization: Bearer sk-ollm-YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "phala_deepseek_r1",
"messages": [
{ "role": "user", "content": "Hello" }
]
}'import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.OLLM_API_KEY, // sk-ollm-...
baseURL: "https://api.gateway.orgn.com/v1",
});
const completion = await client.chat.completions.create({
model: "near_qwen3_30b",
messages: [{ role: "user", content: "Hello" }],
});Model selection and execution types
Gateway does not auto-route models. The model field in your request explicitly selects the execution environment:
| Type | ID prefix | Attestation | Verification |
|---|---|---|---|
| TEE | near_*, phala_* | Per-request receipt | scanner.orgn.com |
| ZDR | vercel_* | None | Policy-enforced retention |
Not all models are TEE. ZDR models provide zero data retention through Vercel provider agreements without hardware attestation. Choose the execution type that matches your compliance requirements.
Discover models at runtime rather than hardcoding IDs:
curl https://api.gateway.orgn.com/v1/models \
-H "Authorization: Bearer sk-ollm-YOUR_API_KEY"Or browse the catalog in the Gateway console Model List.
IDE and tool configuration
Any tool that supports a custom OpenAI-compatible endpoint can use Gateway:
| Setting | Value |
|---|---|
| Base URL | https://api.gateway.orgn.com/v1 |
| API key | sk-ollm-* from the console |
| Model | Any underscore-format ID from the catalog |
Create a separate API key per environment (development, staging, production) to simplify rotation.
Verifying TEE inference
After integrating a TEE model, verify attestation independently:
- Send a request through your integration.
- Open scanner.orgn.com and locate the request.
- Inspect attestation status (Verified, Pending, or Failed) and cryptographic signatures.
Verification happens in Scanner, not the Gateway console or your application client. See Verification for the attestation flow.
Guides
Step-by-step migration and integration guides for common stacks:
| Guide | Description |
|---|---|
| OpenAI SDK | Drop-in migration from OpenAI |
| OpenClaw | OpenClaw agent integration |
| Scraping | Web scraping with Gateway models |
| Migration | General migration checklist |
What's next
- Vercel AI SDK —
@orgn/gatewayprovider setup - Response anatomy — request and response structure
- Authentication — API keys and SSO
- API reference — full OpenAPI specification
Sandboxes
The Gateway console Sandboxes view provides read-only monitoring of compute sandboxes running under your organization. Sandboxes are created in ORGN Studio and CDE — not from this dashboard.
ORGN Gateway with the Vercel AI SDK
Integrate ORGN Gateway with the Vercel AI SDK via @orgn/gateway — TEE models with attestation receipts or ZDR frontier models through one provider.