Skip to main content
Opencode lets you add a custom provider through its AI SDK support, so you can point it at a Valkyrie deployment over the OpenAI-compatible API.

The quick way: from the endpoint page

1

Open the endpoint

In the dashboard, open Endpoints and click the endpoint you want to use. It can be running, paused, or off on its schedule.
2

Create a key for it

Click Create a key for this endpoint and give the key a name, for example opencode laptop.
3

Paste the config

The key is shown once, with an OpenCode tab holding a ready-to-paste provider block: the endpoint’s base URL, the key and the model name. Merge it into your Opencode config, global at ~/.config/opencode/opencode.json or per-project at ./opencode.json, then pick the model in Opencode.
You can create a key for any endpoint you may use, including one shared with you or owned by your organization. See Create a key for an endpoint.
The URL works only while the endpoint is running. An endpoint that is Off (schedule) starts again by itself at the time its badge shows, for example Off (schedule) · starts Tue 09:00; until then Opencode’s requests fail. A paused or idle-stopped endpoint needs someone to resume or start it. The endpoint’s page and the Endpoints list show its status and schedule, see Deployment status.

Configure the provider by hand

The pasted block looks like this. To write it yourself, use the endpoint’s URL from its page (shown while it runs) and a key from API keys:
Then export your key and start Opencode:
The baseURL ends in /v1. Use your deployment slug or an alias in place of {deployment_slug}, and set your-model-id to the model your deployment serves (the endpoint page shows it next to Create a key for this endpoint). {env:VAR} reads the key from the environment so it never lands in the config file.

A real example

Against Valkyrie’s shared Qwen deployment (alias qwen, model RadixArk/Qwen3.8-27B-NVFP4):