Skip to Content
API keys

Get an API key

Permissioninference-api-keys:readAuthentication
GET
/inference/api-keys/{id}

Returns one key's metadata. The secret is never retrievable.

The ETag covers the whole public representation, so it changes when last_used_at changes — not only when you edit the key.

See key management.

Authorization

inferenceBearerAuth
headerAuthorizationBearer <token>

Use an Inference API key. Access and keys.

Path Parameters

id*string
Formatuuid

Response Body

API key metadata.

application/json
  1. response

Safe API-key metadata. Secret and hash material are never present.

id*string
Formatuuid
prefix*string
Length1 <= length
name*string
Length1 <= length <= 120
scopes*array<string>
Items1 <= items <= 256
status*string
Value in"active""expired""revoked"
created_by_user_id*|
Formatuuid
created_by_api_key_id*|
Formatuuid
last_used_at*|
Formatdate-time
expires_at*|
Formatdate-time
revoked_at*|
Formatdate-time
version*integer
Formatint64
Range1 <= value
created_at*string
Formatdate-time
updated_at*string
Formatdate-time
Example Request
curl -X GET 'https://api.kejue.co/v1/inference/api-keys/497f6eca-6276-4993-bfeb-53cbbbba6f08'
Example Response
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "prefix": "string",  "name": "string",  "scopes": [    "string"  ],  "status": "active",  "created_by_user_id": "209f54c4-4c33-43bc-9c6a-ef4c65ad7473",  "created_by_api_key_id": "16a8c1ea-aaaf-49f0-9266-c657c48ceff3",  "last_used_at": "2019-08-24T14:15:22Z",  "expires_at": "2019-08-24T14:15:22Z",  "revoked_at": "2019-08-24T14:15:22Z",  "version": 1,  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}