Skip to main content
GET
/
v1
/
credits
Retrieve credit balance
curl --request GET \
  --url https://supertoneapi.com/v1/credits \
  --header 'x-sup-api-key: <api-key>'
import requests

url = "https://supertoneapi.com/v1/credits"

headers = {"x-sup-api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-sup-api-key': '<api-key>'}};

fetch('https://supertoneapi.com/v1/credits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://supertoneapi.com/v1/credits"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-sup-api-key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://supertoneapi.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-sup-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
HttpResponse<String> response = Unirest.get("https://supertoneapi.com/v1/credits")
.header("x-sup-api-key", "<api-key>")
.asString();
{
  "balance": 123
}
이 문서는 영어 원문을 기반으로 자동 번역되었습니다. 표현이 어색하거나 모호한 부분이 있을 수 있으니, 정확한 내용은 영어 원문을 함께 확인해 주세요.
API 키를 소유한 계정의 현재 크레딧 잔액을 반환합니다. Supertone API와 Supertone Play는 동일한 크레딧 풀을 공유합니다 — 어느 한쪽에서 구매한 크레딧은 다른 쪽에서도 즉시 사용할 수 있습니다.

엔드포인트

GET https://supertoneapi.com/v1/credits

참고사항

  • 크레딧은 생성된 오디오의 초 단위로 차감됩니다.
  • 프리셋 보이스와 커스텀 보이스는 동일한 잔액에서 차감됩니다.
  • 신규 계정은 가입 시 체험용 크레딧을 받을 수 있습니다.
  • predict_duration은 크레딧을 차감하지 않으므로 비용 예측에 사용해 주십시오.

함께 보기

Docs: Cost and usage

지출 모니터링과 잔액 알림 설정 방법입니다.

Predict duration

생성 전에 오디오 길이(및 비용)를 예측합니다.

Authorizations

x-sup-api-key
string
header
required

Response

Credit balance of the user.

balance
number | null
required

Credit balance of the user