Get Credit Balance
curl --request GET \
--url https://api.linkupapi.com/v2/credits \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.linkupapi.com/v2/credits"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.linkupapi.com/v2/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://api.linkupapi.com/v2/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 => [
"x-api-key: <x-api-key>"
],
]);
$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://api.linkupapi.com/v2/credits"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-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.linkupapi.com/v2/credits")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.linkupapi.com/v2/credits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"credits": 4825
},
"metadata": {
"action": "get_credits",
"credits_consumed": 0,
"timestamp": "2025-01-15T10:30:00.000000"
}
}
{
"success": false,
"error": {
"code": "INVALID_API_KEY",
"message": "Invalid API Key"
},
"metadata": {
"action": "get_credits",
"credits_consumed": 0,
"timestamp": "2025-01-15T10:30:00.000000"
}
}
Credits
Get Credit Balance
Check your current credit balance
GET
/
v2
/
credits
Get Credit Balance
curl --request GET \
--url https://api.linkupapi.com/v2/credits \
--header 'x-api-key: <x-api-key>'import requests
url = "https://api.linkupapi.com/v2/credits"
headers = {"x-api-key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<x-api-key>'}};
fetch('https://api.linkupapi.com/v2/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://api.linkupapi.com/v2/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 => [
"x-api-key: <x-api-key>"
],
]);
$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://api.linkupapi.com/v2/credits"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<x-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.linkupapi.com/v2/credits")
.header("x-api-key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.linkupapi.com/v2/credits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"credits": 4825
},
"metadata": {
"action": "get_credits",
"credits_consumed": 0,
"timestamp": "2025-01-15T10:30:00.000000"
}
}
{
"success": false,
"error": {
"code": "INVALID_API_KEY",
"message": "Invalid API Key"
},
"metadata": {
"action": "get_credits",
"credits_consumed": 0,
"timestamp": "2025-01-15T10:30:00.000000"
}
}
Retrieve the number of credits remaining on your account.
Header Parameters
string
required
Your API key
Response
boolean
Whether the request was successful
{
"success": true,
"data": {
"credits": 4825
},
"metadata": {
"action": "get_credits",
"credits_consumed": 0,
"timestamp": "2025-01-15T10:30:00.000000"
}
}
{
"success": false,
"error": {
"code": "INVALID_API_KEY",
"message": "Invalid API Key"
},
"metadata": {
"action": "get_credits",
"credits_consumed": 0,
"timestamp": "2025-01-15T10:30:00.000000"
}
}
Notes
- This endpoint does not consume any credits
- Use this to monitor your usage and implement low-credit alerts in your application
- Credits are consumed by most API actions — see the Introduction for details on the credit system
Was this page helpful?