Skip to main content
OpenWork works with any model you have access to. If the provider is in OpenWork’s catalog (OpenRouter, Mistral, Fireworks, Google, Anthropic, OpenAI, and many more), paste your API key under Settings > AI Providers > Connect provider. If it is not, or you run your own gateway, add it as a custom OpenAI-compatible provider in your workspace’s opencode.jsonc.
Local provider setup. A custom provider can stay entirely in your workspace. OpenWork remains free, and you do not need to sign in to OpenWork Cloud. To give a whole team the same provider without sharing keys by hand, see Share a provider with your team.

Option 1: Bring your own API key for a catalog provider

OpenWork lists every provider in the OpenCode model catalog that accepts an API key.
  1. Create an API key in the provider’s console. Copy it once and treat it like a password.
  2. In OpenWork, open Settings and choose AI Providers.
  3. Click Connect provider.
  4. Type the provider’s name in Search providers (for example, openrouter, mistral, or fireworks) and select it.
  5. Paste the key into the API key field and save.
  6. Choose one of the provider’s models in the chat model picker.
For a step-by-step example with screenshots, see Add an Anthropic API key.

Option 2: Add any OpenAI-compatible endpoint

Use this for an AI gateway (LiteLLM, a hosted router, or one you built), an Azure OpenAI or Azure AI Foundry deployment, a self-hosted model server, or any provider not in the catalog. The endpoint must speak the OpenAI Chat Completions API. Because OpenWork is built on OpenCode, anything you can configure in an OpenCode config file works here. Keep the setting with the workspace rather than in your global ~/.config/opencode/opencode.json.
  1. Collect the endpoint’s base URL (usually ending in /v1), the model IDs it serves, and an API key if it needs one.
  2. Open your workspace folder and edit opencode.jsonc in its root. Create it if it does not exist.
  3. Add a provider entry:
  4. Make MY_GATEWAY_API_KEY available to OpenWork: open Settings > Environment, click Add variable, save the key, and apply the change. Secrets saved there stay on this device. You can also set the variable in your shell before starting OpenWork. Omit apiKey if the endpoint does not need one.
  5. Run Reload OpenCode config from the command palette, or restart OpenWork.
  6. Pick the new model in the chat model picker and send a short test prompt.
Add one entry under models for every model ID the endpoint exposes.

Examples

For Ollama, the built-in Settings > Ollama screen writes this config for you. See Use local models.

Share a provider with your team

If several people need the same provider, have an OpenWork Cloud admin add it once instead of passing keys around: Org providers sync to members’ apps automatically. Members can check their status under Settings > AI Providers > Cloud providers. Admins can also block locally added providers with desktop policies so everyone uses the approved setup.

FAQ

Yes. OpenRouter is in the provider catalog: open Settings > AI Providers > Connect provider, search for OpenRouter, and paste your key.
Yes, if it exposes an OpenAI-compatible endpoint. Add it with Option 2 for yourself, or ask an admin to add it once as a custom LLM provider for the team.
Keys entered in Connect provider are stored by the local OpenCode engine on your computer. Values saved in Settings > Environment stay on this device. Org-managed keys are stored in OpenWork Cloud and synced to the workspaces that are allowed to use them.
Some models or gateways do not support tool calling. Try a model that advertises tool or function calling support, and check the gateway passes tool definitions through.
Your admin has blocked locally added providers. Use the providers your organization shares (see Settings > AI Providers > Cloud providers), or ask your admin to add the one you need.