Set or clear an API key's request-rate limit
curl --request POST \
--url https://api.eddy.engineer/admin/keys/{key_hash}/limits \
--header 'Content-Type: application/json' \
--header 'x-admin-token: <api-key>' \
--data '{}'import requests
url = "https://api.eddy.engineer/admin/keys/{key_hash}/limits"
payload = {}
headers = {
"x-admin-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-admin-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.eddy.engineer/admin/keys/{key_hash}/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.eddy.engineer/admin/keys/{key_hash}/limits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-admin-token: <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.eddy.engineer/admin/keys/{key_hash}/limits"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-admin-token", "<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.post("https://api.eddy.engineer/admin/keys/{key_hash}/limits")
.header("x-admin-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/admin/keys/{key_hash}/limits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-admin-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"record": {
"created_at_unix_ms": 123,
"key_hash": "<string>",
"limits": {
"requests_per_minute": 500000,
"burst": 50000
},
"llm_gateway": true,
"llm_gateway_sealed": true,
"name": "<string>",
"owner_uid": "<string>",
"revoked": true,
"scopes": [
"<string>"
],
"webhook": {
"signed": true,
"url": "<string>"
}
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Admin
Set or clear an API key's request-rate limit
A token bucket per key: burst calls at once, refilled at requests_per_minute. Every /v1 and /admin call the key makes (by its x-api-key header, or by a page session signed in with it) takes one; an empty bucket is 429 RATE_LIMITED with retry-after and x-ratelimit-*. limits: null clears the key’s own limit, so the deployment default (SS_KEY_RATE_DEFAULT; unset = unlimited) applies. Enforced per gateway replica; another replica picks a change up within its key cache window (30 s). Calls the engine makes in-process with the key (tools.call, an app function’s ss.call) count too; an agent run’s tools act under its own delegated token. Admins only; requests_per_minute 1..=1000000, burst 1..=100000, else 400 INVALID_LIMITS.
POST
/
admin
/
keys
/
{key_hash}
/
limits
Set or clear an API key's request-rate limit
curl --request POST \
--url https://api.eddy.engineer/admin/keys/{key_hash}/limits \
--header 'Content-Type: application/json' \
--header 'x-admin-token: <api-key>' \
--data '{}'import requests
url = "https://api.eddy.engineer/admin/keys/{key_hash}/limits"
payload = {}
headers = {
"x-admin-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-admin-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.eddy.engineer/admin/keys/{key_hash}/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.eddy.engineer/admin/keys/{key_hash}/limits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-admin-token: <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.eddy.engineer/admin/keys/{key_hash}/limits"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-admin-token", "<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.post("https://api.eddy.engineer/admin/keys/{key_hash}/limits")
.header("x-admin-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/admin/keys/{key_hash}/limits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-admin-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{}"
response = http.request(request)
puts response.read_body{
"record": {
"created_at_unix_ms": 123,
"key_hash": "<string>",
"limits": {
"requests_per_minute": 500000,
"burst": 50000
},
"llm_gateway": true,
"llm_gateway_sealed": true,
"name": "<string>",
"owner_uid": "<string>",
"revoked": true,
"scopes": [
"<string>"
],
"webhook": {
"signed": true,
"url": "<string>"
}
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Body
application/json