Turn it on
An admin has to allow it first:- In OpenWork Cloud, open AI Gateway and select the API Keys tab.
- At the top, turn on Allow 3rd party tools & harnesses.
Create a key
- Open My Library and select the Models tab.
- Under Use OpenWork AI Gateway with other tools, select Create key. Or, under Set up, select your tool’s logo and then Create key: the key is filled into that tool’s setup steps.
- Give the key a name, for example the tool and computer you’ll use it on
(
Claude Code on my laptop). - Choose when it expires: in 7 days, 30 days, 90 days (the default), 1 year, or never.
- Select Create key, then copy the key.
Authorization: Bearer <key> or
x-api-key: <key>.
Smart Routers that apply to you work through
your key too. In Cursor, Claude Code and Codex they’re listed as
openwork/smart-<router name>-<4 characters>; other OpenAI compatible tools
call them as openwork-smart-<router id> on /chat/completions.
Manage your keys
My Library › Models lists your keys with their name, the first characters of the key, when each expires and when it was last used.- Use one key per tool. Revoking one then doesn’t break the others, and Last used tells you which tools are still active.
- Prefer keys that expire. An expired key stops working and shows Expired in red. Create a new one to replace it, then revoke the old one.
- Revoke keys you don’t use. Open the key’s menu and select Revoke. Tools using it stop working on their next request. This can’t be undone.
For admins
AI Gateway › API Keys has the Allow 3rd party tools & harnesses switch at the top, then every key in the organization: its name, the member it belongs to, when it was created, when it expires and when it was last used.- Seeing the tab needs the View Gateway providers permission.
- Revoking someone else’s key needs Manage Gateway providers.
- When someone leaves the organization, their keys are revoked with the rest of their access.
- While the switch is off, the keys are still listed with a notice that they are currently not valid.
When a key stops working
A tool gets401 invalid_api_key when its key was revoked, has expired, or 3rd
party tools are turned off for your organization. Check the key in My Library
› Models.