Check Organization Credit Balance via Dmand AI API
curl --request GET \
--url https://ext-api.dmand.ai/api/v1/credits \
--header 'Authorization: <authorization>'import requests
url = "https://ext-api.dmand.ai/api/v1/credits"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://ext-api.dmand.ai/api/v1/credits', 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://ext-api.dmand.ai/api/v1/credits",
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>"
],
]);
$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://ext-api.dmand.ai/api/v1/credits"
req, _ := http.NewRequest("GET", url, nil)
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://ext-api.dmand.ai/api/v1/credits")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ext-api.dmand.ai/api/v1/credits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"balance": 123,
"total": 123,
"used": 123
}API Reference
Check Organization Credit Balance via Dmand AI API
GET /api/v1/credits returns the organization’s credit balance, total, and used credits for the authenticated API key.
GET
/
api
/
v1
/
credits
Check Organization Credit Balance via Dmand AI API
curl --request GET \
--url https://ext-api.dmand.ai/api/v1/credits \
--header 'Authorization: <authorization>'import requests
url = "https://ext-api.dmand.ai/api/v1/credits"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://ext-api.dmand.ai/api/v1/credits', 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://ext-api.dmand.ai/api/v1/credits",
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>"
],
]);
$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://ext-api.dmand.ai/api/v1/credits"
req, _ := http.NewRequest("GET", url, nil)
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://ext-api.dmand.ai/api/v1/credits")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://ext-api.dmand.ai/api/v1/credits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"balance": 123,
"total": 123,
"used": 123
}Check your organization’s credit balance before submitting large enrichment jobs. This endpoint returns the current balance, total plan credits, and credits already used for the authenticated API key.
Request
string
required
Bearer <your_api_key>string
Optional alternative to the
Authorization: Bearer header.Example request
curl -X GET "https://ext-api.dmand.ai/api/v1/credits" \
-H "Authorization: Bearer YOUR_API_KEY"
import requests
response = requests.get(
"https://ext-api.dmand.ai/api/v1/credits",
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
print(response.json())
const response = await fetch("https://ext-api.dmand.ai/api/v1/credits", {
headers: { "Authorization": "Bearer YOUR_API_KEY" }
});
const data = await response.json();
console.log(data);
Response
number
required
Credits remaining in the organization’s balance.
number
required
Total credits allocated to the plan.
number
required
Credits already consumed.
Example response (200 OK)
{
"balance": 850,
"total": 1000,
"used": 150
}
Errors
- Missing or invalid API keys are rejected.
403: Revoked or inactive API key.422: Validation error with{"detail": [{"loc": [...], "msg": "...", "type": "..."}]}.