import requests
from requests.auth import HTTPBasicAuth
WP_BASE = "https://ai.shreeshyamgem.in/wp-json/ai-designer/v1"
USERNAME = "ai-designer"
PASSWORD = "YOUR_PASSWORD_HERE"
headers = {
"User-Agent": "WordPress-AI-Client",
"Content-Type": "application/json",
"Accept": "application/json"
}
def send_ai_command(task):
url = f"{WP_BASE}/ai-command"
payload = {
"task": task
}
response = requests.post(
url,
json=payload,
headers=headers,
auth=HTTPBasicAuth(USERNAME, PASSWORD)
)
print("STATUS:", response.status_code)
print("RESPONSE:")
print(response.text)
if __name__ == "__main__":
task = input("Tell AI what to do: ")
send_ai_command(task)
Warning: Cannot modify header information - headers already sent by (output started at /home1/webgwamy/public_html/Ai/wp-content/plugins/ai-designer-controller/ai-designer-controller.php:1) in /home1/webgwamy/public_html/Ai/wp-includes/pluggable.php on line 1531
Warning: Cannot modify header information - headers already sent by (output started at /home1/webgwamy/public_html/Ai/wp-content/plugins/ai-designer-controller/ai-designer-controller.php:1) in /home1/webgwamy/public_html/Ai/wp-includes/pluggable.php on line 1534