Turn AI auto-recharge on or off
curl --request POST \
--url https://dojo.frogbot.ai/api/billing/ai-auto-recharge \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspace": "6720f1…",
"on": true,
"thresholdUSD": 10,
"amountUSD": 50
}
'import requests
url = "https://dojo.frogbot.ai/api/billing/ai-auto-recharge"
payload = {
"workspace": "6720f1…",
"on": True,
"thresholdUSD": 10,
"amountUSD": 50
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({workspace: '6720f1…', on: true, thresholdUSD: 10, amountUSD: 50})
};
fetch('https://dojo.frogbot.ai/api/billing/ai-auto-recharge', 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://dojo.frogbot.ai/api/billing/ai-auto-recharge",
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([
'workspace' => '6720f1…',
'on' => true,
'thresholdUSD' => 10,
'amountUSD' => 50
]),
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://dojo.frogbot.ai/api/billing/ai-auto-recharge"
payload := strings.NewReader("{\n \"workspace\": \"6720f1…\",\n \"on\": true,\n \"thresholdUSD\": 10,\n \"amountUSD\": 50\n}")
req, _ := http.NewRequest("POST", 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.post("https://dojo.frogbot.ai/api/billing/ai-auto-recharge")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workspace\": \"6720f1…\",\n \"on\": true,\n \"thresholdUSD\": 10,\n \"amountUSD\": 50\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dojo.frogbot.ai/api/billing/ai-auto-recharge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workspace\": \"6720f1…\",\n \"on\": true,\n \"thresholdUSD\": 10,\n \"amountUSD\": 50\n}"
response = http.request(request)
puts response.read_body{
"autoRecharge": true,
"thresholdUSD": 123,
"amountUSD": 123,
"feeUSD": 123,
"totalUSD": 123,
"balanceUSD": 123
}{
"errors": [
{
"message": "<string>",
"data": {
"code": "<string>",
"url": "<string>"
}
}
]
}{
"errors": [
{
"message": "<string>",
"data": {
"code": "<string>",
"url": "<string>"
}
}
]
}{
"errors": [
{
"message": "<string>",
"data": {
"code": "<string>",
"url": "<string>"
}
}
]
}{
"errors": [
{
"message": "<string>",
"data": {
"code": "<string>",
"url": "<string>"
}
}
]
}{
"errors": [
{
"message": "<string>",
"data": {
"code": "<string>",
"url": "<string>"
}
}
]
}Billing
Turn AI auto-recharge on or off
When on, Dojo charges the card the last top-up saved amountUSD plus the processing fee of 4.6% + 0.31whenevertheAIbalancedropsunder‘thresholdUSD‘(20 under 5untilset).Omittednumberskeeptheirvalues.Wholedollars.Add10 to 1,000eachtime;thethresholdisatleast1 and below the amount, so one recharge always lifts the balance over it. A declined charge turns it off and emails the workspace’s admins. Saving while the balance is under the threshold charges at once; if Stripe can’t be reached, the answer is 503 and nothing changes. Only a person signed in to Dojo in the browser can change it: an API key, the CLI or an MCP connection gets 403 with a link to the Usage tab, and reads the setting with GET /api/billing/ai.
POST
/
api
/
billing
/
ai-auto-recharge
Turn AI auto-recharge on or off
curl --request POST \
--url https://dojo.frogbot.ai/api/billing/ai-auto-recharge \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workspace": "6720f1…",
"on": true,
"thresholdUSD": 10,
"amountUSD": 50
}
'import requests
url = "https://dojo.frogbot.ai/api/billing/ai-auto-recharge"
payload = {
"workspace": "6720f1…",
"on": True,
"thresholdUSD": 10,
"amountUSD": 50
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({workspace: '6720f1…', on: true, thresholdUSD: 10, amountUSD: 50})
};
fetch('https://dojo.frogbot.ai/api/billing/ai-auto-recharge', 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://dojo.frogbot.ai/api/billing/ai-auto-recharge",
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([
'workspace' => '6720f1…',
'on' => true,
'thresholdUSD' => 10,
'amountUSD' => 50
]),
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://dojo.frogbot.ai/api/billing/ai-auto-recharge"
payload := strings.NewReader("{\n \"workspace\": \"6720f1…\",\n \"on\": true,\n \"thresholdUSD\": 10,\n \"amountUSD\": 50\n}")
req, _ := http.NewRequest("POST", 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.post("https://dojo.frogbot.ai/api/billing/ai-auto-recharge")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workspace\": \"6720f1…\",\n \"on\": true,\n \"thresholdUSD\": 10,\n \"amountUSD\": 50\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://dojo.frogbot.ai/api/billing/ai-auto-recharge")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workspace\": \"6720f1…\",\n \"on\": true,\n \"thresholdUSD\": 10,\n \"amountUSD\": 50\n}"
response = http.request(request)
puts response.read_body{
"autoRecharge": true,
"thresholdUSD": 123,
"amountUSD": 123,
"feeUSD": 123,
"totalUSD": 123,
"balanceUSD": 123
}{
"errors": [
{
"message": "<string>",
"data": {
"code": "<string>",
"url": "<string>"
}
}
]
}{
"errors": [
{
"message": "<string>",
"data": {
"code": "<string>",
"url": "<string>"
}
}
]
}{
"errors": [
{
"message": "<string>",
"data": {
"code": "<string>",
"url": "<string>"
}
}
]
}{
"errors": [
{
"message": "<string>",
"data": {
"code": "<string>",
"url": "<string>"
}
}
]
}{
"errors": [
{
"message": "<string>",
"data": {
"code": "<string>",
"url": "<string>"
}
}
]
}Authorizations
Body
application/json