내 조직 크레딧 잔액 조회
curl --request GET \
--url https://platform-api.trychainshift.ai/api/v1/platform/credits/me \
--header 'API-Key: <api-key>'import requests
url = "https://platform-api.trychainshift.ai/api/v1/platform/credits/me"
headers = {"API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'API-Key': '<api-key>'}};
fetch('https://platform-api.trychainshift.ai/api/v1/platform/credits/me', 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://platform-api.trychainshift.ai/api/v1/platform/credits/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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://platform-api.trychainshift.ai/api/v1/platform/credits/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("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://platform-api.trychainshift.ai/api/v1/platform/credits/me")
.header("API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform-api.trychainshift.ai/api/v1/platform/credits/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"balance": 99162205
}{
"code": "COMMON_UNAUTHORIZED",
"message": "인증되지 않은 사용자입니다"
}{
"code": "PLATFORM_RATE_LIMIT_EXCEEDED",
"message": "요청이 너무 많습니다. 잠시 후 다시 시도해주세요."
}{
"message": "Internal Server Error",
"requestID": "bkZqnHQepkgTOocTvyHWSlHcGzRqQbZk"
}시작
크레딧 잔액 조회
조직의 현재 크레딧 잔액(유료+플랜 합계)을 조회합니다. 사용 이력이 없는 조직은 잔액 0으로 응답합니다.
오류
| HTTP | 코드 | 설명 |
|---|---|---|
| 401 | COMMON_UNAUTHORIZED | API 키 또는 액세스 토큰이 없거나 유효하지 않음 |
| 429 | PLATFORM_RATE_LIMIT_EXCEEDED | 요청 한도 초과. Retry-After 헤더의 초만큼 기다린 뒤 재시도 |
| 500 | — | 서버 내부 오류. code 없이 message 와 requestID 를 반환 |
GET
/
v1
/
platform
/
credits
/
me
내 조직 크레딧 잔액 조회
curl --request GET \
--url https://platform-api.trychainshift.ai/api/v1/platform/credits/me \
--header 'API-Key: <api-key>'import requests
url = "https://platform-api.trychainshift.ai/api/v1/platform/credits/me"
headers = {"API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'API-Key': '<api-key>'}};
fetch('https://platform-api.trychainshift.ai/api/v1/platform/credits/me', 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://platform-api.trychainshift.ai/api/v1/platform/credits/me",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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://platform-api.trychainshift.ai/api/v1/platform/credits/me"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("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://platform-api.trychainshift.ai/api/v1/platform/credits/me")
.header("API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://platform-api.trychainshift.ai/api/v1/platform/credits/me")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"balance": 99162205
}{
"code": "COMMON_UNAUTHORIZED",
"message": "인증되지 않은 사용자입니다"
}{
"code": "PLATFORM_RATE_LIMIT_EXCEEDED",
"message": "요청이 너무 많습니다. 잠시 후 다시 시도해주세요."
}{
"message": "Internal Server Error",
"requestID": "bkZqnHQepkgTOocTvyHWSlHcGzRqQbZk"
}