Routescope APIRoutescope API
Client Tool Setup

OpenCode

Connect OpenCode Desktop to Routescope through a custom OpenAI-compatible provider

Keep these values handy

OpenCode Desktop connects to Routescope through Custom Provider:

  • Provider ID: routescope
  • Display Name: Routescope
  • Base URL: https://api.routescope.ai/v1
  • API Key: full sk-...
  • Model: an account-enabled model such as gpt-5.4

Step 1: Create a Key in Routescope

Follow Get Base URL and API Key to create a token and copy the full sk-... secret. If OpenCode is a separate use case, create a dedicated token for easier quota and usage tracking.

Step 2: Parameter Mapping

OpenCode FieldValueNotes
Provider IDroutescopeUnique provider identifier; lowercase is recommended
Display NameRoutescopeOnly affects UI display
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 with an available model

Step 3: Open OpenCode Settings

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

Step 4: Open Providers

In settings, choose Providers from the left menu. If Custom Provider is not immediately visible, click Show More Providers.

Step 5: Choose Custom Provider

Find Custom or Custom Provider in the provider list and click Connect.

Step 6: Fill in the Routescope Configuration

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

Use a model available to your account

gpt-5.4 is only an example. Use a model enabled for your account and allowed by the current token.

Step 7: Choose a Model and Verify

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

FAQ

Should Provider ID be Routescope or routescope?

Use routescope. Provider ID is an internal identifier, and many versions prefer lowercase letters, digits, hyphens, or underscores. Display Name can be Routescope.

What should Base URL be?

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

What if I cannot find the model I just added?

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

What should I do for 401 / 403?

Check whether the API Key is complete, whether Base URL includes /v1, whether the model is allowed by the token, and whether the token is expired, disabled, or out of quota.

How is this guide?

Last updated on