메인 콘텐츠로 건너뛰기
POST
/
api_keys
/api/v1/api_keys
curl --request POST \
  --url https://api.venice.ai/api/v1/api_keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "apiKeyType": "ADMIN",
  "description": "Example API Key",
  "consumptionLimit": {
    "usd": 50,
    "diem": 10,
    "vcu": 30
  },
  "limitPeriod": "MONTH",
  "expiresAt": "2023-10-01T12:00:00.000Z"
}
'
{
  "data": {
    "apiKey": "<string>",
    "apiKeyType": "ADMIN",
    "consumptionLimit": {
      "usd": 50,
      "diem": 10,
      "vcu": 30
    },
    "limitPeriod": "MONTH",
    "expiresAt": "2023-10-01T12:00:00.000Z",
    "id": "e28e82dc-9df2-4b47-b726-d0a222ef2ab5",
    "description": "Example API Key"
  },
  "success": true
}

인증

Authorization
string
header
필수

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

본문

application/json

The request body for creating a new API key. API key creation is rate limited to 20 requests per minute and a maximum of 500 active API keys per user. VCU (Legacy Diem) is being deprecated in favor of tokenized Diem. Please update your API calls to use Diem instead.

apiKeyType
enum<string>
필수

The API Key type. Admin keys have full access to the API while inference keys are only able to call inference endpoints.

사용 가능한 옵션:
INFERENCE,
ADMIN
예시:

"ADMIN"

description
string
필수

The API Key description

예시:

"Example API Key"

consumptionLimit
object

The API Key consumption limits, evaluated against the window selected by limitPeriod.

예시:
{ "usd": 50, "diem": 10, "vcu": 30 }
limitPeriod
enum<string>

Reset window the consumption limits apply to. EPOCH resets every UTC day (legacy default). MONTH resets on the 1st of each UTC calendar month. LIFETIME never resets, so the limit acts as a permanent cap on the key.

사용 가능한 옵션:
EPOCH,
MONTH,
LIFETIME
예시:

"MONTH"

expiresAt

The API Key expiration date. If not provided, the key will not expire.

사용 가능한 옵션:
예시:

"2023-10-01T12:00:00.000Z"

응답

OK

data
object
필수
success
boolean
필수