1. Prepare the accounts and keys
- Have the member sign up and join your OpenWork organization.
- As an owner or admin, create an organization API key in OpenWork Cloud. Its owner needs Manage people’s provider keys to provision member keys. Authenticate scripts with
x-api-key, notAuthorization: Bearer. - Find the organization ID and the member’s organization membership ID (
om_…), not their user ID (usr_…).GET /v1/orgreturnsorganization.idand themembersroster; match bymembers[].user.emailand use that entry’sid. - In TrueFoundry, issue a key scoped to that person and the models they may use. Use your TrueFoundry deployment’s supported token type and issuance process. Do not distribute an administrative token or reuse one person’s key for everyone. A personal access token can carry permissions beyond inference; confirm its scope before deploying it to a laptop.
For TrueFoundry’s hosted gateway, the root tested with this recipe is
https://gateway.truefoundry.ai. Self-hosted URLs can differ. With the member’s key, check GET <root>/models and use the exact ID returned, including any prefix such as openai/. Never assume an administrator and a member see the same models.
2. Create the provider and push the member’s key
Run this Python 3 script in your trusted provisioning environment. It uses only the standard library. It creates a provider granted to this member, then stores their key through the dedicated provisioning endpoint. It prints only the provider ID and credential state, not either key.lpr_… provider ID. For another granted member or a key rotation, set OPENWORK_PROVIDER_ID and repeat the PUT with that member’s membership ID and new key. Grant additional people or teams access to the provider in OpenWork Cloud first. For concurrent provisioners, use expectedVersion; see the full credential API.
Provider creation sends no TrueFoundry key. Only the admin member-credential
PUT accepts a key from an organization API key. Creating or editing a provider with a key, testing an unsaved key, or writing my-credential with an API key still returns secure_entry_required. The OpenWork agent cannot submit a key through this exception.3. Check the desktop
- Sign into the desktop app and select the same organization.
- Let organization providers sync. Select the TrueFoundry model in the composer and send a short message.
- Check TrueFoundry’s request or usage logs to confirm the expected upstream identity received the request.
4. Rotate or remove access
Issue the replacement key in TrueFoundry,PUT it for the same membership, and let the desktop sync before revoking the old key. To cut off access immediately, revoke or block the key in TrueFoundry. You can also mark the OpenWork binding blocked with:
Boundaries
- TrueFoundry enforces the key’s access and attributes usage. This path does not add OpenWork AI Gateway usage accounting, or automatically provision TrueFoundry accounts or tokens.
- The model list is configured per OpenWork provider, not discovered separately for each member. A displayed model can still be rejected by TrueFoundry if that key cannot use it. Use separate providers or model lists when you need different picker options for different audiences.
- Den encrypts stored keys. The write response, binding list and audit log do not expose them. The signed-in member’s connect endpoint intentionally delivers their own key to the desktop; it is not a promise of hiding keys from end users or their local agents.
- This tutorial covers desktop inference. Do not assume it enables Workbot or other AI Gateway-only surfaces.