curl --request GET \
--url 'https://api.novita.ai/openapi/v2/user/key?includePolicySummary=true' \
--header 'Authorization: Bearer <API_KEY>'
{
"keys": [
{
"name": "default",
"id": "123456",
"stringId": "key_xxx",
"maskedKey": "sk_xxx***",
"memberId": "member_xxx",
"uuid": "user_uuid_xxx",
"expireTime": "never",
"createTime": "2026-07-14 12:00:00",
"lastUsedAt": 1783764000,
"modelAccessPolicy": {
"mode": "selected",
"allowedModelCount": 1,
"excludedModelCount": 0
}
}
]
}
API Key Model Access
List API Keys (with Model Access Summary)
GET
/
openapi
/
v2
/
user
/
key
curl --request GET \
--url 'https://api.novita.ai/openapi/v2/user/key?includePolicySummary=true' \
--header 'Authorization: Bearer <API_KEY>'
{
"keys": [
{
"name": "default",
"id": "123456",
"stringId": "key_xxx",
"maskedKey": "sk_xxx***",
"memberId": "member_xxx",
"uuid": "user_uuid_xxx",
"expireTime": "never",
"createTime": "2026-07-14 12:00:00",
"lastUsedAt": 1783764000,
"modelAccessPolicy": {
"mode": "selected",
"allowedModelCount": 1,
"excludedModelCount": 0
}
}
]
}
List the API keys of the current team. When
includePolicySummary=true, each key includes a modelAccessPolicy summary, which is convenient for showing model access status on a list page. On page initialization, call this endpoint to get the summaries first, then query a single key’s full policy as needed.
Permissions
Returned according to the platform’s existing API key read permissions: Owner / Admin can list all keys in the team; Developer and Basic members see the keys they own, within their accessible scope.Request Headers
string
obrigatório
Bearer authentication format, for example: Bearer {{API Key}}.
Query Parameters
boolean
Whether to return the
modelAccessPolicy summary for each key. Recommended to pass true on the frontend. When omitted or false, modelAccessPolicy may not be returned.Response Parameters
object[]
obrigatório
The list of API keys.
Ocultar properties
Ocultar properties
string
obrigatório
API Key name.
string
obrigatório
Numeric ID of the API key.
string
obrigatório
The stringId of the API key, used as the path parameter for the model access policy endpoints.
string
obrigatório
The masked API key, for example
sk_xxx***. The list endpoint does not return the plaintext key; the plaintext is shown only once at creation time.string
obrigatório
The sub-user account ID that owns the API key.
string
obrigatório
The UUID of the user that owns the API key.
string
obrigatório
Expiration time.
never when the key never expires.string
obrigatório
Creation time.
int64
obrigatório
Last used time, as a Unix timestamp in seconds.
0 if never used.curl --request GET \
--url 'https://api.novita.ai/openapi/v2/user/key?includePolicySummary=true' \
--header 'Authorization: Bearer <API_KEY>'
{
"keys": [
{
"name": "default",
"id": "123456",
"stringId": "key_xxx",
"maskedKey": "sk_xxx***",
"memberId": "member_xxx",
"uuid": "user_uuid_xxx",
"expireTime": "never",
"createTime": "2026-07-14 12:00:00",
"lastUsedAt": 1783764000,
"modelAccessPolicy": {
"mode": "selected",
"allowedModelCount": 1,
"excludedModelCount": 0
}
}
]
}
Última modificação em 10 de agosto de 2026