Origin Docs
Integrations

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

ApproachBest forDocumentation
Direct HTTPAny language, curl, custom clientsGateway Quickstart
OpenAI SDKPython, Node, and other OpenAI SDK usersOpenAI SDK guide
Vercel AI SDKNext.js, React, streaming appsVercel AI SDK
IDE toolsCursor, VS Code, Cline, Roo CodeOpenAI-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

EndpointMethodPurpose
/v1/chat/completionsPOSTChat and text generation
/v1/modelsGETList available models
/v1/embeddingsPOSTText embeddings
/v1/audio/transcriptionsPOSTSpeech-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" }
    ]
  }'
openai-sdk.js
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:

TypeID prefixAttestationVerification
TEEnear_*, phala_*Per-request receiptscanner.orgn.com
ZDRvercel_*NonePolicy-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:

SettingValue
Base URLhttps://api.gateway.orgn.com/v1
API keysk-ollm-* from the console
ModelAny 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:

  1. Send a request through your integration.
  2. Open scanner.orgn.com and locate the request.
  3. 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:

GuideDescription
OpenAI SDKDrop-in migration from OpenAI
OpenClawOpenClaw agent integration
ScrapingWeb scraping with Gateway models
MigrationGeneral migration checklist

What's next

On this page