WordAiService.php 1.0 KB
<?php
/**
 * @remark :
 * @name   :WordAiService.php
 * @author :lyh
 * @method :post
 * @time   :2025/11/19 17:40
 */

namespace App\Services;

use Illuminate\Support\Facades\Http;

class WordAiService
{
    public $email = 'bill@ai.cc';

    public $key = '868545714b911ab135327793fcadf46e';

    public $url = 'https://wai.wordai.com/';

    /**
     * @remark :ai检测(WordAi 避免检测到)
     * @name   :setApiAvoid
     * @author :lyh
     * @method :post
     * @time   :2025/11/19 17:43
     */
    public function setApiAvoid($input = '',$model = 'change_less')
    {
        $response = Http::timeout(300)->retry(3, 5000)
            ->post($this->url.'/api/avoid', [
            'email' => $this->email,
            'key' => $this->key,
            'input' => $input,
            'mode' => $model
        ]);
        if ($response->successful()) {
            $result = $response->json();
            // 处理返回结果
            return $result;
        } else {
            // 处理错误
            return false;
        }
    }

}