curl --request GET \
--url https://api.sociavault.com/v1/credits \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.sociavault.com/v1/credits"
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.sociavault.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.sociavault.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 => [
"X-API-Key: <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.sociavault.com/v1/credits"
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.sociavault.com/v1/credits")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sociavault.com/v1/credits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"credits": 5994,
"subscriptionStatus": "active",
"subscriptionId": "cs_live_a1B2c3D4e5F6g7H8i9J0k1L2m3N4o5P6q7R8s9T0u1V2w3X4y5Z6"
}Get Credits Balance
Returns the current credit balance and subscription status for the authenticated user
curl --request GET \
--url https://api.sociavault.com/v1/credits \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.sociavault.com/v1/credits"
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.sociavault.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.sociavault.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 => [
"X-API-Key: <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.sociavault.com/v1/credits"
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.sociavault.com/v1/credits")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sociavault.com/v1/credits")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"credits": 5994,
"subscriptionStatus": "active",
"subscriptionId": "cs_live_a1B2c3D4e5F6g7H8i9J0k1L2m3N4o5P6q7R8s9T0u1V2w3X4y5Z6"
}Reading the response
subscriptionStatus is free on every new account and becomes active once a credit pack is
purchased. free is not an error and does not mean credits are missing — an account can sit on
free with a healthy balance from its signup credits.
subscriptionId holds the Stripe Checkout Session ID of the most recent purchase (cs_...),
not a Stripe subscription ID. Credit packs are one-time purchases.
Balance reads 0 and free after paying
This almost always means the request authenticated as a different account from the one that was billed. It is easy to end up with more than one account without realising: signing in with a different Google identity, or with a work address instead of a personal one, creates a separate account with its own API key and its own balance. A purchase credits the account that checked out. It has no effect on keys belonging to any other account. To check which account a key belongs to, call this endpoint with that exact key and compare the balance against the one your dashboard shows:curl https://api.sociavault.com/v1/credits \
-H "X-API-Key: YOUR_API_KEY"
?apiKey= query parameter if you use the hosted MCP server.
Which header to use
API keys go inX-API-Key. Sending an sk_live_... key as Authorization: Bearer returns
401, because the Bearer scheme is reserved for dashboard session tokens.
# correct
curl https://api.sociavault.com/v1/credits -H "X-API-Key: sk_live_..."
# returns 401
curl https://api.sociavault.com/v1/credits -H "Authorization: Bearer sk_live_..."
402 means the request authenticated fine and
was stopped at the credit check, so the key itself is valid. A 401 means the key was not
accepted at all.Authorizations
API key for authentication. Format: sk_live_xxxxxxxxxxxxx
Get your API key from the Dashboard.
Response
Successful response
Billing state of the account. free is the default for every new account, including accounts that still hold their signup credits, and remains the value until a credit pack is purchased. active means a credit pack has been purchased on this account. These are the only two values the API returns.
free, active "active"
Stripe Checkout Session ID of the most recent credit pack purchase, or null if there has not been one. Despite the field name this is a checkout session (cs_...), not a Stripe subscription - credit packs are one-time purchases.
"cs_live_a1B2c3D4e5F6g7H8i9J0k1L2m3N4o5P6q7R8s9T0u1V2w3X4y5Z6"