<?php/*Plugin Name: AutoIA Proxy
      * Description: Proxy Claude API
      * Version: 1.0
      * */
if(!defined('ABSPATH'))exit;
add_action('rest_api_init',function(){
	    register_rest_route('autoia/v1','diagnostico',array(
		        'methods'=>'POST',
		        'callback'=>'autoia_handle',
		        'permission_callback'=>'__return_true'
		    ));
});
function autoia_handle($req){
	    $key='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';
	    $resp=wp_remote_post('https://api.anthropic.com/v1/messages',array(
		        'headers'=>array(
				            'Content-Type'=>'application/json',
				            'x-api-key'=>$key,
				            'anthropic-version'=>'2023-06-01'
				        ),
		        'body'=>$req->get_body(),
		        'timeout'=>60,
		        'data_format'=>'body'
		    ));
	    if(is_wp_error($resp))return new WP_REST_Response(array('error'=>$resp->get_error_message()),500);
	    return new WP_REST_Response(json_decode(wp_remote_retrieve_body($resp)),wp_remote_retrieve_response_code($resp));
}
}
})<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="https://autoia.nexteragroup.com.br/sitemap-stylesheet.xsl"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:xhtml="http://www.w3.org/1999/xhtml">
  <url>
    <loc>https://autoia.nexteragroup.com.br/form/simple-contact-form/</loc>
    <lastmod>2026-04-25T14:03:22+00:00</lastmod>
  </url>
</urlset>
