WordAiService.php
1.0 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?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;
}
}
}