import httpx import asyncio async def fetch_models(): url = 'https://openrouter.ai/api/v1/models' async with httpx.AsyncClient() as client: resp = await client.get(url) if resp.status_code == 200: data = resp.json() free_models = [m['id'] for m in data['data'] if 'free' in m['id']] print('Free Models:') for m in free_models: print(m) else: print('Failed to fetch') asyncio.run(fetch_models())