Auth & API keys
Orchestate has two authentication surfaces: API keys authenticate programmatic access from the SDK and REST API, and a browser session authenticates the console and the Live Inspector WebSocket. This page explains both, plus how accounts and teams sign in.
API keys
API keys are the primary mechanism for authenticating against the HTTP API and the @orchestate/sdk client. Every key is scoped to a single organization, so a key can only read and write machines and instances that belong to its org.
Key format
A key is the prefix orch_ followed by 48 lowercase hex characters (24 random bytes), for example:
orch_3f9a2b1c8d4e5f60718293a4b5c6d7e8f90a1b2c3d4e5f60Keys are generated in the console and the full secret is shown exactly once at creation time. Copy it immediately and store it somewhere safe — Orchestate keeps only a SHA-256 hash of the key, so the raw value can never be recovered or displayed again. If you lose a key, revoke it and create a new one.
For display purposes the console retains a 12-character prefix (e.g. orch_3f9a2b1) so you can identify a key in the list without exposing the secret.
Sending a key
Pass the key in the Authorization header using the Bearer scheme on every request to the REST API:
curl https://orchestate.wentzel.ai/api/machines \
-H "Authorization: Bearer orch_YOUR_API_KEY"The SDK takes the same key on its constructor and attaches the header for you on every call:
import { OrchestateClient } from '@orchestate/sdk';
const client = new OrchestateClient({
apiKey: process.env.ORCHESTATE_API_KEY!,
});
const machines = await client.machines.list();Note — requests without a valid Authorization: Bearer orch_… header are rejected with 401. GET /api/health is not an exception on this surface: it is internal-only (Cloudflare Access or the service-binding secret), and an anonymous request receives a bare 404.
Creating and revoking keys
Keys are managed entirely in the console:
- Sign in to the console and open Settings → API Keys.
- Enter a descriptive name and click Create key. The console does not offer an expiry setting at creation.
- Copy the raw key from the one-time reveal dialog and store it securely.
- To retire a key, click Revoke. Revocation takes effect immediately — subsequent requests with that key return
401.
Keys are org-scoped and can be revoked at any time. If a key has a stored expiry, that expiry is still enforced. An expired or revoked key is rejected the same way an unknown key is.
Security best practices
Note — treat API keys like passwords:
- Store keys in environment variables (or a secrets manager), never in source code or client-side bundles.
- Never commit a key to version control. If a key leaks, revoke it immediately and issue a replacement.
- Rotate keys regularly — create a replacement, update your services, then revoke the old key.
- Use least privilege — issue separate keys per service or environment so you can revoke one without disrupting the others.
Account authentication (console sign-in)
The console itself is protected by an email-and-password account with optional social sign-in. These flows are how humans get into the dashboard; the API and SDK do not use them.
Getting access
Orchestate is in private beta, so accounts are invite-only. Request access and we will invite your email address.
Signing in with your invited email
- Set a password — choose reset password on the login screen and follow the link emailed to you (minimum 8 characters).
- Log in with your invited email and password. The email must be verified before it can sign in.
- GitHub or Google — sign in with an account that uses your invited email.
- Magic link — request a one-time sign-in link sent to your invited email.
Two-factor authentication is available on accounts for an extra layer of protection.
Teams and roles
Accounts belong to an organization. Organization owners and admins have all workflow permissions, including managing workflow role assignments. Other organization members receive permissions through a role on each workflow; membership without a workflow grant defaults to viewer access. Without organization membership, no workflow access is granted.
Workflow roles are separate from organization roles. Editing includes publishing machine definitions; running includes starting and controlling instances. Each workflow role grants only the capabilities listed below, and none grants workflow role management.
| Workflow role | Capabilities |
|---|---|
| editor | View and edit (including publish). Cannot run instances or approve gates. |
| operator | View and run instances. Cannot edit or approve gates. |
| approver | View and approve gates. Cannot edit or run instances. |
| viewer | View only. Cannot edit, run instances, or approve gates. |
API keys inherit the organization they are created in, not an individual member's role.
Session auth for the Live Inspector
The Live Inspector streams an instance's state transitions over a WebSocket at GET /api/inspect/{instanceId}. Unlike the REST API, the inspector is authenticated by your logged-in browser session cookie — not an API key.
For that reason, the SDK's client.instances.subscribe() helper is intended to run from an authenticated browser context, where the browser sends the session cookie automatically with the WebSocket upgrade (the SDK also appends a key parameter to the socket URL, but the server ignores it in favor of the session). It opens the inspector connection and invokes your callback with each { value, context } update, returning an unsubscribe function:
// Runs in an authenticated browser session, not server-to-server.
const unsubscribe = client.instances.subscribe(instanceId, (state) => {
console.log(state.value, state.context);
});
// Later, to close the WebSocket:
unsubscribe();Note — because the inspector relies on the session cookie, you cannot subscribe to it from a backend service using an API key. Use the REST endpoints (or the SDK's machines and instances methods) for server-to-server automation, and reserve the inspector for live, in-browser observation.
See also
- HTTP API — full endpoint reference and error shapes.
- SDK reference — the
OrchestateClientmethods in detail.