开始接入
接入概览
提交第一批问题并读取结果。
https://docs.aigcgeo.com/gateway所有请求使用 Bearer Token:
Authorization: Bearer YOUR_TOKENcurl --request POST \ --url 'https://docs.aigcgeo.com/gateway/v1/executions' \ --header 'Authorization: Bearer YOUR_TOKEN' \ --header 'Idempotency-Key: request-20260814-0001' \ --header 'Content-Type: application/json' \ --data '{ "questions": ["请介绍某品牌公开发布的核心产品。"], "targets": [ {"code": "qianwen", "deepAnalysis": false, "output": "answer"} ] }'接口返回 HTTP 202:
{ "executionId": "550e8400-e29b-41d4-a716-446655440000", "itemCount": 1, "state": "pending", "statusUrl": "/v1/executions/550e8400-e29b-41d4-a716-446655440000", "items": [ { "itemId": "550e8400-e29b-41d4-a716-446655440001", "question": "请介绍某品牌公开发布的核心产品。", "targetCode": "qianwen", "deepAnalysis": false, "output": "answer", "state": "pending" } ], "webhookUrl": null}保存 executionId。查询进度:
GET /v1/executions/{execution_id}任务结束后读取结果:
GET /v1/executions/{execution_id}/results重试同一次创建请求时复用原 Idempotency-Key;创建新任务时使用新值。