Set or clear an API key's own LLM-gateway token
curl --request POST \
--url https://api.eddy.engineer/admin/keys/{key_hash}/llm-gateway \
--header 'Content-Type: application/json' \
--header 'x-admin-token: <api-key>' \
--data '
{
"token": "<string>"
}
'import requests
url = "https://api.eddy.engineer/admin/keys/{key_hash}/llm-gateway"
payload = { "token": "<string>" }
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({token: '<string>'})
};
fetch('https://api.eddy.engineer/admin/keys/{key_hash}/llm-gateway', 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}/llm-gateway",
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([
'token' => '<string>'
]),
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}/llm-gateway"
payload := strings.NewReader("{\n \"token\": \"<string>\"\n}")
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}/llm-gateway")
.header("x-admin-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/admin/keys/{key_hash}/llm-gateway")
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 = "{\n \"token\": \"<string>\"\n}"
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>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}Admin
Set or clear an API key's own LLM-gateway token
The key IS the tenant: with a token of its own, /v1/llm.models lists the gateway’s live grant to that token and /v1/llm.messages forwards with it; token: null returns the key to the deployment’s own gateway credential and allowlist. Admins only; the token is stored sealed (AES-256-GCM, bound to the key’s hash) and never answered back (record.llm_gateway says whether one is set, record.llm_gateway_sealed whether it is sealed). With no seal key on the deployment a token is refused (503 SEAL_UNCONFIGURED); clearing one always works. A value in the at-rest format (sealed:…) is refused (400 INVALID_TOKEN).
POST
/
admin
/
keys
/
{key_hash}
/
llm-gateway
Set or clear an API key's own LLM-gateway token
curl --request POST \
--url https://api.eddy.engineer/admin/keys/{key_hash}/llm-gateway \
--header 'Content-Type: application/json' \
--header 'x-admin-token: <api-key>' \
--data '
{
"token": "<string>"
}
'import requests
url = "https://api.eddy.engineer/admin/keys/{key_hash}/llm-gateway"
payload = { "token": "<string>" }
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({token: '<string>'})
};
fetch('https://api.eddy.engineer/admin/keys/{key_hash}/llm-gateway', 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}/llm-gateway",
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([
'token' => '<string>'
]),
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}/llm-gateway"
payload := strings.NewReader("{\n \"token\": \"<string>\"\n}")
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}/llm-gateway")
.header("x-admin-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eddy.engineer/admin/keys/{key_hash}/llm-gateway")
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 = "{\n \"token\": \"<string>\"\n}"
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>"
}
}{
"error": {
"code": "INVALID_GEOMETRY",
"message": "<string>"
}
}