curl --request GET \
--url https://api.openworklabs.com/v1/workbot-usage \
--header 'x-api-key: <api-key>'import requests
url = "https://api.openworklabs.com/v1/workbot-usage"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.openworklabs.com/v1/workbot-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://api.openworklabs.com/v1/workbot-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 => [
"x-api-key: <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"
"net/http"
"io"
)
func main() {
url := "https://api.openworklabs.com/v1/workbot-usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.openworklabs.com/v1/workbot-usage")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/workbot-usage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"days": 4503599627370495,
"since": "<string>",
"totals": {
"costMicroUsd": 4503599627370495,
"requests": 4503599627370495,
"unpricedRequests": 4503599627370495,
"inputTokens": 4503599627370495,
"outputTokens": 4503599627370495,
"cacheReadTokens": 4503599627370495,
"members": 4503599627370495
},
"daily": [
{
"costMicroUsd": 4503599627370495,
"requests": 4503599627370495,
"unpricedRequests": 4503599627370495,
"inputTokens": 4503599627370495,
"outputTokens": 4503599627370495,
"cacheReadTokens": 4503599627370495,
"day": "<string>"
}
],
"surfaces": [
{
"costMicroUsd": 4503599627370495,
"requests": 4503599627370495,
"unpricedRequests": 4503599627370495,
"inputTokens": 4503599627370495,
"outputTokens": 4503599627370495,
"cacheReadTokens": 4503599627370495,
"surface": "chat"
}
],
"models": [
{
"costMicroUsd": 4503599627370495,
"requests": 4503599627370495,
"unpricedRequests": 4503599627370495,
"inputTokens": 4503599627370495,
"outputTokens": 4503599627370495,
"cacheReadTokens": 4503599627370495,
"model": "<string>"
}
],
"members": [
{
"costMicroUsd": 4503599627370495,
"requests": 4503599627370495,
"unpricedRequests": 4503599627370495,
"inputTokens": 4503599627370495,
"outputTokens": 4503599627370495,
"cacheReadTokens": 4503599627370495,
"memberId": "<string>",
"name": "<string>",
"email": "<string>"
}
]
}{
"error": "unauthorized"
}{
"error": "forbidden",
"reason": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Read what Workbot spent on models over the last 30 days
Workbot’s model requests, tokens and cost for the active organization over the last 30 UTC days including today: totals, one entry per day, and breakdowns by where it ran (chat: a person’s Workbot chats; agent: members’ background agents; other: Workbot in Slack and cloud Automations), by model and by member, most expensive first (at most 20 models and 50 members; totals cover everyone). Costs are the AI Gateway’s: costMicroUsd is US dollars in millionths. A finished request the gateway could not price is counted in unpricedRequests and adds nothing to the cost. since is the first day with recorded Workbot usage, or null when there is none; counting starts when the gateway and runner that record it are deployed. Aggregates only: never a conversation or its content. Members with the View usage analytics permission only (owners and admins by default), where the Workbot cost in Analytics feature is on.
curl --request GET \
--url https://api.openworklabs.com/v1/workbot-usage \
--header 'x-api-key: <api-key>'import requests
url = "https://api.openworklabs.com/v1/workbot-usage"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.openworklabs.com/v1/workbot-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://api.openworklabs.com/v1/workbot-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 => [
"x-api-key: <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"
"net/http"
"io"
)
func main() {
url := "https://api.openworklabs.com/v1/workbot-usage"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.openworklabs.com/v1/workbot-usage")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.openworklabs.com/v1/workbot-usage")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"days": 4503599627370495,
"since": "<string>",
"totals": {
"costMicroUsd": 4503599627370495,
"requests": 4503599627370495,
"unpricedRequests": 4503599627370495,
"inputTokens": 4503599627370495,
"outputTokens": 4503599627370495,
"cacheReadTokens": 4503599627370495,
"members": 4503599627370495
},
"daily": [
{
"costMicroUsd": 4503599627370495,
"requests": 4503599627370495,
"unpricedRequests": 4503599627370495,
"inputTokens": 4503599627370495,
"outputTokens": 4503599627370495,
"cacheReadTokens": 4503599627370495,
"day": "<string>"
}
],
"surfaces": [
{
"costMicroUsd": 4503599627370495,
"requests": 4503599627370495,
"unpricedRequests": 4503599627370495,
"inputTokens": 4503599627370495,
"outputTokens": 4503599627370495,
"cacheReadTokens": 4503599627370495,
"surface": "chat"
}
],
"models": [
{
"costMicroUsd": 4503599627370495,
"requests": 4503599627370495,
"unpricedRequests": 4503599627370495,
"inputTokens": 4503599627370495,
"outputTokens": 4503599627370495,
"cacheReadTokens": 4503599627370495,
"model": "<string>"
}
],
"members": [
{
"costMicroUsd": 4503599627370495,
"requests": 4503599627370495,
"unpricedRequests": 4503599627370495,
"inputTokens": 4503599627370495,
"outputTokens": 4503599627370495,
"cacheReadTokens": 4503599627370495,
"memberId": "<string>",
"name": "<string>",
"email": "<string>"
}
]
}{
"error": "unauthorized"
}{
"error": "forbidden",
"reason": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
Response
Workbot usage for the last 30 days.
Was this page helpful?