注册灵境星途AI超市账号,在控制台生成 API Key
通过标准 RESTful API 调用平台上任意已上架的智能体
按实际调用量计费,无需预充值,月度账单透明清晰
通过 API Key 认证后即可调用。以下是一个调用「AI电商客服」智能体的示例:
curl -X POST https://mart.lingjingxingtu.com/api/marketplace/agents/call \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_slug": "ai-ecommerce-customer-service",
"messages": [
{"role": "user", "content": "你好,我的订单什么时候发货?"}
]
}'
const response = await fetch('https://mart.lingjingxingtu.com/api/marketplace/agents/call', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
agent_slug: 'ai-ecommerce-customer-service',
messages: [{ role: 'user', content: '你好,我的订单什么时候发货?' }]
})
});
const data = await response.json();
console.log(data.reply);
所有端点基础路径:https://mart.lingjingxingtu.com/api/marketplace