import requests# Fill valuesapi_key =# Your API key hereurl ='https://app.maax.ai/api/initiate_answer_generation/'headers ={'2hd-api-key': api_key}service_type =# 'customer_support_automation' or 'sales_automation' platform =# sms, email, or websiteai_id =# if sales_ai, input ai_id from your dashboard. If customer_ai, delete linefollowup_url =# webhook you set to catch follow-ups from Maaxmessage_content = input_data['message_content']phone_number = input_data.get('phone_number', '')first_name = input_data.get('first_name', 'unknown')# End fill valuesdata ={'service_type': service_type,'platform': platform,'ai_id': ai_id,'followup_url': followup_url,'message_content': message_content,'prospect_info':{'phone': phone_number,'first_name': first_name}}# POST requesttry: response = requests.post(url, json=data, headers=headers) response.raise_for_status() output = [response.json()]except requests.exceptions.RequestException as e: error_message =str(e) output ={"error": error_message}