为有效成员创建推理 Key
可以向当前工作区任何有效成员分配推理 Key。只返回本次新原文。
所需权限:api_keys:create。使用绑定目标工作区的 OpenAPI Key,以 Authorization: Bearer <OpenAPI Key> 鉴权。
Headers
- Type: stringIdempotency
- Key min length:1max length:200required同一机器 Key、同一操作使用唯一请求号;重复同参数复用原结果,换参数返回409。最长200字节。
Body·
required
application/json
- Type: stringmember
_id required当前工作区有效成员外部ID,所有工作区类型均必填。
- Type: stringnamemin length:1max length:64required
UTF-8 编码不超过64字节。
- Type: string enumbilling
_type values- credit
_balance - coding
_plan
- Type: object ·limits
日额度≤7日额度≤30日额度;美元额度最多两位小数。运行时限额不得超过工作区硬上限。
Responses
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
Request Example for post/v1/api-keys
curl https://openapi.apigo.ai/v1/api-keys \
--request POST \
--header 'Idempotency-Key: request-REPLACE-WITH-UNIQUE-ID' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"name": "server-automation",
"member_id": "member_REPLACE_ME",
"billing_type": "credit_balance",
"limits": {
"rpm_limit": 60
}
}'
{
"code": 0,
"message": "string",
"data": {
"key": {
"id": "string",
"name": "string",
"owner_name": "string",
"member_id": "string",
"billing_type": "credit_balance",
"use": "string",
"day_spend_usd": 1,
"d7_spend_usd": 1,
"d30_spend_usd": 1,
"day_limit_usd": null,
"d7_limit_usd": null,
"d30_limit_usd": null,
"rpm_limit": null,
"tpm_limit": null,
"concurrency_limit": null,
"status": "active",
"request_prefix": "string",
"created_at": "2026-10-19T02:14:25.568Z",
"last_used_at": null,
"auto_created": true,
"can_reveal": false
},
"full_secret": "string"
}
}