DOCS
Dashboardnorth_eastGet an API keyvpn_key
PAI Chat·Endpoint
POST/api-keys/chatbot/create

Create a chatbot-scoped API key

The key is locked to the chatbot given by the x-chatbot-id header and only works for that chatbot.

GET/api-keys/getarrow_forward
tune
Parameters
x-chatbot-idrequiredheader
string
upload
Request body
name
string
expiresIn
number
Seconds
prefix
string
remaining
number
metadata
object
refillAmount
number
refillInterval
number
Milliseconds
rateLimitEnabled
boolean
rateLimitTimeWindow
number
Milliseconds
rateLimitMax
number
permissions
object
double_arrow
Returns 200
id
string
name
string
start
string
prefix
string
userId
string
refillInterval
number
refillAmount
number
lastRefillAt
string (date-time)
enabled
boolean
rateLimitEnabled
boolean
rateLimitTimeWindow
number
rateLimitMax
number
requestCount
number
remaining
number
lastRequest
string (date-time)
expiresAt
string (date-time)
createdAt
string (date-time)
updatedAt
string (date-time)
permissions
object
metadata
any
key
string
north_east
Request
curl -X POST 'https://chat-api-dev.paicloud.ai//api-keys/chatbot/create' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "name",
  "expiresIn": 0,
  "prefix": "prefix",
  "remaining": 0,
  "metadata": {},
  "refillAmount": 0,
  "refillInterval": 0,
  "rateLimitEnabled": true,
  "rateLimitTimeWindow": 0,
  "rateLimitMax": 0,
  "permissions": {}
}'
south_west
Response
200 OK
application/json
{
  "id": "id",
  "name": "name",
  "start": "start",
  "prefix": "prefix",
  "userId": "userId",
  "refillInterval": 0,
  "refillAmount": 0,
  "lastRefillAt": "2026-01-01T00: 00:00Z",
  "enabled": true,
  "rateLimitEnabled": true,
  "rateLimitTimeWindow": 0,
  "rateLimitMax": 0,
  "requestCount": 0,
  "remaining": 0,
  "lastRequest": "2026-01-01T00: 00:00Z",
  "expiresAt": "2026-01-01T00: 00:00Z",
  "createdAt": "2026-01-01T00: 00:00Z",
  "updatedAt": "2026-01-01T00: 00:00Z",
  "permissions": {},
  "metadata": "metadata",
  "key": "key"
}