```python # Synchronous Example from openrouter import OpenRouter import os with OpenRouter( http_referer="", x_open_router_title="", x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: res = open_router.analytics.get_user_activity() # Handle response print(res) ```
The same SDK client can also be used to make asynchronous requests by importing asyncio. ```python # Asynchronous Example import asyncio from openrouter import OpenRouter import os async def main(): async with OpenRouter( http_referer="", x_open_router_title="", x_open_router_categories="", api_key=os.getenv("OPENROUTER_API_KEY", ""), ) as open_router: res = await open_router.analytics.get_user_activity_async() # Handle response print(res) asyncio.run(main()) ```