Update Ask Feather Limits
Update one or more Ask Feather limits in Redis (partial update; omitted fields keep their current value). Internal-only.
PUT
/
v1
/
ask-feather
/
limits
Update Ask Feather Limits
curl --request PUT \
--url https://api-sandbox.featherhq.com/v1/ask-feather/limits \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"daily_org_budget_usd": 1,
"daily_org_budget_alert_ratio": 0.5,
"turns_per_minute_per_org": 1,
"turns_per_day_per_org": 1,
"turns_per_day_per_user": 1,
"total_tokens_limit": 2,
"tool_calls_limit": 2,
"max_iterations": 2,
"history_char_budget_retry_ratio": 0.5,
"max_tokens": 2,
"max_code_output_chars": 1,
"history_char_budget": 1,
"history_max_messages": 1,
"web_search_max_uses": 2,
"max_tool_result_chars": 1,
"turn_lock_ttl_seconds": 2,
"compile_wait_timeout_seconds": 1,
"compile_poll_interval_seconds": 1
}
'import requests
url = "https://api-sandbox.featherhq.com/v1/ask-feather/limits"
payload = {
"daily_org_budget_usd": 1,
"daily_org_budget_alert_ratio": 0.5,
"turns_per_minute_per_org": 1,
"turns_per_day_per_org": 1,
"turns_per_day_per_user": 1,
"total_tokens_limit": 2,
"tool_calls_limit": 2,
"max_iterations": 2,
"history_char_budget_retry_ratio": 0.5,
"max_tokens": 2,
"max_code_output_chars": 1,
"history_char_budget": 1,
"history_max_messages": 1,
"web_search_max_uses": 2,
"max_tool_result_chars": 1,
"turn_lock_ttl_seconds": 2,
"compile_wait_timeout_seconds": 1,
"compile_poll_interval_seconds": 1
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
daily_org_budget_usd: 1,
daily_org_budget_alert_ratio: 0.5,
turns_per_minute_per_org: 1,
turns_per_day_per_org: 1,
turns_per_day_per_user: 1,
total_tokens_limit: 2,
tool_calls_limit: 2,
max_iterations: 2,
history_char_budget_retry_ratio: 0.5,
max_tokens: 2,
max_code_output_chars: 1,
history_char_budget: 1,
history_max_messages: 1,
web_search_max_uses: 2,
max_tool_result_chars: 1,
turn_lock_ttl_seconds: 2,
compile_wait_timeout_seconds: 1,
compile_poll_interval_seconds: 1
})
};
fetch('https://api-sandbox.featherhq.com/v1/ask-feather/limits', 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-sandbox.featherhq.com/v1/ask-feather/limits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'daily_org_budget_usd' => 1,
'daily_org_budget_alert_ratio' => 0.5,
'turns_per_minute_per_org' => 1,
'turns_per_day_per_org' => 1,
'turns_per_day_per_user' => 1,
'total_tokens_limit' => 2,
'tool_calls_limit' => 2,
'max_iterations' => 2,
'history_char_budget_retry_ratio' => 0.5,
'max_tokens' => 2,
'max_code_output_chars' => 1,
'history_char_budget' => 1,
'history_max_messages' => 1,
'web_search_max_uses' => 2,
'max_tool_result_chars' => 1,
'turn_lock_ttl_seconds' => 2,
'compile_wait_timeout_seconds' => 1,
'compile_poll_interval_seconds' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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-sandbox.featherhq.com/v1/ask-feather/limits"
payload := strings.NewReader("{\n \"daily_org_budget_usd\": 1,\n \"daily_org_budget_alert_ratio\": 0.5,\n \"turns_per_minute_per_org\": 1,\n \"turns_per_day_per_org\": 1,\n \"turns_per_day_per_user\": 1,\n \"total_tokens_limit\": 2,\n \"tool_calls_limit\": 2,\n \"max_iterations\": 2,\n \"history_char_budget_retry_ratio\": 0.5,\n \"max_tokens\": 2,\n \"max_code_output_chars\": 1,\n \"history_char_budget\": 1,\n \"history_max_messages\": 1,\n \"web_search_max_uses\": 2,\n \"max_tool_result_chars\": 1,\n \"turn_lock_ttl_seconds\": 2,\n \"compile_wait_timeout_seconds\": 1,\n \"compile_poll_interval_seconds\": 1\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.put("https://api-sandbox.featherhq.com/v1/ask-feather/limits")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"daily_org_budget_usd\": 1,\n \"daily_org_budget_alert_ratio\": 0.5,\n \"turns_per_minute_per_org\": 1,\n \"turns_per_day_per_org\": 1,\n \"turns_per_day_per_user\": 1,\n \"total_tokens_limit\": 2,\n \"tool_calls_limit\": 2,\n \"max_iterations\": 2,\n \"history_char_budget_retry_ratio\": 0.5,\n \"max_tokens\": 2,\n \"max_code_output_chars\": 1,\n \"history_char_budget\": 1,\n \"history_max_messages\": 1,\n \"web_search_max_uses\": 2,\n \"max_tool_result_chars\": 1,\n \"turn_lock_ttl_seconds\": 2,\n \"compile_wait_timeout_seconds\": 1,\n \"compile_poll_interval_seconds\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.featherhq.com/v1/ask-feather/limits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"daily_org_budget_usd\": 1,\n \"daily_org_budget_alert_ratio\": 0.5,\n \"turns_per_minute_per_org\": 1,\n \"turns_per_day_per_org\": 1,\n \"turns_per_day_per_user\": 1,\n \"total_tokens_limit\": 2,\n \"tool_calls_limit\": 2,\n \"max_iterations\": 2,\n \"history_char_budget_retry_ratio\": 0.5,\n \"max_tokens\": 2,\n \"max_code_output_chars\": 1,\n \"history_char_budget\": 1,\n \"history_max_messages\": 1,\n \"web_search_max_uses\": 2,\n \"max_tool_result_chars\": 1,\n \"turn_lock_ttl_seconds\": 2,\n \"compile_wait_timeout_seconds\": 1,\n \"compile_poll_interval_seconds\": 1\n}"
response = http.request(request)
puts response.read_body{
"daily_org_budget_usd": 123,
"daily_org_budget_alert_ratio": 123,
"turns_per_minute_per_org": 123,
"turns_per_day_per_org": 123,
"turns_per_day_per_user": 123,
"total_tokens_limit": 123,
"tool_calls_limit": 123,
"max_iterations": 123,
"history_char_budget_retry_ratio": 123,
"max_tokens": 123,
"max_code_output_chars": 123,
"history_char_budget": 123,
"history_max_messages": 123,
"web_search_max_uses": 123,
"max_tool_result_chars": 123,
"turn_lock_ttl_seconds": 123,
"compile_wait_timeout_seconds": 123,
"compile_poll_interval_seconds": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Body
application/json
Partial update for Ask Feather limits — omitted fields keep their value.
Required range:
x >= 0Required range:
0 <= x <= 1Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 1Required range:
x >= 1Required range:
x >= 1Required range:
0 <= x <= 1Required range:
x >= 1Required range:
x >= 0Required range:
x >= 0Required range:
x >= 0Required range:
x >= 1Required range:
x >= 0Required range:
x >= 1Required range:
x >= 0Required range:
x > 0Response
Successful Response
Current Ask Feather cost/quota limits (mirrors limits.AskFeatherLimits).
Read from / written to Redis via the internal /ask-feather/limits endpoint.
Was this page helpful?
⌘I
Update Ask Feather Limits
curl --request PUT \
--url https://api-sandbox.featherhq.com/v1/ask-feather/limits \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"daily_org_budget_usd": 1,
"daily_org_budget_alert_ratio": 0.5,
"turns_per_minute_per_org": 1,
"turns_per_day_per_org": 1,
"turns_per_day_per_user": 1,
"total_tokens_limit": 2,
"tool_calls_limit": 2,
"max_iterations": 2,
"history_char_budget_retry_ratio": 0.5,
"max_tokens": 2,
"max_code_output_chars": 1,
"history_char_budget": 1,
"history_max_messages": 1,
"web_search_max_uses": 2,
"max_tool_result_chars": 1,
"turn_lock_ttl_seconds": 2,
"compile_wait_timeout_seconds": 1,
"compile_poll_interval_seconds": 1
}
'import requests
url = "https://api-sandbox.featherhq.com/v1/ask-feather/limits"
payload = {
"daily_org_budget_usd": 1,
"daily_org_budget_alert_ratio": 0.5,
"turns_per_minute_per_org": 1,
"turns_per_day_per_org": 1,
"turns_per_day_per_user": 1,
"total_tokens_limit": 2,
"tool_calls_limit": 2,
"max_iterations": 2,
"history_char_budget_retry_ratio": 0.5,
"max_tokens": 2,
"max_code_output_chars": 1,
"history_char_budget": 1,
"history_max_messages": 1,
"web_search_max_uses": 2,
"max_tool_result_chars": 1,
"turn_lock_ttl_seconds": 2,
"compile_wait_timeout_seconds": 1,
"compile_poll_interval_seconds": 1
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
daily_org_budget_usd: 1,
daily_org_budget_alert_ratio: 0.5,
turns_per_minute_per_org: 1,
turns_per_day_per_org: 1,
turns_per_day_per_user: 1,
total_tokens_limit: 2,
tool_calls_limit: 2,
max_iterations: 2,
history_char_budget_retry_ratio: 0.5,
max_tokens: 2,
max_code_output_chars: 1,
history_char_budget: 1,
history_max_messages: 1,
web_search_max_uses: 2,
max_tool_result_chars: 1,
turn_lock_ttl_seconds: 2,
compile_wait_timeout_seconds: 1,
compile_poll_interval_seconds: 1
})
};
fetch('https://api-sandbox.featherhq.com/v1/ask-feather/limits', 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-sandbox.featherhq.com/v1/ask-feather/limits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'daily_org_budget_usd' => 1,
'daily_org_budget_alert_ratio' => 0.5,
'turns_per_minute_per_org' => 1,
'turns_per_day_per_org' => 1,
'turns_per_day_per_user' => 1,
'total_tokens_limit' => 2,
'tool_calls_limit' => 2,
'max_iterations' => 2,
'history_char_budget_retry_ratio' => 0.5,
'max_tokens' => 2,
'max_code_output_chars' => 1,
'history_char_budget' => 1,
'history_max_messages' => 1,
'web_search_max_uses' => 2,
'max_tool_result_chars' => 1,
'turn_lock_ttl_seconds' => 2,
'compile_wait_timeout_seconds' => 1,
'compile_poll_interval_seconds' => 1
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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-sandbox.featherhq.com/v1/ask-feather/limits"
payload := strings.NewReader("{\n \"daily_org_budget_usd\": 1,\n \"daily_org_budget_alert_ratio\": 0.5,\n \"turns_per_minute_per_org\": 1,\n \"turns_per_day_per_org\": 1,\n \"turns_per_day_per_user\": 1,\n \"total_tokens_limit\": 2,\n \"tool_calls_limit\": 2,\n \"max_iterations\": 2,\n \"history_char_budget_retry_ratio\": 0.5,\n \"max_tokens\": 2,\n \"max_code_output_chars\": 1,\n \"history_char_budget\": 1,\n \"history_max_messages\": 1,\n \"web_search_max_uses\": 2,\n \"max_tool_result_chars\": 1,\n \"turn_lock_ttl_seconds\": 2,\n \"compile_wait_timeout_seconds\": 1,\n \"compile_poll_interval_seconds\": 1\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.put("https://api-sandbox.featherhq.com/v1/ask-feather/limits")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"daily_org_budget_usd\": 1,\n \"daily_org_budget_alert_ratio\": 0.5,\n \"turns_per_minute_per_org\": 1,\n \"turns_per_day_per_org\": 1,\n \"turns_per_day_per_user\": 1,\n \"total_tokens_limit\": 2,\n \"tool_calls_limit\": 2,\n \"max_iterations\": 2,\n \"history_char_budget_retry_ratio\": 0.5,\n \"max_tokens\": 2,\n \"max_code_output_chars\": 1,\n \"history_char_budget\": 1,\n \"history_max_messages\": 1,\n \"web_search_max_uses\": 2,\n \"max_tool_result_chars\": 1,\n \"turn_lock_ttl_seconds\": 2,\n \"compile_wait_timeout_seconds\": 1,\n \"compile_poll_interval_seconds\": 1\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.featherhq.com/v1/ask-feather/limits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"daily_org_budget_usd\": 1,\n \"daily_org_budget_alert_ratio\": 0.5,\n \"turns_per_minute_per_org\": 1,\n \"turns_per_day_per_org\": 1,\n \"turns_per_day_per_user\": 1,\n \"total_tokens_limit\": 2,\n \"tool_calls_limit\": 2,\n \"max_iterations\": 2,\n \"history_char_budget_retry_ratio\": 0.5,\n \"max_tokens\": 2,\n \"max_code_output_chars\": 1,\n \"history_char_budget\": 1,\n \"history_max_messages\": 1,\n \"web_search_max_uses\": 2,\n \"max_tool_result_chars\": 1,\n \"turn_lock_ttl_seconds\": 2,\n \"compile_wait_timeout_seconds\": 1,\n \"compile_poll_interval_seconds\": 1\n}"
response = http.request(request)
puts response.read_body{
"daily_org_budget_usd": 123,
"daily_org_budget_alert_ratio": 123,
"turns_per_minute_per_org": 123,
"turns_per_day_per_org": 123,
"turns_per_day_per_user": 123,
"total_tokens_limit": 123,
"tool_calls_limit": 123,
"max_iterations": 123,
"history_char_budget_retry_ratio": 123,
"max_tokens": 123,
"max_code_output_chars": 123,
"history_char_budget": 123,
"history_max_messages": 123,
"web_search_max_uses": 123,
"max_tool_result_chars": 123,
"turn_lock_ttl_seconds": 123,
"compile_wait_timeout_seconds": 123,
"compile_poll_interval_seconds": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}