Get Credit Balance
curl --request GET \
--url http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/users/credits \
--header 'chariotai-api-key: <api-key>'import requests
url = "http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/users/credits"
headers = {"chariotai-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'chariotai-api-key': '<api-key>'}};
fetch('http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/users/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 => "http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/users/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 => [
"chariotai-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 := "http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/users/credits"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("chariotai-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("http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/users/credits")
.header("chariotai-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/users/credits")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["chariotai-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"balance": 123,
"total": 123,
"wallet_balance": 123
}Endpoints
Get User Credits
GET
/
v1
/
users
/
credits
Get Credit Balance
curl --request GET \
--url http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/users/credits \
--header 'chariotai-api-key: <api-key>'import requests
url = "http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/users/credits"
headers = {"chariotai-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'chariotai-api-key': '<api-key>'}};
fetch('http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/users/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 => "http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/users/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 => [
"chariotai-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 := "http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/users/credits"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("chariotai-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("http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/users/credits")
.header("chariotai-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("http://chariot-dev-backend-lb-828367089.ap-south-1.elb.amazonaws.com/v1/users/credits")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Get.new(url)
request["chariotai-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"balance": 123,
"total": 123,
"wallet_balance": 123
}Authorizations
Use the API key generated from our website to programmatically interact with our endpoints. This key authorizes your requests, allowing you to access and utilize our services securely.
⌘I