請求書の照会
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": "<string>",
"endTime": "<string>",
"billingMethod": "<string>",
"productName": "<string>",
"category": "<string>",
"ownerID": "<string>",
"billNum0": "<string>",
"billNum1": "<string>",
"basePrice0": "<string>",
"basePrice1": "<string>",
"discountPrice0": "<string>",
"discountPrice1": "<string>",
"amount": "<string>",
"voucherAmount": "<string>",
"payAmount": "<string>",
"payAmountDisplay": "<string>",
"pricePrecision": "<string>",
"productId": "<string>"
}
]
}API の基本
請求書の照会
GET
/
openapi
/
v1
/
billing
/
bill
/
list
請求書の照会
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": "<string>",
"endTime": "<string>",
"billingMethod": "<string>",
"productName": "<string>",
"category": "<string>",
"ownerID": "<string>",
"billNum0": "<string>",
"billNum1": "<string>",
"basePrice0": "<string>",
"basePrice1": "<string>",
"discountPrice0": "<string>",
"discountPrice1": "<string>",
"amount": "<string>",
"voucherAmount": "<string>",
"payAmount": "<string>",
"payAmountDisplay": "<string>",
"pricePrecision": "<string>",
"productId": "<string>"
}
]
}リクエストヘッダー
string
必須
列挙値:
application/jsonstring
必須
Bearer 認証形式: Bearer {{API Key}}。
レスポンス情報
string
必須
課金周期の粒度。オプション:
Hour:時間単位Day: 日単位Week:週単位Month:月単位
string
必須
製品タイプ。オプション:
summary:集計請求書llm:大規模言語モデル
string
製品名。あいまい検索をサポートします。
string
照会する請求周期の開始時間、タイムスタンプ(秒)。デフォルト値:0。
string
照会する請求周期の終了時間、タイムスタンプ(秒)。デフォルト値:0。
string
照会するインスタンス ID を指定します。
レスポンス情報パラメータ
object[]
必須
オンデマンドインスタンスの課金情報。
非表示 属性
非表示 属性
string
必須
インスタンスが属するユーザー ID。
string
必須
請求書の開始時間。形式は Unix タイムスタンプです。
string
必須
請求書の終了時間。形式は Unix タイムスタンプです。
string
必須
インスタンスの課金方式。値が 1 の場合、従量課金を示します。
string
必須
製品名。
string
必須
製品カテゴリ。
string
必須
インスタンス ID。
string
必須
- llm:入力トークン
string
必須
- llm:出力トークン
string
必須
元の価格
string
必須
意味なし
string
必須
- llm:入力トークンの単価
- その他:単価
string
必須
- llm:出力トークンの単価
string
必須
合計金額。
string
必須
クーポン控除額。
string
必須
現金支払額。
string
必須
string
必須
価格精度。
string
必須
製品 ID。
⌘I