开始接入
接入概览
提交第一批任务并读取单项结果。
https://docs.aigcgeo.com/gateway所有请求使用 Bearer Token。提交请求还必须携带 Idempotency-Key:
curl --request POST \ --url 'https://docs.aigcgeo.com/gateway/v1/tasks/batch' \ --header 'Authorization: Bearer YOUR_TOKEN' \ --header 'Idempotency-Key: request-20260814-0001' \ --header 'Content-Type: application/json' \ --data '[ { "question": "请介绍某品牌公开发布的核心产品。", "platformCode": "qianwen", "options": {"deepAnalysis": false, "output": "answer"} } ]'接口返回 HTTP 202,每个列表项都有独立 taskId:
{ "acceptedCount": 1, "tasks": [ { "taskId": "550e8400-e29b-41d4-a716-446655440000", "clientReference": null, "state": "pending", "statusUrl": "/v1/tasks/550e8400-e29b-41d4-a716-446655440000" } ]}随后调用 GET /v1/tasks/{task_id} 查询状态和结果。重试同一次提交时复用原 Idempotency-Key;新提交必须使用新值。