请求头信息:
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
Accept: application/json
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
type | string | 是 | 内容类型(social) |
topic | string | 是 | 内容主题关键词 |
tone | string | 否 | 语气风格(formal/casual/persuasive) |
length | string | 否 | 内容长度(short/medium/long) |
language | string | 否 | 输出语言 |
curl -X POST "https://cross.cybermagi.space/api/v1/ai-content" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"type": "social", "topic": "跨境电商运营技巧", "tone": "persuasive", "length": "medium"}'
# Exemple 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": "social"
}
response = requests.post(
f"{BASE_URL}/api/v1/ai-content",
json=data,
headers=headers
)
result = response.json()
print(result)
{
"success": true,
"data": {
"type": "social",
"content": "这是AI生成的社交媒体内容示例...\n\n标题: 提升跨境电商销量的5个秘诀\n\n正文内容...",
"word_count": 365,
"generation_time_ms": 860
},
"request_id": "req_ai-content_social_fr_2"
}
点击返回主页,获取API密钥并在线测试