Files
openrouter-python-sdk-retry…/examples
2025-08-22 10:31:13 -05:00
..
2025-08-22 10:31:13 -05:00
2025-08-22 10:31:13 -05:00
2025-08-22 10:31:13 -05:00
2025-08-22 10:31:13 -05:00
2025-08-22 10:31:13 -05:00

Run SDK examples with uv

This guide explains how to create and activate a Python virtual environment on macOS, install necessary dependencies, and run the .py scripts.

Steps to Set Up and Run the Script

Prerequisites

Configure auth

  • Rename .env.template to .env and populate the .env file with your client ID and secret
OPENROUTER_API_KEY=""

Run the script with the .env values

 cd examples/
 uv run --env-file=.env script.py