There are two options to connect Tidewave Web to OpenRouter:

The OPENROUTER_API_KEY environment variable

You optionally set the OPENROUTER_API_KEY environment variable in your Tidewave app and OpenCode should automatically pick it up. Click on the Tidewave icon in your menu bar (top-right on macOS and Linux, bottom-right on Windows) and then on "Settings...". Doing so will open a file where you can add the desired environment variables, for example:

# This file is used to configure the Tidewave app.
# If you change this file, you must restart Tidewave.

[env]
OPENROUTER_API_KEY = "sk-or-v1-..."

If you are using the CLI, you can set those variables when starting the CLI. You may also set the environment variable in the session that starts your web server and Tidewave Web should automatically pick it up too.