Get credit balance
curl --request GET \
--url https://api.markifact.com/v1/credits \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.markifact.com/v1/credits"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.markifact.com/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://api.markifact.com/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: Bearer <token>"
],
]);
$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.markifact.com/v1/credits"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.markifact.com/v1/credits")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.markifact.com/v1/credits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"credits_limit": 123,
"credits_used": 123,
"credits_remaining": 123,
"tier": "<string>",
"billing_period_end": 123
}{
"detail": "<unknown>"
}{
"detail": "<unknown>"
}Credits
Get credit balance
Check how many Markifact credits your team has left in the current billing period.
GET
/
v1
/
credits
Get credit balance
curl --request GET \
--url https://api.markifact.com/v1/credits \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.markifact.com/v1/credits"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.markifact.com/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://api.markifact.com/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: Bearer <token>"
],
]);
$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.markifact.com/v1/credits"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.markifact.com/v1/credits")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.markifact.com/v1/credits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"credits_limit": 123,
"credits_used": 123,
"credits_remaining": 123,
"tier": "<string>",
"billing_period_end": 123
}{
"detail": "<unknown>"
}{
"detail": "<unknown>"
}Returns your team’s credit position for the current billing period. This is the endpoint to poll if you want to alert before your team runs out.
To see what consumed the credits, use List credit logs.
Endpoint
GET /v1/credits
Example Request
curl "https://api.markifact.com/v1/credits" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
{
"credits_limit": 10000,
"credits_used": 3613,
"credits_remaining": 6387,
"billing_period_end": 1780853312,
"tier": "team"
}
Fields
| Field | Type | Description |
|---|---|---|
credits_limit | integer | Credits included in your plan for the period. |
credits_used | integer | Credits consumed so far this period. |
credits_remaining | integer | credits_limit minus credits_used. Can be negative, see below. |
billing_period_end | integer or null | When the period ends and usage resets, in Unix seconds. |
tier | string | Your current plan. |
credits_remaining can be negative. A run that overshoots the remaining balance is not rolled back mid-execution, so a team can finish a period slightly below zero.Alerting Example
REMAINING=$(curl -s "https://api.markifact.com/v1/credits" \
-H "Authorization: Bearer YOUR_API_KEY" | jq '.credits_remaining')
if [ "$REMAINING" -lt 500 ]; then
echo "Markifact credits low: $REMAINING remaining"
fi
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Response
Balance returned.
Credits included in the plan for the current period.
Credits consumed so far this period.
credits_limit minus credits_used. Can be negative: a run that overshoots is not rolled back.
Current plan.
When the period ends and usage resets, in Unix seconds.

