Get prepaid credit balance
Self Serve
Get prepaid credit balance
Returns the current prepaid credit balance for the authenticated self-serve client.
GET
Get prepaid credit balance
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl --request GET \
--url https://api.platform.dakota.xyz/self-serve/credits/balance \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.platform.dakota.xyz/self-serve/credits/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.platform.dakota.xyz/self-serve/credits/balance"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.platform.dakota.xyz/self-serve/credits/balance"
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))
}{
"balance_cents": 45000,
"transfer_capacity_cents": 9000000
}{
"type": "https://docs.dakota.xyz/api-reference/errors#authentication-error",
"title": "Authentication Required",
"status": 401,
"detail": "Missing or invalid authentication credentials."
}{
"type": "https://docs.dakota.xyz/api-reference/errors#forbidden",
"title": "Forbidden",
"status": 403,
"detail": "Credit management is only available for self-serve customers."
}Returns the current prepaid credit balance for the authenticated self-serve client.
curl --request GET \
--url https://api.platform.dakota.xyz/self-serve/credits/balance \
--header 'x-api-key: <api-key>'const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.platform.dakota.xyz/self-serve/credits/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.platform.dakota.xyz/self-serve/credits/balance"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.platform.dakota.xyz/self-serve/credits/balance"
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))
}{
"balance_cents": 45000,
"transfer_capacity_cents": 9000000
}{
"type": "https://docs.dakota.xyz/api-reference/errors#authentication-error",
"title": "Authentication Required",
"status": 401,
"detail": "Missing or invalid authentication credentials."
}{
"type": "https://docs.dakota.xyz/api-reference/errors#forbidden",
"title": "Forbidden",
"status": 403,
"detail": "Credit management is only available for self-serve customers."
}Was this page helpful?
