curl --request POST \
--url https://api.outerproduct.com/outerproduct.billing_account.v1alpha.BillingAccountService/GetBillingAccount \
--header 'Authorization: Bearer <token>' \
--header 'Connect-Protocol-Version: <connect-protocol-version>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'import requests
url = "https://api.outerproduct.com/outerproduct.billing_account.v1alpha.BillingAccountService/GetBillingAccount"
payload = { "name": "<string>" }
headers = {
"Connect-Protocol-Version": "<connect-protocol-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Connect-Protocol-Version': '<connect-protocol-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>'})
};
fetch('https://api.outerproduct.com/outerproduct.billing_account.v1alpha.BillingAccountService/GetBillingAccount', 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.outerproduct.com/outerproduct.billing_account.v1alpha.BillingAccountService/GetBillingAccount",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Connect-Protocol-Version: <connect-protocol-version>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.outerproduct.com/outerproduct.billing_account.v1alpha.BillingAccountService/GetBillingAccount"
payload := strings.NewReader("{\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Connect-Protocol-Version", "<connect-protocol-version>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.outerproduct.com/outerproduct.billing_account.v1alpha.BillingAccountService/GetBillingAccount")
.header("Connect-Protocol-Version", "<connect-protocol-version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerproduct.com/outerproduct.billing_account.v1alpha.BillingAccountService/GetBillingAccount")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Connect-Protocol-Version"] = '<connect-protocol-version>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"workspace": "<string>",
"balance": "<string>",
"currencyCode": "<string>",
"ongoingBalance": "<string>"
}{
"code": "not_found",
"message": "<string>",
"details": [
{
"type": "<string>",
"value": "<string>",
"debug": {}
}
]
}GetBillingAccount
The billing account of the credential’s workspace.
curl --request POST \
--url https://api.outerproduct.com/outerproduct.billing_account.v1alpha.BillingAccountService/GetBillingAccount \
--header 'Authorization: Bearer <token>' \
--header 'Connect-Protocol-Version: <connect-protocol-version>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'import requests
url = "https://api.outerproduct.com/outerproduct.billing_account.v1alpha.BillingAccountService/GetBillingAccount"
payload = { "name": "<string>" }
headers = {
"Connect-Protocol-Version": "<connect-protocol-version>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Connect-Protocol-Version': '<connect-protocol-version>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>'})
};
fetch('https://api.outerproduct.com/outerproduct.billing_account.v1alpha.BillingAccountService/GetBillingAccount', 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.outerproduct.com/outerproduct.billing_account.v1alpha.BillingAccountService/GetBillingAccount",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Connect-Protocol-Version: <connect-protocol-version>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.outerproduct.com/outerproduct.billing_account.v1alpha.BillingAccountService/GetBillingAccount"
payload := strings.NewReader("{\n \"name\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Connect-Protocol-Version", "<connect-protocol-version>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.outerproduct.com/outerproduct.billing_account.v1alpha.BillingAccountService/GetBillingAccount")
.header("Connect-Protocol-Version", "<connect-protocol-version>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.outerproduct.com/outerproduct.billing_account.v1alpha.BillingAccountService/GetBillingAccount")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Connect-Protocol-Version"] = '<connect-protocol-version>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"workspace": "<string>",
"balance": "<string>",
"currencyCode": "<string>",
"ongoingBalance": "<string>"
}{
"code": "not_found",
"message": "<string>",
"details": [
{
"type": "<string>",
"value": "<string>",
"debug": {}
}
]
}Authorizations
A user session token or personal API key.
Headers
Define the version of the Connect protocol
1
Define the timeout, in ms
1000
Body
Response
Success
The prepaid balance of the credential's workspace. A singleton: every credential reads its own workspace's.
cf. AIP-156 singletons, GCP projects/{project}/billingInfo, Runpod myself.clientBalance.
The workspace that pays, the credential's.
cf. Zitadel resource_owner.
Top-ups less usage, a decimal in the currency's minor unit; negative once running work overdraws it. New work is refused unless it is positive.
ISO 4217, such as USD.
The balance less what running work has used and is not yet charged, as of the last minute: the balance that goes down while runs go on. A decimal in the currency's minor unit.
cf. Lago wallet ongoing_balance_cents.