(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 leonardo_ai_sdk import LeonardoAiSDK
with LeonardoAiSDK(
bearer_auth="<YOUR_BEARER_TOKEN_HERE>",
) as leonardo_ai_sdk:
res = leonardo_ai_sdk.user.get_user_self()
assert res.object is not None
# Handle response
print(res.object)
Parameter | Type | Required | Description |
---|---|---|---|
retries |
Optional[utils.RetryConfig] | ➖ | Configuration to override the default retry behavior of the client. |
operations.GetUserSelfResponse
Error Type | Status Code | Content Type |
---|---|---|
errors.SDKError | 4XX, 5XX | */* |