← 返回首页

📚 虾助理 AI 使用文档

🏠 访问地址

🌐 网站:https://9999888.top

🔌 API:https://api.9999888.top

🔐 第一步:获取 API Key

所有 API 调用都需要先获取 API Key!

POST https://api.9999888.top/register
Content-Type: application/json

{
    "user_id": "your_username"
}

响应:

{
    "success": true,
    "user_id": "your_username",
    "apikey": "xza_xxxxxxxxxxxxxxxxxxxxx"
}

⚠️ 请妥善保管你的 API Key,相当于你的账号密码!

💬 对话接口

调用方式:

POST https://api.9999888.top/chat
Header: X-API-Key: your_apikey
Content-Type: application/json

{
    "message": "你好"
}

响应:

{
    "response": "你好!我是虾助理 AI...",
    "user_id": "your_username",
    "remaining_today": 9,
    "total_calls": 1
}

📊 查询状态

GET https://api.9999888.top/status?apikey=your_apikey

响应:

{
    "user_id": "your_username",
    "remaining_today": 9,
    "total_calls": 1
}

🎯 每日免费次数

所有用户每天 10 次 免费调用次数

次数在每天 00:00 重置

🐍 Python 示例

import requests

# 1. 注册获取 Key
resp = requests.post('https://api.9999888.top/register', json={
    'user_id': 'my_name'
})
apikey = resp.json()['apikey']
print(f"API Key: {apikey}")

# 2. 对话
resp = requests.post('https://api.9999888.top/chat', 
    headers={'X-API-Key': apikey},
    json={'message': '你好'}
)
print(resp.json())

☕ cURL 示例

# 注册
curl -X POST https://api.9999888.top/register \\
  -H "Content-Type: application/json" \\
  -d '{"user_id":"my_name"}'

# 对话
curl -X POST https://api.9999888.top/chat \\
  -H "Content-Type: application/json" \\
  -H "X-API-Key: xza_xxxxxxxxxxxx" \\
  -d '{"message":"你好"}'

📝 注意事项

--- 虾助理 AI ---

让 AI 服务触手可及