Get token balance
curl --request GET \
--url https://api-service.fribl.co/api/v1/credits/balance \
--header 'x-api-key: <api-key>'import requests
url = "https://api-service.fribl.co/api/v1/credits/balance"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api-service.fribl.co/api/v1/credits/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-service.fribl.co/api/v1/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))
}HttpResponse<String> response = Unirest.get("https://api-service.fribl.co/api/v1/credits/balance")
.header("x-api-key", "<api-key>")
.asString();{
"data": {
"workspace_id": "ws_a1b2c3d4",
"balance": 149
}
}{
"error": "<string>"
}Tokens
Get token balance
Return the real-time token balance for the workspace the API key belongs to. All keys in a workspace share one balance.
GET
/
credits
/
balance
Get token balance
curl --request GET \
--url https://api-service.fribl.co/api/v1/credits/balance \
--header 'x-api-key: <api-key>'import requests
url = "https://api-service.fribl.co/api/v1/credits/balance"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api-service.fribl.co/api/v1/credits/balance', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api-service.fribl.co/api/v1/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))
}HttpResponse<String> response = Unirest.get("https://api-service.fribl.co/api/v1/credits/balance")
.header("x-api-key", "<api-key>")
.asString();{
"data": {
"workspace_id": "ws_a1b2c3d4",
"balance": 149
}
}{
"error": "<string>"
}