크레딧 잔액
지금 쓸 수 있는 크레딧, 실행 중인 태스크가 보류한 크레딧, 요금제 크레딧이 갱신되는 시각을 알려 줍니다.
curl --request GET \
--url https://api.querying.ai/v1/credits \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.querying.ai/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.querying.ai/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.querying.ai/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.querying.ai/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.querying.ai/v1/credits")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.querying.ai/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{
"success": true,
"remaining": 1879939,
"perCycle": 1000000,
"cycleResetsAt": "2026-11-14T07:37:57.000Z",
"reserved": 61,
"plan": "max",
"topUpBalance": {
"credits": 1000000,
"nextExpiresAt": "2027-01-19T10:01:57.000Z",
"nextCredits": 1000000
}
}{
"success": false,
"error": {
"code": "MISSING_API_KEY",
"message": "Missing or invalid API key",
"timestamp": "2026-07-09T04:12:00.000Z"
}
}{
"success": false,
"error": {
"code": "SUB_ACCOUNT_FORBIDDEN",
"message": "A sub-account spends its parent account's credits. The parent account reads its usage at /v1/sub-accounts/{id}/usage",
"timestamp": "2026-10-20T00:00:00.000Z"
}
}remaining에는 대기 중이거나 실행 중인 태스크가 보류한 크레딧이 이미 빠져 있습니다. 각 필드의 뜻은 크레딧과 한도에 있습니다.인증
Your API key, sent as Authorization: Bearer <key>.
응답
Your account's credits.
Credits you can spend now, with up to two decimals. Tasks you already submitted hold their price in reserved, so it is not in this number. A submit that needs more returns 402 INSUFFICIENT_CREDITS.
Credits your plan grants each billing cycle. null without an active plan.
When the current billing cycle ends. At renewal your balance becomes the next cycle's plan credits plus the top-up credits you still hold. null without an active plan.
Credits your queued and running tasks hold. A completed task is charged from its hold, and a failed task's hold returns to remaining.
Your plan. free when no paid plan is active.
free, basic, pro, scale, max Top-up credits within remaining. They last three months from purchase, carry over renewals, and are spent after your plan's credits. null when you have none.
Show child attributes
Show child attributes
curl --request GET \
--url https://api.querying.ai/v1/credits \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.querying.ai/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.querying.ai/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.querying.ai/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.querying.ai/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.querying.ai/v1/credits")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.querying.ai/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{
"success": true,
"remaining": 1879939,
"perCycle": 1000000,
"cycleResetsAt": "2026-11-14T07:37:57.000Z",
"reserved": 61,
"plan": "max",
"topUpBalance": {
"credits": 1000000,
"nextExpiresAt": "2027-01-19T10:01:57.000Z",
"nextCredits": 1000000
}
}{
"success": false,
"error": {
"code": "MISSING_API_KEY",
"message": "Missing or invalid API key",
"timestamp": "2026-07-09T04:12:00.000Z"
}
}{
"success": false,
"error": {
"code": "SUB_ACCOUNT_FORBIDDEN",
"message": "A sub-account spends its parent account's credits. The parent account reads its usage at /v1/sub-accounts/{id}/usage",
"timestamp": "2026-10-20T00:00:00.000Z"
}
}