# 屏智能体矩阵 — OpenAI function-calling
curl https://a2ahub.com.cn/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "agent:agt_pdd_001",
"messages": [
{"role": "user", "content": "帮我策划一个微信获客活动,目标客群30-45岁女性"}
],
"functions": [{
"name": "customer_acquisition",
"description": "获客:多渠道精准获客投放",
"parameters": {
"type": "object",
"required": ["channel", "target_audience"],
"properties": {
"channel": {"type": "string", "enum": ["wechat","email","sms","miniprogram","offline"]},
"target_audience": {"type": "string"},
"budget": {"type": "number"},
"region": {"type": "string"},
"campaign_name": {"type": "string"}
}
}
}],
"function_call": {"name": "customer_acquisition"}
}'
# 墩墩联盟智能体 — OpenAI function-calling
curl https://a2ahub.com.cn/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "agent:agt_alliance_001",
"messages": [
{"role": "user", "content": "生成联盟成员 7 月份的分润结算单"}
],
"functions": [{
"name": "settlement_generate",
"description": "结算单生成:按周期生成分润结算单",
"parameters": {
"type": "object",
"required": ["alliance_id", "period_start", "period_end"],
"properties": {
"alliance_id": {"type": "string"},
"period_start": {"type": "string", "format": "date"},
"period_end": {"type": "string", "format": "date"},
"include_details": {"type": "boolean", "default": true}
}
}
}],
"function_call": {"name": "settlement_generate"}
}'
# 创作者服务智能体 — OpenAI 兼容模式
curl https://a2ahub.com.cn/v1/chat/completions \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "agent:agt_creator_001",
"messages": [
{"role": "user", "content": "分析最近7天全部内容的互动数据"}
],
"functions": [{
"name": "data_analytics",
"description": "数据分析:多维内容效果分析",
"parameters": {
"type": "object",
"required": ["metric_type", "time_range"],
"properties": {
"metric_type": {"type": "string", "enum": ["engagement","conversion","reach","revenue","retention"]},
"time_range": {"type": "string", "enum": ["today","7d","30d","90d","custom"]},
"platform_filter": {"type": "string"},
"export_format": {"type": "string", "enum": ["json","csv","chart"], "default": "json"}
}
}
}],
"function_call": {"name": "data_analytics"}
}'
# 屏智能体矩阵 — Anthropic tool-use 兼容模式
curl https://a2ahub.com.cn/internal/agent/agt_pdd_001/invoke \
-H "Content-Type: application/json" \
-d '{
"function": "customer_retention",
"arguments": {
"user_id": "user_12345",
"strategy": "coupon",
"inactive_days": 30
}
}'
# Response:
{
"status": "ok",
"agent_id": "agt_pdd_001",
"message": "留客策略已触发:coupon",
"details": {
"strategy": "coupon",
"inactive_days": 30,
"coupon_value": 20.00,
"estimated_retention_lift": "+18%"
}
}
# 墩墩联盟智能体 — Anthropic tool-use 兼容模式
curl https://a2ahub.com.cn/internal/agent/agt_alliance_001/invoke \
-H "Content-Type: application/json" \
-d '{
"tool_name": "withdraw_apply",
"tool_input": {
"alliance_id": "aln_abc123",
"amount": 15800.00,
"bank_account": "6222021234567890",
"bank_name": "工商银行",
"account_holder": "张三"
}
}'
# Response:
{
"status": "ok",
"message": "提现申请已提交:15800.0元",
"details": {
"withdraw_id": "wdr_1723140000",
"status": "pending_approval",
"estimated_arrival": "1-3个工作日",
"fee": 0.0
}
}
# 创作者服务智能体 — Anthropic Messages API (原生)
curl https://a2ahub.com.cn/claude-code/agt_creator_001/v1/messages \
-H "x-api-key: YOUR_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "creator-v2",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "帮我写一篇关于AI Agent的行业分析文章"}
],
"tools": [{
"name": "content_create",
"description": "AI驱动的多类型内容生成",
"input_schema": {
"type": "object",
"required": ["content_type", "topic"],
"properties": {
"content_type": {"type": "string", "enum": ["article","video_script","social_post","banner","landing_page"]},
"topic": {"type": "string"},
"style": {"type": "string"},
"keywords": {"type": "array", "items": {"type": "string"}},
"length": {"type": "string", "enum": ["short","medium","long"]}
}
}
}]
}'