Docs
Create an API key and call OpenDoor chat completions in five steps.
Get started
OpenDoor is an OpenAI-compatible gateway. You authenticate with a workspace key (opd_…), then call /v1/chat/completions on the hosted gateway.
| URL | |
|---|---|
| Dashboard | https://opendoor-gcp.web.app |
| Gateway | https://opendoor-gateway-u5ojp4qjiq-uc.a.run.app |
| These docs | https://opendoor-gcp.web.app/docs |
Copy-paste blocks below use https://opendoor-gcp.web.app. On this site that is NEXT_PUBLIC_GATEWAY_URL when the dashboard is running, otherwise the Cloud Run gateway.
Five steps
- Create a workspace at https://opendoor-gcp.web.app/get-started (or sign in).
- Mint a key in Dashboard → API keys. The secret is shown once. It starts with
opd_. - Export the key and base URL (gateway origin, no
/v1suffix). - List live models with
GET /v1/models. Pick an id withdeployment_status: "live". - Send a chat completion to
POST /v1/chat/completions.
bashexport OPENDOOR_API_KEY=opd_… export OPENDOOR_BASE_URL=https://opendoor-gcp.web.app curl "$OPENDOOR_BASE_URL/v1/models" \ -H "Authorization: Bearer $OPENDOOR_API_KEY" curl "$OPENDOOR_BASE_URL/v1/chat/completions" \ -H "Authorization: Bearer $OPENDOOR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "gemma-4-26b-a4b-it", "messages": [{"role":"user","content":"Hello from OpenDoor"}] }'
gemma-4-26b-a4b-it is a Vertex MaaS id on the hosted catalog. Always prefer an id from GET /v1/models for your workspace.
Local gateway is http://localhost:3001 when you run this repo. Same paths, same OPENDOOR_API_KEY.
Auth
Every /v1/* route needs:
Authorization: Bearer $OPENDOOR_API_KEY
Keys are hashed. The dashboard never stores the full secret after create. Revoke from the same API keys page.
SDKs
JavaScript (@opendoor/sdk in this repo) — base URL is the gateway origin (no /v1):
tsimport { OpenDoor } from "@opendoor/sdk"; const client = new OpenDoor({ apiKey: process.env.OPENDOOR_API_KEY, baseURL: process.env.OPENDOOR_BASE_URL, // https://opendoor-gcp.web.app }); const chat = await client.chat.completions.create({ model: "gemma-4-26b-a4b-it", messages: [{ role: "user", content: "Hello from OpenDoor" }], }); console.log(chat.choices[0]?.message.content);
Python (packages/python-sdk) — same env vars:
pythonfrom opendoor import OpenDoor client = OpenDoor() # OPENDOOR_API_KEY + OPENDOOR_BASE_URL out = client.chat.completions.create( model="gemma-4-26b-a4b-it", messages=[{"role": "user", "content": "Hello from OpenDoor"}], ) print(out["choices"][0]["message"]["content"])
OpenAI SDK — set base_url to the gateway plus /v1:
pythonimport os from openai import OpenAI client = OpenAI( api_key=os.environ["OPENDOOR_API_KEY"], base_url="https://opendoor-gcp.web.app/v1", )
What you can call next
- Chat — streaming, tools, provider routing
- Models — live catalog
- Errors — 401 / 402 / 403 / 429 / 502
- Search — Vertex grounding, $0.10 / query, included on Enterprise
- OpenBot / Agents — hosted agents on the same key (Agents add-on)
- BYOK — org provider keys (encrypted; never returned)
- API overview —
GET /v1/catalogis the live endpoint list
Do not invent paths. GET /v1/catalog is the source of truth for what this key can hit.