External capacity
Configure governed external fallback
PUT
/
api
/
v1
/
deployments
/
{name}
/
external-policy
Configure governed external fallback
curl --request PUT \
--url http://127.0.0.1:18000/api/v1/deployments/{name}/external-policy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cost_limit_microusd": 2,
"enabled": true,
"max_request_cost_microusd": 2,
"privacy_acknowledged": true,
"request_limit": 2,
"secret_reference_id": "<string>",
"target": "<string>",
"breach_intervals": 1,
"cooldown_seconds": 60,
"overflow_mode": "health",
"queue_threshold": 123,
"recovery_intervals": 2,
"signal_max_age_seconds": 30
}
'import requests
url = "http://127.0.0.1:18000/api/v1/deployments/{name}/external-policy"
payload = {
"cost_limit_microusd": 2,
"enabled": True,
"max_request_cost_microusd": 2,
"privacy_acknowledged": True,
"request_limit": 2,
"secret_reference_id": "<string>",
"target": "<string>",
"breach_intervals": 1,
"cooldown_seconds": 60,
"overflow_mode": "health",
"queue_threshold": 123,
"recovery_intervals": 2,
"signal_max_age_seconds": 30
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cost_limit_microusd: 2,
enabled: true,
max_request_cost_microusd: 2,
privacy_acknowledged: true,
request_limit: 2,
secret_reference_id: '<string>',
target: '<string>',
breach_intervals: 1,
cooldown_seconds: 60,
overflow_mode: 'health',
queue_threshold: 123,
recovery_intervals: 2,
signal_max_age_seconds: 30
})
};
fetch('http://127.0.0.1:18000/api/v1/deployments/{name}/external-policy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:18000/api/v1/deployments/{name}/external-policy"
payload := strings.NewReader("{\n \"cost_limit_microusd\": 2,\n \"enabled\": true,\n \"max_request_cost_microusd\": 2,\n \"privacy_acknowledged\": true,\n \"request_limit\": 2,\n \"secret_reference_id\": \"<string>\",\n \"target\": \"<string>\",\n \"breach_intervals\": 1,\n \"cooldown_seconds\": 60,\n \"overflow_mode\": \"health\",\n \"queue_threshold\": 123,\n \"recovery_intervals\": 2,\n \"signal_max_age_seconds\": 30\n}")
req, _ := http.NewRequest("PUT", 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))
}{
"policy": {
"adapter": "<string>",
"cost_limit_microusd": 123,
"deployment_id": "<string>",
"enabled": true,
"id": "<string>",
"max_request_cost_microusd": 123,
"privacy_acknowledged": true,
"request_limit": 123,
"target_id": "<string>",
"breach_intervals": 123,
"cooldown_seconds": 123,
"cost_reserved_microusd": 123,
"created_at": "2023-11-07T05:31:56Z",
"queue_threshold": 123,
"recovery_intervals": 123,
"requests_reserved": 123,
"secret_reference_id": "<string>",
"signal_max_age_seconds": 123,
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"category": "<string>",
"remediation": "<string>",
"request_id": "<string>",
"retryable": true
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Minimum string length:
1Body
application/json
Available options:
openrouter, openai-compatible-external Required range:
x >= 1Required range:
x >= 1Required range:
x >= 1Minimum string length:
1Minimum string length:
1Required range:
1 <= x <= 100Required range:
0 <= x <= 86400Available options:
health, health_and_queue Required range:
1 <= x <= 100Required range:
1 <= x <= 600Response
Success
Show child attributes
Show child attributes
⌘I
Configure governed external fallback
curl --request PUT \
--url http://127.0.0.1:18000/api/v1/deployments/{name}/external-policy \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cost_limit_microusd": 2,
"enabled": true,
"max_request_cost_microusd": 2,
"privacy_acknowledged": true,
"request_limit": 2,
"secret_reference_id": "<string>",
"target": "<string>",
"breach_intervals": 1,
"cooldown_seconds": 60,
"overflow_mode": "health",
"queue_threshold": 123,
"recovery_intervals": 2,
"signal_max_age_seconds": 30
}
'import requests
url = "http://127.0.0.1:18000/api/v1/deployments/{name}/external-policy"
payload = {
"cost_limit_microusd": 2,
"enabled": True,
"max_request_cost_microusd": 2,
"privacy_acknowledged": True,
"request_limit": 2,
"secret_reference_id": "<string>",
"target": "<string>",
"breach_intervals": 1,
"cooldown_seconds": 60,
"overflow_mode": "health",
"queue_threshold": 123,
"recovery_intervals": 2,
"signal_max_age_seconds": 30
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
cost_limit_microusd: 2,
enabled: true,
max_request_cost_microusd: 2,
privacy_acknowledged: true,
request_limit: 2,
secret_reference_id: '<string>',
target: '<string>',
breach_intervals: 1,
cooldown_seconds: 60,
overflow_mode: 'health',
queue_threshold: 123,
recovery_intervals: 2,
signal_max_age_seconds: 30
})
};
fetch('http://127.0.0.1:18000/api/v1/deployments/{name}/external-policy', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:18000/api/v1/deployments/{name}/external-policy"
payload := strings.NewReader("{\n \"cost_limit_microusd\": 2,\n \"enabled\": true,\n \"max_request_cost_microusd\": 2,\n \"privacy_acknowledged\": true,\n \"request_limit\": 2,\n \"secret_reference_id\": \"<string>\",\n \"target\": \"<string>\",\n \"breach_intervals\": 1,\n \"cooldown_seconds\": 60,\n \"overflow_mode\": \"health\",\n \"queue_threshold\": 123,\n \"recovery_intervals\": 2,\n \"signal_max_age_seconds\": 30\n}")
req, _ := http.NewRequest("PUT", 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))
}{
"policy": {
"adapter": "<string>",
"cost_limit_microusd": 123,
"deployment_id": "<string>",
"enabled": true,
"id": "<string>",
"max_request_cost_microusd": 123,
"privacy_acknowledged": true,
"request_limit": 123,
"target_id": "<string>",
"breach_intervals": 123,
"cooldown_seconds": 123,
"cost_reserved_microusd": 123,
"created_at": "2023-11-07T05:31:56Z",
"queue_threshold": 123,
"recovery_intervals": 123,
"requests_reserved": 123,
"secret_reference_id": "<string>",
"signal_max_age_seconds": 123,
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"category": "<string>",
"remediation": "<string>",
"request_id": "<string>",
"retryable": true
}
}