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

Authorizations

Authorization
string
header
required

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

Body

application/json
description
string
required

The API Key description

Example:

"Example API Key"

apiKeyType
enum<string>
required

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

Available options:
ADMIN,
INFERENCE
Example:

"ADMIN"

consumptionLimit
object
required

The API Key consumption limits for each epoch.

Example:
{ "vcu": 100, "usd": 50 }
expiresAt

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

Available options:
Example:

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

Response

200
application/json
OK
success
boolean
required
data
object
required