(user)
- get_user_self - Get user information
This endpoint will return your user information such as your user id, username, token renewal date and current amounts of the following: subscription tokens, gpt (prompt generation) tokens, and model training tokens
from leonardoaisdk import LeonardoAiSDK
s = LeonardoAiSDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.user.get_user_self()
if res.object is not None:
# handle response
pass
Parameter | Type | Required | Description |
---|---|---|---|
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.GetUserSelfResponse
Error Object | Status Code | Content Type |
---|---|---|
errors.SDKError | 4xx-5xx | / |