Skip to main content
PATCH
/
api_keys
/api/v1/api_keys
curl --request PATCH \
  --url https://api.venice.ai/api/v1/api_keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "e28e82dc-9df2-4b47-b726-d0a222ef2ab5",
  "consumptionLimit": {
    "usd": 50,
    "diem": 10,
    "vcu": 30
  },
  "description": "Updated API Key Name",
  "expiresAt": "2023-10-01T12:00:00.000Z"
}
'
{
  "data": {
    "apiKeyType": "ADMIN",
    "consumptionLimits": {
      "usd": 50,
      "diem": 10,
      "vcu": 30
    },
    "createdAt": "2023-10-01T12:00:00.000Z",
    "expiresAt": "2023-10-01T12:00:00.000Z",
    "id": "e28e82dc-9df2-4b47-b726-d0a222ef2ab5",
    "last6Chars": "2V2jNW",
    "lastUsedAt": "2023-10-01T12:00:00.000Z",
    "description": "Updated API Key"
  },
  "success": true
}

Authorizations

Authorization
string
header
required

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

Body

application/json

The request body for updating an existing API key. The description, expiration date, and consumption limits can be updated.

id
string
required

The API Key ID to update

Example:

"e28e82dc-9df2-4b47-b726-d0a222ef2ab5"

consumptionLimit
object

The API Key consumption limits for each epoch.

Example:
{ "usd": 50, "diem": 10, "vcu": 30 }
description
string

The API Key description

Example:

"Updated API Key Name"

expiresAt

The API Key expiration date. Set to empty string or null to remove expiration.

Available options:
Example:

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

Response

OK

data
object
required
success
boolean
required