New

New Organization

Allow orgs to own teams

Set org level budgets + model access.

Only admins can create orgs.

Parameters

  • organization_alias: str - The name of the organization.
  • models: List - The models the organization has access to.
  • budget_id: Optional[str] - The id for a budget (tpm/rpm/max budget) for the organization.

IF NO BUDGET ID - CREATE ONE WITH THESE PARAMS

  • max_budget: Optional[float] - Max budget for org
  • tpm_limit: Optional[int] - Max tpm limit for org
  • rpm_limit: Optional[int] - Max rpm limit for org
  • max_parallel_requests: Optional[int] - [Not Implemented Yet] Max parallel requests for org
  • soft_budget: Optional[float] - [Not Implemented Yet] Get a slack alert when this soft budget is reached. Don't block requests.
  • model_max_budget: Optional[dict] - Max budget for a specific model
  • budget_duration: Optional[str] - Frequency of reseting org budget
  • metadata: Optional[dict] - Metadata for team, store information for team. Example metadata - {"extra_info": "some info"}
  • blocked: bool - Flag indicating if the org is blocked or not - will stop all calls from keys with this org_id.
  • tags: Optional[List[str]] - Tags for tracking spend and/or doing tag-based routing.
  • organization_id: Optional[str] - The organization id of the team. Default is None. Create via /organization/new.
  • model_aliases: Optional[dict] - Model aliases for the team. Docs

Case 1: Create new org without a budget_id

curl --location 'http://0.0.0.0:4000/organization/new' 
--header 'Authorization: Bearer sk-1234' 
--header 'Content-Type: application/json' 
--data '{
    "organization_alias": "my-secret-org",
    "models": ["model1", "model2"],
    "max_budget": 100
}'


Case 2: Create new org with a budget_id

curl --location 'http://0.0.0.0:4000/organization/new' 
--header 'Authorization: Bearer sk-1234' 
--header 'Content-Type: application/json' 
--data '{
    "organization_alias": "my-secret-org",
    "models": ["model1", "model2"],
    "budget_id": "428eeaa8-f3ac-4e85-a8fb-7dc8d7aa8689"
}'
POST/organization/new
Authorization
Body
soft_budgetSoft Budget
max_budgetMax Budget
max_parallel_requestsMax Parallel Requests
tpm_limitTpm Limit
rpm_limitRpm Limit
model_max_budgetModel Max Budget
budget_durationBudget Duration
organization_idOrganization Id
organization_alias*Organization Alias
modelsModels
budget_idBudget Id
Response

Successful Response

Body
organization_id*Organization Id
organization_aliasOrganization Alias
budget_id*Budget Id
metadataMetadata
models*Models
created_by*Created By
updated_by*Updated By
created_at*Created At
updated_at*Updated At
Request
const response = await fetch('/organization/new', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "organization_alias": "text"
    }),
});
const data = await response.json();
Response
{
  "organization_id": "text",
  "organization_alias": "text",
  "budget_id": "text",
  "models": [
    "text"
  ],
  "created_by": "text",
  "updated_by": "text",
  "created_at": "2025-01-29T19:48:22.893Z",
  "updated_at": "2025-01-29T19:48:22.893Z"
}