set_api_key
Store your OpenRouter API key in the config file as an alternative to setting an environment variable, so the server can authenticate requests to 200+ models.
Instructions
Store your OpenRouter API key in the config file (alternative to environment variable)
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"api_key": "<api_key>"
},
"name": "set_api_key"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api_key | Yes | Your OpenRouter API key (starts with sk-or-) |