from fastapi import FastAPI import httpx app = FastAPI() @app.get('/proxy') async def proxy(): async with httpx.AsyncClient() as c: r = await c.get('https://api.example.com') return r.json()