クレジット残高
今使えるクレジット、実行中のタスクが確保しているクレジット、プランのクレジットが更新される日時。
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"
}
}