Skip to content

Latest commit

 

History

History
46 lines (28 loc) · 1.74 KB

README.md

File metadata and controls

46 lines (28 loc) · 1.74 KB

User

(user)

Overview

Available Operations

get_user_self

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

Example Usage

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)

Parameters

Parameter Type Required Description
retries Optional[utils.RetryConfig] Configuration to override the default retry behavior of the client.

Response

operations.GetUserSelfResponse

Errors

Error Type Status Code Content Type
errors.SDKError 4XX, 5XX */*