Read an app's AI spend and its process
curl --request GET \
--url https://dojo.frogbot.ai/api/apps/{app}/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://dojo.frogbot.ai/api/apps/{app}/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://dojo.frogbot.ai/api/apps/{app}/usage', 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/apps/{app}/usage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://dojo.frogbot.ai/api/apps/{app}/usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://dojo.frogbot.ai/api/apps/{app}/usage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dojo.frogbot.ai/api/apps/{app}/usage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"month": "<string>",
"spentUSD": 123,
"days": [
{
"day": "<string>",
"requests": 123,
"costUSD": 123
}
],
"models": [
{
"model": "<string>",
"requests": 123,
"costUSD": 123
}
],
"workspace": "<string>",
"metered": true,
"balanceUSD": 123,
"paused": true,
"canManageFunds": true,
"autoRecharge": true,
"thresholdUSD": 123,
"amountUSD": 123,
"hasSavedCard": true,
"process": {
"size": "<string>",
"state": "starting",
"storage": {
"sizeGb": 123,
"usedPercent": 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>"
}
}
]
}Apps
Read an app's AI spend and its process
Dollars of provider cost this UTC month, by day and by model, the workspace’s prepaid AI balance, and the app’s process and storage. AI is paused while the balance is $0 or less.
GET
/
api
/
apps
/
{app}
/
usage
Read an app's AI spend and its process
curl --request GET \
--url https://dojo.frogbot.ai/api/apps/{app}/usage \
--header 'Authorization: Bearer <token>'import requests
url = "https://dojo.frogbot.ai/api/apps/{app}/usage"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://dojo.frogbot.ai/api/apps/{app}/usage', 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/apps/{app}/usage",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://dojo.frogbot.ai/api/apps/{app}/usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://dojo.frogbot.ai/api/apps/{app}/usage")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dojo.frogbot.ai/api/apps/{app}/usage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"month": "<string>",
"spentUSD": 123,
"days": [
{
"day": "<string>",
"requests": 123,
"costUSD": 123
}
],
"models": [
{
"model": "<string>",
"requests": 123,
"costUSD": 123
}
],
"workspace": "<string>",
"metered": true,
"balanceUSD": 123,
"paused": true,
"canManageFunds": true,
"autoRecharge": true,
"thresholdUSD": 123,
"amountUSD": 123,
"hasSavedCard": true,
"process": {
"size": "<string>",
"state": "starting",
"storage": {
"sizeGb": 123,
"usedPercent": 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>"
}
}
]
}Authorizations
Response
OK