请求头信息:
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Accept: application/json
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
platform | string | 是 | 目标平台(xiaohongshu) |
product_name | string | 是 | 推广产品名称 |
product_category | string | 是 | 产品类目 |
target_audience | string | 否 | 目标受众描述 |
tone | string | 否 | 语气风格(humorous/urgent/professional) |
hook_count | number | 否 | 生成文案数量(默认5) |
curl -X POST "https://cross.cybermagi.space/api/v1/hooks" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"platform": "xiaohongshu", "product_name": "智能翻译耳机", "product_category": "电子产品"}'
# Python 예제 코드
import requests
API_KEY = "YOUR_API_KEY"
BASE_URL = "https://cross.cybermagi.space"
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
data = {
"target": "xiaohongshu"
}
response = requests.post(
f"{BASE_URL}/api/v1/hooks",
json=data,
headers=headers
)
result = response.json()
print(result)
{
"success": true,
"data": {
"platform": "xiaohongshu",
"hooks": [
{
"id": 1,
"title": "99%的人都不知道的跨境电商秘籍!",
"hook_text": "打开这个视频前,请准备好你的钱包...",
"expected_ctr": "8.5%"
},
{
"id": 2,
"title": "只用3步,小红书销量翻倍!",
"hook_text": "这个方法太简单了,但我保证你没想到...",
"expected_ctr": "7.2%"
}
],
"generation_time_ms": 576
},
"request_id": "req_hooks_xiaohongshu_ko_3"
}
点击返回主页,获取API密钥并在线测试