Rechnungen abfragen
curl --request GET \
--url https://api.highwayapi.ai/openapi/v1/billing/bill/list \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>'import requests
url = "https://api.highwayapi.ai/openapi/v1/billing/bill/list"
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'}
};
fetch('https://api.highwayapi.ai/openapi/v1/billing/bill/list', 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.highwayapi.ai/openapi/v1/billing/bill/list",
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: <authorization>",
"Content-Type: <content-type>"
],
]);
$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.highwayapi.ai/openapi/v1/billing/bill/list"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")
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.highwayapi.ai/openapi/v1/billing/bill/list")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.highwayapi.ai/openapi/v1/billing/bill/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"bills": [
{
"userId": "<string>",
"startTime": "1790812800",
"endTime": "1790899199",
"billingMethod": 1,
"productName": "<string>",
"category": "llm",
"ownerID": "<string>",
"billNum0": "1000",
"billNum1": "500",
"basePrice0": "0",
"basePrice1": "0",
"discountPrice0": "0",
"discountPrice1": "0",
"originAmountDecimal": "1.23456789",
"amountDecimal": "1.000019",
"voucherAmountDecimal": "0",
"payableDecimal": "1.000019",
"payAmount": "10000",
"payAmountDisplay": 1,
"pricePrecision": 1,
"productId": "<string>",
"originAmount": "12345",
"amount": "10000",
"voucherAmount": "0"
}
]
}
API-Grundlagen
Rechnungen abfragen
GET
/
openapi
/
v1
/
billing
/
bill
/
list
Rechnungen abfragen
curl --request GET \
--url https://api.highwayapi.ai/openapi/v1/billing/bill/list \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>'import requests
url = "https://api.highwayapi.ai/openapi/v1/billing/bill/list"
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'}
};
fetch('https://api.highwayapi.ai/openapi/v1/billing/bill/list', 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.highwayapi.ai/openapi/v1/billing/bill/list",
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: <authorization>",
"Content-Type: <content-type>"
],
]);
$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.highwayapi.ai/openapi/v1/billing/bill/list"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")
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.highwayapi.ai/openapi/v1/billing/bill/list")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.highwayapi.ai/openapi/v1/billing/bill/list")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"bills": [
{
"userId": "<string>",
"startTime": "1790812800",
"endTime": "1790899199",
"billingMethod": 1,
"productName": "<string>",
"category": "llm",
"ownerID": "<string>",
"billNum0": "1000",
"billNum1": "500",
"basePrice0": "0",
"basePrice1": "0",
"discountPrice0": "0",
"discountPrice1": "0",
"originAmountDecimal": "1.23456789",
"amountDecimal": "1.000019",
"voucherAmountDecimal": "0",
"payableDecimal": "1.000019",
"payAmount": "10000",
"payAmountDisplay": 1,
"pricePrecision": 1,
"productId": "<string>",
"originAmount": "12345",
"amount": "10000",
"voucherAmount": "0"
}
]
}
Anfrageheader
string
erforderlich
Enum-Wert:
application/jsonstring
erforderlich
Bearer-Authentifizierungsformat: Bearer {{API Key}}.
Antwortinformationen
string
erforderlich
Granularität des Abrechnungszeitraums. Optionen:
Hour: stündlichDay: täglichWeek: wöchentlichMonth: monatlich
string
erforderlich
Produkttyp. Optionen:
summary: zusammengefasste Rechnungllm: großes Sprachmodell
string
Produktname. Unterstützt unscharfe Suche.
string
Startzeit des abzufragenden Abrechnungszeitraums, Zeitstempel (Sekunden), Standardwert: 0.
string
Endzeit des abzufragenden Abrechnungszeitraums, Zeitstempel (Sekunden), Standardwert: 0.
string
Gibt die abzufragende Instanz-ID an.
Betragsgenauigkeit
Decimal-Betragsfelder sind Dezimalzeichenfolgen in USD und dürfen nicht durch 10000 geteilt werden. Alte Ganzzahlfelder mit entsprechenden Decimal-Feldern sind veraltet und bleiben aus Kompatibilitätsgründen verfügbar. Sie werden als JSON-Zeichenfolgen in Einheiten von 1/10000 USD zurückgegeben.Antwortparameter
object[]
erforderlich
Abrechnungsinformationen für On-Demand-Instanzen.
Ausblenden Eigenschaften
Ausblenden Eigenschaften
string
erforderlich
Benutzer-ID, zu der die Instanz gehört.
string
erforderlich
Startzeit der Rechnung. Format: Unix-Zeitstempel.
string
erforderlich
Endzeit der Rechnung. Format: Unix-Zeitstempel.
int32
erforderlich
Abrechnungsmethode der Instanz. Der Wert 1 bedeutet On-Demand-Abrechnung.
string
erforderlich
Produktname.
string
erforderlich
Produktkategorie.
string
erforderlich
Instanz-ID.
string
erforderlich
- llm: Eingabe-tokens
string
erforderlich
- llm: Ausgabe-tokens
string
erforderlich
Originalpreis
string
erforderlich
Ohne Bedeutung
string
erforderlich
- llm: Einzelpreis für Eingabe-tokens
- Sonstige: Einzelpreis
string
erforderlich
- llm: Einzelpreis für Ausgabe-tokens
string
erforderlich
Ursprünglicher Betrag vor Abzügen. Dezimalzeichenfolge in USD.
string
erforderlich
Gesamtpreis. Dezimalzeichenfolge in USD.
string
erforderlich
Abgezogener Gutscheinbetrag. Dezimalzeichenfolge in USD.
string
erforderlich
Bar zu zahlender Betrag. Dezimalzeichenfolge in USD.
float
erforderlich
int32
erforderlich
Preisgenauigkeit.
string
erforderlich
Produkt-ID.
string
erforderlich
veraltet
Veraltet. Ursprünglicher Betrag vor Abzügen. Ganzzahl als Zeichenfolge, in Einheiten von 1/10000 USD. Verwenden Sie
originAmountDecimal in USD.string
erforderlich
veraltet
Veraltet. Gesamtpreis. Ganzzahl als Zeichenfolge, in Einheiten von 1/10000 USD. Verwenden Sie
amountDecimal in USD.string
erforderlich
veraltet
Veraltet. Abgezogener Gutscheinbetrag. Ganzzahl als Zeichenfolge, in Einheiten von 1/10000 USD. Verwenden Sie
voucherAmountDecimal in USD.string
erforderlich
veraltet
Veraltet. Bar zu zahlender Betrag. Ganzzahl als Zeichenfolge, in Einheiten von 1/10000 USD. Verwenden Sie
payableDecimal in USD.{
"bills": [
{
"userId": "<string>",
"startTime": "1790812800",
"endTime": "1790899199",
"billingMethod": 1,
"productName": "<string>",
"category": "llm",
"ownerID": "<string>",
"billNum0": "1000",
"billNum1": "500",
"basePrice0": "0",
"basePrice1": "0",
"discountPrice0": "0",
"discountPrice1": "0",
"originAmountDecimal": "1.23456789",
"amountDecimal": "1.000019",
"voucherAmountDecimal": "0",
"payableDecimal": "1.000019",
"payAmount": "10000",
"payAmountDisplay": 1,
"pricePrecision": 1,
"productId": "<string>",
"originAmount": "12345",
"amount": "10000",
"voucherAmount": "0"
}
]
}
Zuletzt geändert am 21. Oktober 2026