curl -X GET "https://api-integration.ollang.com/integration/credits" \
-H "X-Api-Key: <your-api-key>"
const response = await fetch(
"https://api-integration.ollang.com/integration/credits",
{
method: "GET",
headers: {
"X-Api-Key": "<your-api-key>",
},
}
);
const wallet = await response.json();
import requests
headers = {
'X-Api-Key': '<your-api-key>'
}
response = requests.get(
'https://api-integration.ollang.com/integration/credits',
headers=headers
)
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api-integration.ollang.com/integration/credits',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array(
'X-Api-Key: <your-api-key>'
),
));
$response = curl_exec($curl);
curl_close($curl);
package main
import (
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api-integration.ollang.com/integration/credits", nil)
req.Header.Set("X-Api-Key", "<your-api-key>")
client := &http.Client{}
resp, _ := client.Do(req)
}
HttpResponse<String> response = Unirest.get("https://api-integration.ollang.com/integration/credits")
.header("X-Api-Key", "<your-api-key>")
.asString();
{
"totalCredits": 30000000,
"remainingCredits": 26649461.48,
"usedCredits": 3350538.52,
"currency": "USD",
"creditsPerUsd": 1000,
"totalUsd": 30000,
"remainingUsd": 26649.46,
"usedUsd": 3350.54,
"lastSyncDate": "2026-01-15T10:30:00Z"
}
{
"error": "Unauthorized",
"message": "Invalid or missing API key",
"code": "UNAUTHORIZED"
}
{
"error": "Access denied",
"message": "The API key user lacks the client_owner or client_accessBillings role",
"code": "ACCESS_DENIED"
}
Ollang API Reference
Get Credit Wallet
Retrieve the account AI credit wallet balance with USD equivalents
GET
/
integration
/
credits
curl -X GET "https://api-integration.ollang.com/integration/credits" \
-H "X-Api-Key: <your-api-key>"
const response = await fetch(
"https://api-integration.ollang.com/integration/credits",
{
method: "GET",
headers: {
"X-Api-Key": "<your-api-key>",
},
}
);
const wallet = await response.json();
import requests
headers = {
'X-Api-Key': '<your-api-key>'
}
response = requests.get(
'https://api-integration.ollang.com/integration/credits',
headers=headers
)
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api-integration.ollang.com/integration/credits',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array(
'X-Api-Key: <your-api-key>'
),
));
$response = curl_exec($curl);
curl_close($curl);
package main
import (
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api-integration.ollang.com/integration/credits", nil)
req.Header.Set("X-Api-Key", "<your-api-key>")
client := &http.Client{}
resp, _ := client.Do(req)
}
HttpResponse<String> response = Unirest.get("https://api-integration.ollang.com/integration/credits")
.header("X-Api-Key", "<your-api-key>")
.asString();
{
"totalCredits": 30000000,
"remainingCredits": 26649461.48,
"usedCredits": 3350538.52,
"currency": "USD",
"creditsPerUsd": 1000,
"totalUsd": 30000,
"remainingUsd": 26649.46,
"usedUsd": 3350.54,
"lastSyncDate": "2026-01-15T10:30:00Z"
}
{
"error": "Unauthorized",
"message": "Invalid or missing API key",
"code": "UNAUTHORIZED"
}
{
"error": "Access denied",
"message": "The API key user lacks the client_owner or client_accessBillings role",
"code": "ACCESS_DENIED"
}
Returns the account AI credit wallet: total, remaining, and used credits, each with its USD equivalent at the account rate of 1000 credits = $1. The response also includes the currency, the conversion rate, and the last time balances were synced.
This endpoint is restricted to account owners and billing managers. The API key must belong to a user with the
client_owner or client_accessBillings role, otherwise the request is rejected with 403.curl -X GET "https://api-integration.ollang.com/integration/credits" \
-H "X-Api-Key: <your-api-key>"
const response = await fetch(
"https://api-integration.ollang.com/integration/credits",
{
method: "GET",
headers: {
"X-Api-Key": "<your-api-key>",
},
}
);
const wallet = await response.json();
import requests
headers = {
'X-Api-Key': '<your-api-key>'
}
response = requests.get(
'https://api-integration.ollang.com/integration/credits',
headers=headers
)
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api-integration.ollang.com/integration/credits',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => array(
'X-Api-Key: <your-api-key>'
),
));
$response = curl_exec($curl);
curl_close($curl);
package main
import (
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://api-integration.ollang.com/integration/credits", nil)
req.Header.Set("X-Api-Key", "<your-api-key>")
client := &http.Client{}
resp, _ := client.Do(req)
}
HttpResponse<String> response = Unirest.get("https://api-integration.ollang.com/integration/credits")
.header("X-Api-Key", "<your-api-key>")
.asString();
Authorizations
This endpoint requires API key authentication. Include your API key in the request header:- Header name:
X-Api-Key - Header value: Your API key from the Ollang dashboard
- Format:
X-Api-Key: your-api-key-here
client_owner or client_accessBillings role. Requests from keys without one of these billing roles are rejected with 403.
Response
{
"totalCredits": 30000000,
"remainingCredits": 26649461.48,
"usedCredits": 3350538.52,
"currency": "USD",
"creditsPerUsd": 1000,
"totalUsd": 30000,
"remainingUsd": 26649.46,
"usedUsd": 3350.54,
"lastSyncDate": "2026-01-15T10:30:00Z"
}
{
"error": "Unauthorized",
"message": "Invalid or missing API key",
"code": "UNAUTHORIZED"
}
{
"error": "Access denied",
"message": "The API key user lacks the client_owner or client_accessBillings role",
"code": "ACCESS_DENIED"
}
Was this page helpful?