Skip to content

Organization settings

In the dashboard, open Access → Organization settings. These settings apply to all employees and teams, alongside any settings at those levels. The methods below are the organization-wide counterparts of the employee and team methods. The key identifies the organization, so there is no list of employees or teams to pass.

See concurrent generation limits and model parameter rules for the organization-wide limits on generation.

Only a key whose creator is an owner or admin can change these settings. A manager can update their own teams and team members. An organization-level request with a manager’s key returns HTTP 403 and code 7. Personal account keys and keys whose creator has the member role receive HTTP 403 for the entire request.

A successful request returns { "code": 0, "updated": true }. The following errors apply to the entire request.

Errors

ParameterTypeDescription
400 (code 3)errorIncorrect entry; for unknown model - details[0].code = model_not_found and unknownModels, nothing applied
403 (code 7)errorA key with the manager or member role.
403 (code 13 / 30)errorPersonal account key/key without permission Full dashboard access
500 (code 1)errorUnforeseen Error — Repeat Request
POSThttps://gptunnel.ru/api/v1/access/setOrgRestrictions

Supply at least one of the employee settings fields: showBalance, webSearch, imageGeneration, thinkingMode, or useOrgBalance. Each accepts allow, forbid, or default. Omitted settings keep their current values.

Request parameters

ParameterTypeDescription
settings*objectFeature switches: { showBalance?, webSearch?, imageGeneration?, thinkingMode?, useOrgBalance? }. Each accepts allow, forbid, or default.

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 = {
"settings": {
"thinkingMode": "forbid",
"showBalance": "allow"
}
}
request = Request(
"https://gptunnel.ru/api/v1/access/setOrgRestrictions",
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,
"updated": true
}
POSThttps://gptunnel.ru/api/v1/access/setOrgModelAccess

To set organization-wide model access, send 1 to 100 { model, permission } entries. Each permission accepts allow, forbid, or default. If any model ID is unknown, none of the changes are applied.

Request parameters

ParameterTypeDescription
models*object[]Array of 1–100 { model, permission } objects. Use a model ID from GET /v1/models.
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 = {
"models": [
{
"model": "gpt-6-luna",
"permission": "forbid"
}
]
}
request = Request(
"https://gptunnel.ru/api/v1/access/setOrgModelAccess",
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,
"updated": true
}
POSThttps://gptunnel.ru/api/v1/access/setOrgModelLimits

Set daily or monthly spending limits in whole rubles per model across the organization. Send 1 to 100 { model, dailyLimit?, monthlyLimit? } entries. Use 0 for no limit. Only the supplied fields are updated.

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 = {
"models": [
{
"model": "claude-5.5-haiku",
"dailyLimit": 1000
}
]
}
request = Request(
"https://gptunnel.ru/api/v1/access/setOrgModelLimits",
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/setOrgGlobalLimit

Set the organization’s total daily or monthly spending limit across all models. Pass at least one field in { dailyLimit?, monthlyLimit? }. Values are in whole rubles. Use 0 for no limit.

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 = {
"monthlyLimit": 100000
}
request = Request(
"https://gptunnel.ru/api/v1/access/setOrgGlobalLimit",
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,
"updated": true
}

Current values return getOrgSettings.