MCPcopy Index your code
hub / github.com/SunoAI-API/Suno-API / get_credits

Function get_credits

utils.py:66–75  ·  view source on GitHub ↗
(token)

Source from the content-addressed store, hash-verified

64
65
66async def get_credits(token):
67 headers = {"Authorization": f"Bearer {token}"}
68 api_url = f"{BASE_URL}/api/billing/info/"
69 respose = await fetch(api_url, headers, method="GET")
70 return {
71 "credits_left": respose['total_credits_left'],
72 "period": respose['period'],
73 "monthly_limit": respose['monthly_limit'],
74 "monthly_usage": respose['monthly_usage']
75 }

Callers 1

fetch_creditsFunction · 0.90

Calls 1

fetchFunction · 0.85

Tested by

no test coverage detected