import requests as r ENDPOINT_URL = "" HF_TOKEN = "" payload = {"inputs": "What is the capital of France?"} response = r.post(ENDPOINT_URL, headers={"Authorization": f"Bearer {HF_TOKEN}"}, json=payload) print(response.json())