Migrate from OpenRouter
Move OpenRouter code to BigModel.io by changing the base URL and key. Provider-prefixed model IDs and the models fallback array keep working.
Most OpenRouter code works on BigModel.io after two changes: the base URL and the API key.
| OpenRouter feature | BigModel.io |
|---|---|
provider/model IDs | Accepted; the provider prefix is removed |
| models fallback array | Supported; only the attempt that succeeds is charged |
HTTP-Referer / X-Title | Supported |
provider, transforms, route | Ignored |
:free suffix | Not removed; use the plain ID from the directory |
Change two lines
base_url = "https://bigmodel.io/v1"
api_key = "sk-..." # your BigModel.io keyFull migration guideModel ID mapping, headers, streaming and the differences to check before switching.
Read the guide