Täglichen Verbrauch abrufen
curl --request GET \
--url https://api.devin.ai/v3/enterprise/consumption/daily \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.devin.ai/v3/enterprise/consumption/daily"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.devin.ai/v3/enterprise/consumption/daily', 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.devin.ai/v3/enterprise/consumption/daily",
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://api.devin.ai/v3/enterprise/consumption/daily"
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://api.devin.ai/v3/enterprise/consumption/daily")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3/enterprise/consumption/daily")
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{
"total_acus": 123,
"consumption_by_date": [
{
"date": 123,
"acus": 123,
"acus_by_product": {
"devin": 123,
"cascade": 123,
"terminal": 123,
"review": 123,
"automation": 123
}
}
]
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}Verbrauch (Enterprise)
Täglichen Verbrauch abrufen
Den täglichen ACU-Verbrauch für das gesamte Enterprise-Konto abrufen.
Gibt die gesamten ACUs und den nach Datum aufgeschlüsselten Verbrauch zurück.
Zeitzonenverhalten: Abrechnungszyklen verwenden Mitternacht PST (Pacific Standard Time) als Tagesgrenze; das entspricht 08:00:00 UTC. Um den im Devin-Dashboard angezeigten Verbrauchsdaten zu entsprechen, übergeben Sie Unix-Zeitstempel, die auf diesen Zeitzonen-Offset abgestimmt sind (z. B. 1733385600 für den 5. Dezember 2025 um Mitternacht PST).
GET
/
v3
/
enterprise
/
consumption
/
daily
Täglichen Verbrauch abrufen
curl --request GET \
--url https://api.devin.ai/v3/enterprise/consumption/daily \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.devin.ai/v3/enterprise/consumption/daily"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.devin.ai/v3/enterprise/consumption/daily', 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.devin.ai/v3/enterprise/consumption/daily",
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://api.devin.ai/v3/enterprise/consumption/daily"
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://api.devin.ai/v3/enterprise/consumption/daily")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3/enterprise/consumption/daily")
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{
"total_acus": 123,
"consumption_by_date": [
{
"date": 123,
"acus": 123,
"acus_by_product": {
"devin": 123,
"cascade": 123,
"terminal": 123,
"review": 123,
"automation": 123
}
}
]
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}Die Consumption-API steht nur Accounts im Enterprise-Plan zur Verfügung. Teams und Self-Serve-Organisationen erhalten eine
403-Antwort; einen Toggle pro Account, den der Support aktivieren könnte, gibt es nicht.Aufschlüsselung nach Produkten
Jeder Datumseintrag in der Antwort enthält einacus_by_product-Objekt, das den gesamten ACU-Verbrauch nach Produktkomponenten aufschlüsselt: devin, automation, cascade, terminal und review (Devin Review). So sehen Sie für jeden Tag, wie sich der Verbrauch auf die einzelnen Produkte verteilt. Sind für devin, cascade oder terminal keine Daten auf Produktebene verfügbar, ist der Wert standardmäßig 0.0. automation und review sind null, wenn keine produktspezifischen Verbrauchsdaten vorliegen.
devin: Sitzungen, die von einer Person oder einem Service-Benutzer gestartet wurden, einschließlich Code-Scan- und Bereitschaftssitzungen.automation: Sitzungen und Code-Schritte, die von Automatisierungen ausgeführt werden. Bevor es dieses Feld gab, wurde dieser Verbrauch unterdevinerfasst.
Berechtigungen
Erfordert einen Servicebenutzer oder ein persönliches Zugriffstoken mit der BerechtigungViewAccountConsumption auf Enterprise-Ebene.
