---
title: "OpenCode with RelaySwitch"
canonical: https://relayswitch.io/guides/opencode
generated: 2026-10-27T11:04:12.232Z
source: https://api.relayswitch.io/v1/catalog
base_url: https://api.relayswitch.io/v1
---

Checked 2026-10-26

# OpenCode with RelaySwitch

Point OpenCode at RelaySwitch for coding models with one prepaid key.

Point OpenCode at RelaySwitch for coding models with one prepaid key. RelaySwitch uses an OpenAI-compatible endpoint at `https://api.relayswitch.io/v1`; create a key in the console, choose a model id from the catalog, and set the base URL in this tool.

## 01Connection settings

1.  Open the tool's provider or API settings.
2.  Set the base URL to `https://api.relayswitch.io/v1`.
3.  Set the API key to your `sk-relay-` key.
4.  Choose a model id from the [Models page](https://relayswitch.io/models).

## 02Billing

Requests bill input and output tokens from a prepaid USD balance. Top up by card or crypto; there is no subscription and no identity check.

## 03Troubleshooting

A 401 means the key is missing or revoked; 402 means the balance is too low; 404 means the model id is not in the catalog; 429 means the key rate limit was reached. See the [API docs](https://relayswitch.io/docs) for the complete error table.

## Questions

Does this work with every model?

Use any model id shown on the live Models page; the same base URL and key apply.

How do I pay?

Top up by card or crypto from the console.

Related

-   [All guides](https://relayswitch.io/guides)
-   [Open WebUI](https://relayswitch.io/guides/open-webui)
-   [LangChain](https://relayswitch.io/guides/langchain)
-   [Cline](https://relayswitch.io/guides/cline)
-   [Roo Code](https://relayswitch.io/guides/roo-code)
-   [Kilo Code](https://relayswitch.io/guides/kilo-code)
-   [OpenClaw](https://relayswitch.io/guides/openclaw)
-   [Chub AI](https://relayswitch.io/guides/chub-ai)
-   [How pricing works](https://relayswitch.io/pricing)
-   [Pay by card or crypto](https://relayswitch.io/pay-with-crypto)
-   [Docs](https://relayswitch.io/docs)

## One key for every tool

Prepaid from $10 by card or crypto. No KYC, no subscription.

[Models](https://relayswitch.io/models)[Get a key](https://app.relayswitch.io/console/login)

