📋 API接入指南
curl -X POST https://api.musxiao.com/api/v1/writer \
-H "Content-Type: application/json" \
-H "x-api-key: YOUR_API_KEY" \
-d '{"prompt":"写一篇关于AI的文章","maxTokens":500}'
import requests
response = requests.post(
"https://api.musxiao.com/api/v1/writer",
headers={"x-api-key": "YOUR_API_KEY"},
json={"prompt": "写一篇关于AI的文章"}
)
print(response.json())
const res = await fetch('https://api.musxiao.com/api/v1/writer', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY'
},
body: JSON.stringify({ prompt: '写一篇关于AI的文章' })
});
const data = await res.json();