curl --request GET \
--url https://api.novita.ai/openapi/v2/user/key/<stringId>/model-access-policy \
--header 'Authorization: Bearer <API_KEY>'
{
"stringId": "key_xxx",
"policy": {
"schemaVersion": 1,
"productScope": "model_api",
"mode": "selected",
"allowedModels": [
{
"type": "llm",
"id": "deepseek/deepseek-v3"
}
],
"excludedModels": [],
"source": {
"type": "private_policy"
}
},
"policyStatus": "active",
"allowedModelCount": 1,
"excludedModelCount": 0,
"updatedAt": 1783764000,
"updatedBy": "user_uuid_xxx"
}
{
"stringId": "key_xxx",
"policy": {
"schemaVersion": 1,
"productScope": "model_api",
"mode": "all_enabled",
"allowedModels": [],
"excludedModels": [],
"source": {
"type": "default"
}
},
"policyStatus": "active",
"allowedModelCount": 0,
"excludedModelCount": 0,
"updatedAt": 0,
"updatedBy": ""
}
API Key Model Access
Get API Key Model Access Policy
GET
/
openapi
/
v2
/
user
/
key
/
{stringId}
/
model-access-policy
curl --request GET \
--url https://api.novita.ai/openapi/v2/user/key/<stringId>/model-access-policy \
--header 'Authorization: Bearer <API_KEY>'
{
"stringId": "key_xxx",
"policy": {
"schemaVersion": 1,
"productScope": "model_api",
"mode": "selected",
"allowedModels": [
{
"type": "llm",
"id": "deepseek/deepseek-v3"
}
],
"excludedModels": [],
"source": {
"type": "private_policy"
}
},
"policyStatus": "active",
"allowedModelCount": 1,
"excludedModelCount": 0,
"updatedAt": 1783764000,
"updatedBy": "user_uuid_xxx"
}
{
"stringId": "key_xxx",
"policy": {
"schemaVersion": 1,
"productScope": "model_api",
"mode": "all_enabled",
"allowedModels": [],
"excludedModels": [],
"source": {
"type": "default"
}
},
"policyStatus": "active",
"allowedModelCount": 0,
"excludedModelCount": 0,
"updatedAt": 0,
"updatedBy": ""
}
Retrieve the current model access policy of a single API key. If the key has never been configured, the default policy (
The target API key must belong to the callerβs team.
mode=all_enabled) is returned.
allowedModels / excludedModels may be returned as null or an empty array; callers should treat both as an empty array.Permissions
| Role | Access |
|---|---|
| Owner / Admin | Can query the full policy of any API key in the team. |
| Developer | Can query only keys they own, and the response omits the allowedModels / excludedModels details. |
Request Headers
string
required
Bearer authentication format, for example: Bearer {{API Key}}.
Path Parameters
string
required
The stringId of the target API key.
Response Parameters
string
required
The stringId of the API key.
object
required
The model access policy object.
Hide properties
Hide properties
int32
required
Policy schema version. Currently
1.string
required
Product scope the policy applies to. Currently only
model_api.string
required
Access mode. Possible values:
all_enabled (can access all enabled models), selected (can access only the specified models).object[]
object[]
Excluded models. Meaningful only when
mode=all_enabled; empty when mode=selected. Same structure as allowedModels. Not returned in detail for Developer queries.string
required
Policy status.
active means the policy is effective; no_available_models means no accessible model remains (for example, all selected models are offline).int32
required
Number of accessible models.
int32
required
Number of excluded models.
int64
required
Last update time, as a Unix timestamp in seconds.
0 for the default policy.string
required
Identifier of the user who last updated the policy. Empty string for the default policy.
curl --request GET \
--url https://api.novita.ai/openapi/v2/user/key/<stringId>/model-access-policy \
--header 'Authorization: Bearer <API_KEY>'
{
"stringId": "key_xxx",
"policy": {
"schemaVersion": 1,
"productScope": "model_api",
"mode": "selected",
"allowedModels": [
{
"type": "llm",
"id": "deepseek/deepseek-v3"
}
],
"excludedModels": [],
"source": {
"type": "private_policy"
}
},
"policyStatus": "active",
"allowedModelCount": 1,
"excludedModelCount": 0,
"updatedAt": 1783764000,
"updatedBy": "user_uuid_xxx"
}
{
"stringId": "key_xxx",
"policy": {
"schemaVersion": 1,
"productScope": "model_api",
"mode": "all_enabled",
"allowedModels": [],
"excludedModels": [],
"source": {
"type": "default"
}
},
"policyStatus": "active",
"allowedModelCount": 0,
"excludedModelCount": 0,
"updatedAt": 0,
"updatedBy": ""
}
Last modified on July 22, 2026