Install
Install OpenCode. Check your Rayline workspace’s available API balance.Quick setup with Rayline CLI
Install the current Rayline CLI release, then run from your project directory:Try your first task
Open your project and ask: Read the README and explain how to run this project. Choose ARC Sage for a challenging task or switch to ARC Swift for everyday work. You can see the model ARC selected and the request’s cost in Rayline Usage.Alternative: configure the provider yourself
Create a Rayline API key and load it intoRAYLINE_API_KEY in the shell that starts OpenCode. Keep it out of project files. The separate configuration below leaves your normal config file intact:
$OPENCODE_CONFIG:
{env:NAME} in keys and headers. Its baseURL includes /v1. --standalone is required with OpenCode 2 so the process uses your current configuration and environment. Project settings can still override OPENCODE_CONFIG. The configuration allows responses of up to 128,000 tokens.
This configuration has no cost entries, so OpenCode’s session cost display doesn’t show ARC charges. To show them, add a cost object to each model (input, output, cache_read and cache_write, in US dollars per million tokens) with the current rates from rayline.ai/pricing, and update it when the rates change. Check usage for actual charges.
Start with Sage:
opencode --standalone --model rayline/arc-swift-1.0. The provider prefix rayline/, where required by the tool, identifies your configured provider; the API IDs are arc-sage-1.0 and arc-swift-1.0.
For a scripted, non-interactive run, use opencode run and close standard input, or the run waits for input that never arrives:
Choose ARC in the web interface
To open the web interface, runopencode serve --service --port 4096 in the shell where you set OPENCODE_CONFIG and RAYLINE_API_KEY. Leave it running, then in a second shell run opencode pair and open the link it prints. The link works once and expires after five minutes.
After adding the provider configuration, open Settings → Models, search for arc-, and enable arc-sage-1.0 and arc-swift-1.0. The Rayline provider is listed last. This makes both models available in the session picker.


Launcher and session behavior
On a new setup,rayline run opencode selects cloud.model from your Rayline CLI settings.json, ARC Sage by default, for model, and cloud.smol_model, ARC Swift by default, for small_model. It reads the available IDs and limits for your key from Rayline Platform.
The launcher refreshes its opencode.json and supplies it through OPENCODE_CONFIG. OpenCode merges it with your global configuration; project settings take precedence. For OpenCode 2 commands that would attach to a background service, Rayline CLI adds --standalone unless you have already selected a server. See launcher options.
Launcher and manual connections use OpenCode’s native session identifiers. Resuming the same session keeps its conversation identity; see conversation grouping.
Return to your usual setup
Close OpenCode and runopencode normally from a fresh shell without OPENCODE_CONFIG. This applies to the launcher and the separate manual configuration above; your normal config file is unchanged.
Troubleshooting
- Another provider or model is used: check project overrides and the active configuration directory.
- Authentication fails: with manual configuration, check the key in the process environment. With the launcher, check
rayline auth status. - See shared troubleshooting.
ARC Dynamic
ARC Dynamic (arc-1.0) needs your value as routing.v_value on every request;
without it the request returns 400 (value_required). The model entries on this
page do not send routing, so use ARC Sage or ARC Swift in OpenCode. To route at
your own value from a coding tool, use pi with its routing extension.
ARC Dynamic uses the served model’s catalog price rather than a fixed tier
rate; see ARC Dynamic.