Update team settings
Changes the team’s Grid settings, including default harness models and spend limits.
curl --request PATCH \
--url https://api.baseten.co/v1/grid/team_settings \
--header "Authorization: Bearer $BASETEN_API_KEY" \
--data '{
"harness_defaults": null,
"spend_limit": null,
"team_id": "abc1234"
}'import requests
import os
API_KEY = os.environ.get("BASETEN_API_KEY", "<YOUR_API_KEY>")
url = "https://api.baseten.co/v1/grid/team_settings"
headers = {"Authorization": f"Bearer {API_KEY}"}
response = requests.request(
"PATCH",
url,
headers=headers,
json={'harness_defaults': None, 'spend_limit': None, 'team_id': 'abc1234'}
)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
harness_defaults: {
claude_code: {primary: 'abc1234', background: 'def5678'},
opencode: {primary: 'abc1234', background: 'def5678'},
codex: {primary: 'abc1234'},
pi: {primary: 'abc1234'}
},
spend_limit: {per_member_monthly_limit_usd: '200', team_wide_monthly_limit_usd: '5000'},
team_id: 'abc1234'
})
};
fetch('https://api.baseten.co/v1/grid/team_settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.baseten.co/v1/grid/team_settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'harness_defaults' => [
'claude_code' => [
'primary' => 'abc1234',
'background' => 'def5678'
],
'opencode' => [
'primary' => 'abc1234',
'background' => 'def5678'
],
'codex' => [
'primary' => 'abc1234'
],
'pi' => [
'primary' => 'abc1234'
]
],
'spend_limit' => [
'per_member_monthly_limit_usd' => '200',
'team_wide_monthly_limit_usd' => '5000'
],
'team_id' => 'abc1234'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.baseten.co/v1/grid/team_settings"
payload := strings.NewReader("{\n \"harness_defaults\": {\n \"claude_code\": {\n \"primary\": \"abc1234\",\n \"background\": \"def5678\"\n },\n \"opencode\": {\n \"primary\": \"abc1234\",\n \"background\": \"def5678\"\n },\n \"codex\": {\n \"primary\": \"abc1234\"\n },\n \"pi\": {\n \"primary\": \"abc1234\"\n }\n },\n \"spend_limit\": {\n \"per_member_monthly_limit_usd\": \"200\",\n \"team_wide_monthly_limit_usd\": \"5000\"\n },\n \"team_id\": \"abc1234\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.baseten.co/v1/grid/team_settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"harness_defaults\": {\n \"claude_code\": {\n \"primary\": \"abc1234\",\n \"background\": \"def5678\"\n },\n \"opencode\": {\n \"primary\": \"abc1234\",\n \"background\": \"def5678\"\n },\n \"codex\": {\n \"primary\": \"abc1234\"\n },\n \"pi\": {\n \"primary\": \"abc1234\"\n }\n },\n \"spend_limit\": {\n \"per_member_monthly_limit_usd\": \"200\",\n \"team_wide_monthly_limit_usd\": \"5000\"\n },\n \"team_id\": \"abc1234\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.baseten.co/v1/grid/team_settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"harness_defaults\": {\n \"claude_code\": {\n \"primary\": \"abc1234\",\n \"background\": \"def5678\"\n },\n \"opencode\": {\n \"primary\": \"abc1234\",\n \"background\": \"def5678\"\n },\n \"codex\": {\n \"primary\": \"abc1234\"\n },\n \"pi\": {\n \"primary\": \"abc1234\"\n }\n },\n \"spend_limit\": {\n \"per_member_monthly_limit_usd\": \"200\",\n \"team_wide_monthly_limit_usd\": \"5000\"\n },\n \"team_id\": \"abc1234\"\n}"
response = http.request(request)
puts response.read_body{
"team_id": "abc1234",
"team_name": "Engineering",
"harness_defaults": {
"claude_code": {
"primary": {
"source": "user",
"route": {
"id": "<string>",
"name": "<string>",
"team_id": "<string>",
"team_name": "<string>",
"display_name": "<string>",
"description": "<string>",
"target": {
"type": "BASETEN_MODEL_API",
"model": "<string>"
},
"metadata": {
"slug": "<string>",
"display_name": "<string>",
"release_date": "2023-12-25",
"provider": "<string>",
"context_window": 123,
"max_output_tokens": 123,
"input_modalities": [
"<string>"
],
"tools": true,
"reasoning_effort_levels": [
"<string>"
],
"parallel_tool_calls": true,
"supported_api_formats": {
"messages": false,
"responses": false,
"chat_completions": false
},
"cost": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123,
"long_context": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123
}
}
},
"invoke_url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
},
"background": {
"source": "user",
"route": {
"id": "<string>",
"name": "<string>",
"team_id": "<string>",
"team_name": "<string>",
"display_name": "<string>",
"description": "<string>",
"target": {
"type": "BASETEN_MODEL_API",
"model": "<string>"
},
"metadata": {
"slug": "<string>",
"display_name": "<string>",
"release_date": "2023-12-25",
"provider": "<string>",
"context_window": 123,
"max_output_tokens": 123,
"input_modalities": [
"<string>"
],
"tools": true,
"reasoning_effort_levels": [
"<string>"
],
"parallel_tool_calls": true,
"supported_api_formats": {
"messages": false,
"responses": false,
"chat_completions": false
},
"cost": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123,
"long_context": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123
}
}
},
"invoke_url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
}
},
"opencode": {
"primary": {
"source": "user",
"route": {
"id": "<string>",
"name": "<string>",
"team_id": "<string>",
"team_name": "<string>",
"display_name": "<string>",
"description": "<string>",
"target": {
"type": "BASETEN_MODEL_API",
"model": "<string>"
},
"metadata": {
"slug": "<string>",
"display_name": "<string>",
"release_date": "2023-12-25",
"provider": "<string>",
"context_window": 123,
"max_output_tokens": 123,
"input_modalities": [
"<string>"
],
"tools": true,
"reasoning_effort_levels": [
"<string>"
],
"parallel_tool_calls": true,
"supported_api_formats": {
"messages": false,
"responses": false,
"chat_completions": false
},
"cost": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123,
"long_context": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123
}
}
},
"invoke_url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
},
"background": {
"source": "user",
"route": {
"id": "<string>",
"name": "<string>",
"team_id": "<string>",
"team_name": "<string>",
"display_name": "<string>",
"description": "<string>",
"target": {
"type": "BASETEN_MODEL_API",
"model": "<string>"
},
"metadata": {
"slug": "<string>",
"display_name": "<string>",
"release_date": "2023-12-25",
"provider": "<string>",
"context_window": 123,
"max_output_tokens": 123,
"input_modalities": [
"<string>"
],
"tools": true,
"reasoning_effort_levels": [
"<string>"
],
"parallel_tool_calls": true,
"supported_api_formats": {
"messages": false,
"responses": false,
"chat_completions": false
},
"cost": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123,
"long_context": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123
}
}
},
"invoke_url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
}
},
"codex": {
"primary": {
"source": "user",
"route": {
"id": "<string>",
"name": "<string>",
"team_id": "<string>",
"team_name": "<string>",
"display_name": "<string>",
"description": "<string>",
"target": {
"type": "BASETEN_MODEL_API",
"model": "<string>"
},
"metadata": {
"slug": "<string>",
"display_name": "<string>",
"release_date": "2023-12-25",
"provider": "<string>",
"context_window": 123,
"max_output_tokens": 123,
"input_modalities": [
"<string>"
],
"tools": true,
"reasoning_effort_levels": [
"<string>"
],
"parallel_tool_calls": true,
"supported_api_formats": {
"messages": false,
"responses": false,
"chat_completions": false
},
"cost": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123,
"long_context": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123
}
}
},
"invoke_url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
}
},
"pi": {
"primary": {
"source": "user",
"route": {
"id": "<string>",
"name": "<string>",
"team_id": "<string>",
"team_name": "<string>",
"display_name": "<string>",
"description": "<string>",
"target": {
"type": "BASETEN_MODEL_API",
"model": "<string>"
},
"metadata": {
"slug": "<string>",
"display_name": "<string>",
"release_date": "2023-12-25",
"provider": "<string>",
"context_window": 123,
"max_output_tokens": 123,
"input_modalities": [
"<string>"
],
"tools": true,
"reasoning_effort_levels": [
"<string>"
],
"parallel_tool_calls": true,
"supported_api_formats": {
"messages": false,
"responses": false,
"chat_completions": false
},
"cost": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123,
"long_context": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123
}
}
},
"invoke_url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
}
}
},
"spend_limit": {
"per_member_monthly_limit_usd": "200",
"team_wide_monthly_limit_usd": "5000"
}
}Authorizations
Send Authorization: Bearer <api_key>. The legacy Authorization: Api-Key <api_key> scheme is also accepted.
Body
Harnesses to change; harnesses left out are unchanged. Pass null to clear every harness, so each role uses the team's default.
Show child attributes
Show child attributes
Spend limit fields to change. Pass null to remove the team's limits; omit to leave them unchanged.
Show child attributes
Show child attributes
ID of the team. When omitted, the team you belong to; required when you belong to several.
"abc1234"
Response
ID of the team.
"abc1234"
Name of the team.
"Engineering"
Route for each model role of each coding harness. A role with no route set by a team admin uses the default chosen from the team's Model API routes: the recommended model for primary and the lowest-priced model for background. These defaults never use external-provider routes.
Show child attributes
Show child attributes
Spend limits for Baseten Grid for members' spend in this team.
Show child attributes
Show child attributes
Was this page helpful?
curl --request PATCH \
--url https://api.baseten.co/v1/grid/team_settings \
--header "Authorization: Bearer $BASETEN_API_KEY" \
--data '{
"harness_defaults": null,
"spend_limit": null,
"team_id": "abc1234"
}'import requests
import os
API_KEY = os.environ.get("BASETEN_API_KEY", "<YOUR_API_KEY>")
url = "https://api.baseten.co/v1/grid/team_settings"
headers = {"Authorization": f"Bearer {API_KEY}"}
response = requests.request(
"PATCH",
url,
headers=headers,
json={'harness_defaults': None, 'spend_limit': None, 'team_id': 'abc1234'}
)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
harness_defaults: {
claude_code: {primary: 'abc1234', background: 'def5678'},
opencode: {primary: 'abc1234', background: 'def5678'},
codex: {primary: 'abc1234'},
pi: {primary: 'abc1234'}
},
spend_limit: {per_member_monthly_limit_usd: '200', team_wide_monthly_limit_usd: '5000'},
team_id: 'abc1234'
})
};
fetch('https://api.baseten.co/v1/grid/team_settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.baseten.co/v1/grid/team_settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'harness_defaults' => [
'claude_code' => [
'primary' => 'abc1234',
'background' => 'def5678'
],
'opencode' => [
'primary' => 'abc1234',
'background' => 'def5678'
],
'codex' => [
'primary' => 'abc1234'
],
'pi' => [
'primary' => 'abc1234'
]
],
'spend_limit' => [
'per_member_monthly_limit_usd' => '200',
'team_wide_monthly_limit_usd' => '5000'
],
'team_id' => 'abc1234'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.baseten.co/v1/grid/team_settings"
payload := strings.NewReader("{\n \"harness_defaults\": {\n \"claude_code\": {\n \"primary\": \"abc1234\",\n \"background\": \"def5678\"\n },\n \"opencode\": {\n \"primary\": \"abc1234\",\n \"background\": \"def5678\"\n },\n \"codex\": {\n \"primary\": \"abc1234\"\n },\n \"pi\": {\n \"primary\": \"abc1234\"\n }\n },\n \"spend_limit\": {\n \"per_member_monthly_limit_usd\": \"200\",\n \"team_wide_monthly_limit_usd\": \"5000\"\n },\n \"team_id\": \"abc1234\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.baseten.co/v1/grid/team_settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"harness_defaults\": {\n \"claude_code\": {\n \"primary\": \"abc1234\",\n \"background\": \"def5678\"\n },\n \"opencode\": {\n \"primary\": \"abc1234\",\n \"background\": \"def5678\"\n },\n \"codex\": {\n \"primary\": \"abc1234\"\n },\n \"pi\": {\n \"primary\": \"abc1234\"\n }\n },\n \"spend_limit\": {\n \"per_member_monthly_limit_usd\": \"200\",\n \"team_wide_monthly_limit_usd\": \"5000\"\n },\n \"team_id\": \"abc1234\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.baseten.co/v1/grid/team_settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"harness_defaults\": {\n \"claude_code\": {\n \"primary\": \"abc1234\",\n \"background\": \"def5678\"\n },\n \"opencode\": {\n \"primary\": \"abc1234\",\n \"background\": \"def5678\"\n },\n \"codex\": {\n \"primary\": \"abc1234\"\n },\n \"pi\": {\n \"primary\": \"abc1234\"\n }\n },\n \"spend_limit\": {\n \"per_member_monthly_limit_usd\": \"200\",\n \"team_wide_monthly_limit_usd\": \"5000\"\n },\n \"team_id\": \"abc1234\"\n}"
response = http.request(request)
puts response.read_body{
"team_id": "abc1234",
"team_name": "Engineering",
"harness_defaults": {
"claude_code": {
"primary": {
"source": "user",
"route": {
"id": "<string>",
"name": "<string>",
"team_id": "<string>",
"team_name": "<string>",
"display_name": "<string>",
"description": "<string>",
"target": {
"type": "BASETEN_MODEL_API",
"model": "<string>"
},
"metadata": {
"slug": "<string>",
"display_name": "<string>",
"release_date": "2023-12-25",
"provider": "<string>",
"context_window": 123,
"max_output_tokens": 123,
"input_modalities": [
"<string>"
],
"tools": true,
"reasoning_effort_levels": [
"<string>"
],
"parallel_tool_calls": true,
"supported_api_formats": {
"messages": false,
"responses": false,
"chat_completions": false
},
"cost": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123,
"long_context": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123
}
}
},
"invoke_url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
},
"background": {
"source": "user",
"route": {
"id": "<string>",
"name": "<string>",
"team_id": "<string>",
"team_name": "<string>",
"display_name": "<string>",
"description": "<string>",
"target": {
"type": "BASETEN_MODEL_API",
"model": "<string>"
},
"metadata": {
"slug": "<string>",
"display_name": "<string>",
"release_date": "2023-12-25",
"provider": "<string>",
"context_window": 123,
"max_output_tokens": 123,
"input_modalities": [
"<string>"
],
"tools": true,
"reasoning_effort_levels": [
"<string>"
],
"parallel_tool_calls": true,
"supported_api_formats": {
"messages": false,
"responses": false,
"chat_completions": false
},
"cost": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123,
"long_context": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123
}
}
},
"invoke_url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
}
},
"opencode": {
"primary": {
"source": "user",
"route": {
"id": "<string>",
"name": "<string>",
"team_id": "<string>",
"team_name": "<string>",
"display_name": "<string>",
"description": "<string>",
"target": {
"type": "BASETEN_MODEL_API",
"model": "<string>"
},
"metadata": {
"slug": "<string>",
"display_name": "<string>",
"release_date": "2023-12-25",
"provider": "<string>",
"context_window": 123,
"max_output_tokens": 123,
"input_modalities": [
"<string>"
],
"tools": true,
"reasoning_effort_levels": [
"<string>"
],
"parallel_tool_calls": true,
"supported_api_formats": {
"messages": false,
"responses": false,
"chat_completions": false
},
"cost": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123,
"long_context": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123
}
}
},
"invoke_url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
},
"background": {
"source": "user",
"route": {
"id": "<string>",
"name": "<string>",
"team_id": "<string>",
"team_name": "<string>",
"display_name": "<string>",
"description": "<string>",
"target": {
"type": "BASETEN_MODEL_API",
"model": "<string>"
},
"metadata": {
"slug": "<string>",
"display_name": "<string>",
"release_date": "2023-12-25",
"provider": "<string>",
"context_window": 123,
"max_output_tokens": 123,
"input_modalities": [
"<string>"
],
"tools": true,
"reasoning_effort_levels": [
"<string>"
],
"parallel_tool_calls": true,
"supported_api_formats": {
"messages": false,
"responses": false,
"chat_completions": false
},
"cost": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123,
"long_context": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123
}
}
},
"invoke_url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
}
},
"codex": {
"primary": {
"source": "user",
"route": {
"id": "<string>",
"name": "<string>",
"team_id": "<string>",
"team_name": "<string>",
"display_name": "<string>",
"description": "<string>",
"target": {
"type": "BASETEN_MODEL_API",
"model": "<string>"
},
"metadata": {
"slug": "<string>",
"display_name": "<string>",
"release_date": "2023-12-25",
"provider": "<string>",
"context_window": 123,
"max_output_tokens": 123,
"input_modalities": [
"<string>"
],
"tools": true,
"reasoning_effort_levels": [
"<string>"
],
"parallel_tool_calls": true,
"supported_api_formats": {
"messages": false,
"responses": false,
"chat_completions": false
},
"cost": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123,
"long_context": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123
}
}
},
"invoke_url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
}
},
"pi": {
"primary": {
"source": "user",
"route": {
"id": "<string>",
"name": "<string>",
"team_id": "<string>",
"team_name": "<string>",
"display_name": "<string>",
"description": "<string>",
"target": {
"type": "BASETEN_MODEL_API",
"model": "<string>"
},
"metadata": {
"slug": "<string>",
"display_name": "<string>",
"release_date": "2023-12-25",
"provider": "<string>",
"context_window": 123,
"max_output_tokens": 123,
"input_modalities": [
"<string>"
],
"tools": true,
"reasoning_effort_levels": [
"<string>"
],
"parallel_tool_calls": true,
"supported_api_formats": {
"messages": false,
"responses": false,
"chat_completions": false
},
"cost": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123,
"long_context": {
"input": 123,
"output": 123,
"cache_read": 123,
"cache_write": 123
}
}
},
"invoke_url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
}
}
},
"spend_limit": {
"per_member_monthly_limit_usd": "200",
"team_wide_monthly_limit_usd": "5000"
}
}