API 엔드포인트

크레딧 조회

GET/v2/credits

크레딧 API 쿼리

현재 사용자의 계좌잔고 및 신용정보를 조회합니다.

GEThttps://udioapi.pro/api/v2/credits

tips

이 엔드포인트를 사용하여 현재 계정 잔액과 AI 음악 생성에 사용 가능한 크레딧을 확인하세요.

응답 필드:

  • credits: 음악 생성에 사용할 수 있는 남은 크레딧
  • used_credits: 사용된 총 크레딧 소비됨

키 사용:

  • 새 세대 작업을 시작하기 전에 남은 크레딧 확인
  • 실시간으로 크레딧 소비 모니터링
  • 애플리케이션에 잔액 부족 경고 구현

인증: 인증을 위해 항상 승인 헤더에 Bearer 토큰을 포함하세요. 요청하세요.

requestHeaders

namerequireddescription
Authorizationyes인증을 위한 Bearer 토큰입니다. "Bearer your_api_key" 형식을 사용하세요.

responses

json
{
  "code": 200,
  "message": "success",
  "data": {
    "credits": 195,
    "used_credits": 5
  }
}
json
{
  "code": 401,
  "message": "Unauthorized: Invalid or missing API key"
}
json
{
  "code": 403,
  "message": "Forbidden: Insufficient permissions to access credit information"
}
json
{
  "code": 429,
  "message": "Rate limit exceeded. Please try again later."
}
json
{
  "code": 500,
  "message": "Internal Server Error: Unable to retrieve credit information"
}

codeExamples

curl
curl -X GET "https://udioapi.pro/api/v2/credits" \
  -H "Authorization: Bearer YOUR_API_KEY"
javascript
const response = await fetch('https://udioapi.pro/api/v2/credits', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

const data = await response.json();
console.log('Remaining credits:', data.data.credits);
console.log('Used credits:', data.data.used_credits);