Skip to content

Read access settings

Each method returns settings explicitly set at the requested level (employee, team, or organization). For example, a model can have permission default for an employee and forbid for the organization. The most restrictive setting across all levels takes effect.

  • An owner or admin can read settings for any employee, any team, and the organization.
  • A manager can read their own settings, their teams’ settings, the settings of members of those teams, and the organization’s settings. A team or employee outside their scope returns forbidden.
  • A key whose creator has the member role, or a personal account key, receives HTTP 403 for the whole request.

Reading settings leaves them unchanged and creates no entry in the organization’s audit log.

Selected level settings

ParameterTypeDescription
settings*objectFor showBalance, webSearch, imageGeneration, thinkingMode, and useOrgBalance, the accepted values are allow, forbid, and default
globalLimit*object{dailyLimit, monthlyLimit} is the total limit for all models, rubles; 0 = no limit
inflight*object{ inflightCountLimit, inflightRubLimit, maxCostLimit } sets concurrent generation limits. Use 0 for no limit
models*object[]Models with settings at this level: { model, permission, dailyLimit, monthlyLimit, paramRules }
models[].paramRules*object | nullLimitations on model parameters in rules format (see "Restrictions by parameters"); null - not specified

To update a setting, copy the relevant fields into the body of the update request. For example, pass the login and settings.globalLimit.dailyLimit as items[0].login and items[0].dailyLimit to update the overall spending limit. Omit monthlyLimit to keep the current monthly limit. Updates accept whole rubles. If the current limit is fractional, supply a new whole number only when you intend to change it.

POSThttps://gptunnel.ru/api/v1/access/getSettings

Request parameters

ParameterTypeDescription
logins*string[]Array of 1 to 25 employee logins. Matching is case-insensitive.

The response lists matching employees in items as { login, settings }. Failures appear in failed and failedLogins with the reason not_found (outside the organization), forbidden (outside the manager’s teams), or error.

Set GPTUNNEL_API_KEY and replace the placeholders with values for your organization.

import json
import os
from urllib.request import Request, urlopen
key = os.environ.get("GPTUNNEL_API_KEY")
if not key:
raise SystemExit("Set GPTUNNEL_API_KEY")
body = {
"logins": [
"ivanov@company.com",
"nobody@company.com"
]
}
request = Request(
"https://gptunnel.ru/api/v1/access/getSettings",
method="POST",
headers={
"Authorization": key,
"Content-Type": "application/json",
},
data=json.dumps(body).encode("utf-8"),
)
with urlopen(request, timeout=30) as response:
print(json.load(response))
{
"code": 0,
"items": [
{
"login": "ivanov@company.com",
"settings": {
"settings": {
"showBalance": "default",
"webSearch": "forbid",
"imageGeneration": "default",
"thinkingMode": "default",
"useOrgBalance": "default"
},
"globalLimit": { "dailyLimit": 0, "monthlyLimit": 5000 },
"inflight": { "inflightCountLimit": 2, "inflightRubLimit": 500, "maxCostLimit": 150 },
"models": [
{
"model": "seedance-2-5",
"permission": "default",
"dailyLimit": 0,
"monthlyLimit": 0,
"paramRules": {
"by": "resolution",
"any": { "max": { "duration": 5 } },
"values": { "480p": { "deny": true } }
}
}
]
}
}
],
"failed": 1,
"failedLogins": [
{
"login": "nobody@company.com",
"reason": "not_found",
"message": "Employee not found in the organization."
}
]
}
POSThttps://gptunnel.ru/api/v1/access/getTeamSettings

Pass 1 to 25 team IDs in teamIds. An owner or admin with permission to manage employees can get the IDs from the team list. In the business dashboard, a manager can open Analytics → Teams, open the menu for their team, and select Copy ID to copy its teamId. An admin can also share the ID.

Each entry in items contains { teamId, settings }. Failures appear in failed and failedTeams with the reason not_found, forbidden (the team is outside the manager’s scope), or error.

import json
import os
from urllib.request import Request, urlopen
key = os.environ.get("GPTUNNEL_API_KEY")
if not key:
raise SystemExit("Set GPTUNNEL_API_KEY")
body = {
"teamIds": [
"664f0a1b2c3d4e5f60718293"
]
}
request = Request(
"https://gptunnel.ru/api/v1/access/getTeamSettings",
method="POST",
headers={
"Authorization": key,
"Content-Type": "application/json",
},
data=json.dumps(body).encode("utf-8"),
)
with urlopen(request, timeout=30) as response:
print(json.load(response))
POSThttps://gptunnel.ru/api/v1/access/getOrgSettings

This method takes no parameters. Send an empty JSON object {}. The response is { "code": 0, "settings": { ... } } in the format above.

import json
import os
from urllib.request import Request, urlopen
key = os.environ.get("GPTUNNEL_API_KEY")
if not key:
raise SystemExit("Set GPTUNNEL_API_KEY")
body = {}
request = Request(
"https://gptunnel.ru/api/v1/access/getOrgSettings",
method="POST",
headers={
"Authorization": key,
"Content-Type": "application/json",
},
data=json.dumps(body).encode("utf-8"),
)
with urlopen(request, timeout=30) as response:
print(json.load(response))
{
"code": 0,
"settings": {
"settings": {
"showBalance": "default",
"webSearch": "default",
"imageGeneration": "default",
"thinkingMode": "forbid",
"useOrgBalance": "default"
},
"globalLimit": { "dailyLimit": 0, "monthlyLimit": 100000 },
"inflight": { "inflightCountLimit": 0, "inflightRubLimit": 0, "maxCostLimit": 5000 },
"models": [
{ "model": "gpt-6-luna", "permission": "forbid", "dailyLimit": 0, "monthlyLimit": 0, "paramRules": null }
]
}
}
{
"code": 7,
"message": "Not allowed to perform this action for the organization."
}