HyperGPT HyperGPT

1.3 Get Balance

The Get Balance endpoint retrieves the balance of a user. It requires a valid JWT token for authentication and authorization.

Method: POST

Endpoint:

https://sdk.hypergpt.ai/user/getBalance

Parameters:

Return Value:

Example Request:

headers = {
    "Authorization": "Bearer " + bearer_token,

}
params = {
    "token": bearer_token
}

response = requests.get(
    "https://sdk.hypergpt.ai/user/getBalance",
    headers=headers,
    params=params
)

return response.json()

Example Response:

Example Response (Token Invalid):

Overview The Get Balance endpoint enables users to retrieve their balance by providing a valid JWT token. The token is validated and decoded to extract the user's ID, which is then used to fetch the balance. If the token is invalid, an appropriate error message is returned to inform the user of the issue.

Last updated May 19, 2026