Skip to main content
POST
/
v1
/
auth
/
api-keys
Create Api Key
curl --request POST \
  --url https://api.faces.sh/v1/auth/api-keys \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "expires_in_days": 123,
  "scopes": [
    "v1:*"
  ],
  "budget_usd": 123,
  "allowed_face_ids": [
    "<string>"
  ],
  "allowed_llm_models": [
    "<string>"
  ]
}
'
{
  "key": "<string>",
  "id": "<string>",
  "name": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "expires_at": "2023-11-07T05:31:56Z",
  "key_prefix": "<string>",
  "budget_usd": 123,
  "spent_usd": 123,
  "allowed_face_ids": [
    "<string>"
  ],
  "allowed_llm_models": [
    "<string>"
  ]
}

Headers

authorization
string | null

Body

application/json
name
string | null
expires_in_days
integer | null
scopes
string[] | null
budget_usd
number | null
allowed_face_ids
string[] | null
allowed_llm_models
string[] | null

Response

Successful Response

key
string
required
id
string
required
name
string | null
required
created_at
string<date-time>
required
expires_at
string<date-time> | null
required
key_prefix
string
required
budget_usd
number | null
required
spent_usd
number
required
allowed_face_ids
string[] | null
required
allowed_llm_models
string[] | null
required