import aiohttp import json import base64 async def spoof_trigger(b64): url = "https://spoofapi1.azurewebsites.net/api/spoofvisualize" payload = {"img": b64} headers = { 'x-functions-key': 'wGw3zXXPlLCez-VrcSs9RTahE4gLC674pf7Fp6Au2kUHAzFuNnZZMw==', 'Content-Type': 'text/plain' } async with aiohttp.ClientSession() as session: async with session.post(url, json=payload, headers=headers) as response: response_text = await response.text() spoof_res = json.loads(response_text) return spoof_res a = input('input:') x = spoof_trigger(a) print(x)