IN ENGLISH · API DOCS

Teams and budgets: company accounts, roles and monthly limits

A company account has one shared wallet and is divided into workspaces. Each member holds one of 5 roles. A key created in a workspace spends from the company wallet. Each workspace and each member can be given a monthly limit, in Toman and in requests; a key that reaches a limit answers 401 with code workspace_limit until the next month.

Last updated:

[01]TEAMS AND BUDGETS

Company accounts and workspaces

  • A company has one wallet and one plan of its own, separate from its members' personal wallets.
  • A company is divided into workspaces (for example one per team or per product). Keys, usage and limits belong to a workspace.
  • There is no limit on the number of members or workspaces.
  • One user account can create up to 3 companies. An invitation to a new member is valid for 7 days.

A company is created and managed in the dashboard under Settings, Company (/settings/company, in Persian).

[02]TEAMS AND BUDGETS

Roles

What each role can do
Actionowneradminbillingdeveloperviewer
Read the usage report of a workspace it belongs toowner:Yesadmin:Yesbilling:Yesdeveloper:Yesviewer:Yes
Create and revoke workspace keysowner:Yesadmin:Yesbilling:Nodeveloper:Yesviewer:No
Read company-wide usageowner:Yesadmin:Yesbilling:Yesdeveloper:Noviewer:No
Top up, buy a plan, invoices and proformasowner:Yesadmin:Yesbilling:Yesdeveloper:Noviewer:No
Set monthly limits for a workspace and its membersowner:Yesadmin:Yesbilling:Yesdeveloper:Noviewer:No
Create a workspace and set its budgetowner:Yesadmin:Yesbilling:Nodeveloper:Noviewer:No
Invite and remove members, change roles, grant workspace accessowner:Yesadmin:Yesbilling:Nodeveloper:Noviewer:No
Transfer ownership of the companyowner:Yesadmin:Nobilling:Nodeveloper:Noviewer:No

A developer creates keys only in the workspaces it was given access to. Owners and admins have access to every workspace.

[03]TEAMS AND BUDGETS

Workspace keys

  • A workspace key has the same format as a personal key and works on the same routes.
  • Its calls are paid from the company's wallet (and plan), not from the wallet of the person who created it. The creator is recorded beside each call.
  • It can have an expiry and a spend cap, like any key (API keys and security).
  • A key is re-checked on every request. When the workspace is deactivated or the company suspended, when its creator's membership stops being active, or when the creator no longer holds the owner, admin or developer role for that workspace, the key answers 401 with code key_revoked.
  • When an owner or admin removes a member, that member's keys are reassigned to the person who removed them and keep working.

The account API with a workspace key

On the account API a workspace key reads its own workspace only: that workspace's calls (every member's, from the API and from the chat product) and its keys, and of the company's wallet only the spendable balance (GET /v1/wallet/summary). The wallet ledger belongs to the whole company and is on the company dashboard; GET /v1/wallet/transactions with a workspace key answers 403 with code forbidden. Logged request and response text is returned only for calls made with an API key, never for what was written in the chat. A personal key, in turn, reads only the calls and keys outside company workspaces.

[04]TEAMS AND BUDGETS

Monthly limits

The limits that can be set
LimitApplies toUnit
Workspace monthly budgetApplies to:All spend of the workspace: API and chat togetherUnit:Toman
Workspace monthly API limitApplies to:Spend of the workspace's API keysUnit:Toman
Workspace monthly chat limitApplies to:Members' chat spend in the workspaceUnit:Toman
Workspace monthly request limitApplies to:Number of requests of the workspaceUnit:Requests
Default per-member limit (API and chat)Applies to:Every member without a limit of their ownUnit:Toman
One member's limit: API, chat, requestsApplies to:That member in that workspaceUnit:Toman and requests
  • An empty limit means no limit. No limit is set by default.
  • A month is the Gregorian calendar month in UTC, and the counters reset at midnight UTC on the first day of the month.
  • A member who has a request limit of their own is held to it, and the workspace's request limit is not checked for them.
  • The request count covers every recorded call made with a key of that workspace.
[05]TEAMS AND BUDGETS

When a limit is reached

httphttp
HTTP/1.1 401 Unauthorized
Content-Type: application/json; charset=utf-8

{
  "error": {
    "message": "The workspace or member monthly usage limit has been reached.",
    "type": "api_error",
    "code": "workspace_limit"
  }
}
  • A limit is checked before each call against the usage settled so far. The call that crosses the limit completes and is billed; the calls after it are refused.
  • The key is not revoked: it works again when the next month starts, or when the limit is raised.
  • This answer is a 401, not a 402 or a 429; recognise it in your application by the code workspace_limit, not by the HTTP status.
[06]TEAMS AND BUDGETS

Budget alerts

When a workspace's usage reaches 80% and then 100% of one of its monthly limits, the company's owners, admins and billing members get an email, each once a month.

[07]TEAMS AND BUDGETS

Company top-ups and invoices

  • The company wallet is topped up by owners, admins and billing members, with the same methods and the same 10% VAT described under billing.
  • An invoice is issued for every successful payment. For a formal invoice, enter the company's legal name, national id, economic code, address and postal code in its billing profile.
  • A proforma can be issued before paying.

1xAi is an independent gateway. It is not affiliated with, endorsed by, or a reseller for OpenAI, Anthropic, Google, DeepSeek, xAI, Moonshot AI, Z.ai, Alibaba Qwen, MiniMax or Tencent Hunyuan. Requests are relayed upstream rather than answered by models of our own, so each provider's own usage policies apply to what their models will and will not do, and their model availability is theirs to change. Current reachability is published on the status page.