import requests API_URL = "https://.endpoints.huggingface.cloud" headers = { "Accept" : "application/json", "Authorization": "Bearer hf_XXXXX", # <- use your own Hugging Face token with Inference Endpoints access "Content-Type": "application/json" } def query(payload): response = requests.post(API_URL, headers=headers, json=payload) return response.json() output = query({ "inputs": "underwater footage, beautiful clownfishes swimming around coral", "parameters": {} })