Create agent
Create agent and auto-create Virtual Key. Returns fullToken once. Owner or admin.
请求头
Authorization
Bearer {access_token}
X-Workspace-Id
Workspace UUID
请求
name, provider, model, masterKeyId (required)
masterKeyId
name
provider
allowedModels
budget
budgetAction
budgetWindow
departmentId
description
environment
expiresAt
model
modelsInfo
ModelsInfo 是 custom provider 时的模型价格,格式:{“modelId”: {“prompt”: 1.5, “completion”: 2.0}} 单位:美元 / 1M tokens
rateLimitRpm
响应
data: agent + virtualKey (id, keyPrefix, fullToken)
错误
400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error