Routescope APIRoutescope API

OpenCode

OpenCode integration guide for Routescope

Keep these values handy

OpenCode Desktop connects to Routescope through a custom provider. The five key fields are:

  • Provider ID: recommended value routescope
  • Display Name: recommended value Routescope
  • Base URL: https://api.routescope.ai/v1
  • API Key: the full sk-... secret
  • Model: a model enabled for your account, such as gpt-5.4

Step 1: Create a key in Routescope

  1. Sign in to Routescope.
  2. Open Token Management.
  3. Click Add Token and save it.
  4. In the token list, click Copy Secret to get the full sk-... value.

If you want OpenCode to be a separate integration scenario, create a dedicated token for it. That makes quota, permission, and usage troubleshooting much easier later.

Step 2: Parameter mapping

OpenCode fieldValueNotes
Provider IDroutescopeThe provider's unique identifier; lowercase is recommended
Display NameRoutescopeOnly affects UI presentation
Base URLhttps://api.routescope.ai/v1/v1 is required
API Keysk-...Use the full secret and keep the sk- prefix
Modelgpt-5.4 or similarReplace it with a model available in your account

Step 3: Open OpenCode settings

In OpenCode Desktop, click the settings button in the lower-left corner.

Open OpenCode settings

Step 4: Open the provider page

In settings, choose Providers from the left menu.

Open provider settings

If you do not immediately see Custom Provider, click Show More Providers at the bottom.

Show more providers

Step 5: Choose the custom provider

In the provider list, find Custom or Custom Provider, then click Connect.

Choose the custom provider

Step 6: Fill in the Routescope configuration

Fill the custom provider form like this:

FieldValue
Provider IDroutescope
Display NameRoutescope
Base URLhttps://api.routescope.ai/v1
API Keysk-your-full-secret
Model IDFor example gpt-5.4
Model Display NameFor example GPT-5.4

Fill in the Routescope custom provider form

Use a model available to your account

gpt-5.4 is only an example. In practice, use a model name that is enabled for your Routescope account and allowed by the current token.

After filling in the form, click Submit or Connect. Once saved successfully, OpenCode will show Routescope as a new provider in the model selection list.

Step 7: Choose a model and verify

The simplest verification is to enter this inside OpenCode:

Reply with "OpenCode is connected to Routescope", then list the top-level directories in the current project.

If it returns normally, the configuration is working.

FAQ

Should the Provider ID be Routescope or routescope

Use routescope. The Provider ID is an internal identifier, and many versions expect lowercase letters, digits, hyphens, or underscores. The display name can still be Routescope for readability in the UI.

What should I use for Base URL

Use:

https://api.routescope.ai/v1

Do not use only https://api.routescope.ai, and do not accidentally duplicate it as https://api.routescope.ai/v1/v1.

What if I can't find the model I just added

Go back to Settings > Providers and confirm the custom provider was saved successfully. Then check that the model ID exactly matches a model name available in the Routescope console.

What should I do if I get 401 or 403

Check these items first:

  1. Whether the API key is the full sk-... secret
  2. Whether the Base URL is exactly https://api.routescope.ai/v1
  3. Whether the model is allowed by the current token
  4. Whether the token is expired, disabled, or out of balance

Last updated on