curl --request GET \
--url https://api.novita.ai/openapi/v2/user/key/<stringId>/ip-access-policy \
--header 'Authorization: Bearer <API_KEY>'
{
"stringId": "key_xxx",
"policy": {
"allowedIps": ["203.0.113.5", "198.51.100.0/24"]
},
"policyStatus": "active",
"allowedIpCount": 2,
"updatedAt": "2026-08-13T10:20:30Z",
"updatedBy": "a3f1c9e2-5b7d-4e81-9c34-2f6a8d0b1e57"
}
{
"stringId": "key_xxx",
"policy": {
"allowedIps": []
},
"policyStatus": "active",
"allowedIpCount": 0,
"updatedAt": "",
"updatedBy": ""
}
API Key Network Access
Get API Key IP Access Policy
GET
/
openapi
/
v2
/
user
/
key
/
{stringId}
/
ip-access-policy
curl --request GET \
--url https://api.novita.ai/openapi/v2/user/key/<stringId>/ip-access-policy \
--header 'Authorization: Bearer <API_KEY>'
{
"stringId": "key_xxx",
"policy": {
"allowedIps": ["203.0.113.5", "198.51.100.0/24"]
},
"policyStatus": "active",
"allowedIpCount": 2,
"updatedAt": "2026-08-13T10:20:30Z",
"updatedBy": "a3f1c9e2-5b7d-4e81-9c34-2f6a8d0b1e57"
}
{
"stringId": "key_xxx",
"policy": {
"allowedIps": []
},
"policyStatus": "active",
"allowedIpCount": 0,
"updatedAt": "",
"updatedBy": ""
}
Retrieve the current IP access policy of a single API key, that is, the list of source IPs allowed to use the key. If the key has never been configured, an empty list is returned, meaning the source IP is not restricted.
The target API key must belong to the caller’s team. When querying a key that the caller has no permission for or that does not belong to the team, the endpoint does not reveal whether the target key exists and returns a permission error uniformly.
The IP access policy applies to model invocation endpoints only. When the source IP of a request is not in the allowed list, the model call is rejected; management endpoints (including these IP access policy read/write endpoints, billing queries, Sandbox, etc.) are not restricted by source IP.
Permissions
| Role | Access |
|---|---|
| Owner / Admin | Can query the IP access policy of any API key in the team. |
| Developer | Can query only keys they own. |
| Basic | Can query only keys they own. |
| Billing | Can query the IP access policy of any API key in the team. |
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 IP access policy object.
Hide properties
Hide properties
string[]
required
The list of allowed source IPs. Each entry is an IPv4 address or an IPv4 CIDR range. An empty list means the source IP is not restricted.
string
required
Policy status. Value:
active.int
required
The number of allowed IP entries.
0 means the source IP is not restricted.string
required
The last update time, in ISO 8601 format. Empty string if never configured.
string
required
The user UUID of the last operator. Empty string if never configured.
curl --request GET \
--url https://api.novita.ai/openapi/v2/user/key/<stringId>/ip-access-policy \
--header 'Authorization: Bearer <API_KEY>'
{
"stringId": "key_xxx",
"policy": {
"allowedIps": ["203.0.113.5", "198.51.100.0/24"]
},
"policyStatus": "active",
"allowedIpCount": 2,
"updatedAt": "2026-08-13T10:20:30Z",
"updatedBy": "a3f1c9e2-5b7d-4e81-9c34-2f6a8d0b1e57"
}
{
"stringId": "key_xxx",
"policy": {
"allowedIps": []
},
"policyStatus": "active",
"allowedIpCount": 0,
"updatedAt": "",
"updatedBy": ""
}
Last modified on September 1, 2026