Skip to content

Latest commit

 

History

History
46 lines (30 loc) · 3.69 KB

README.md

File metadata and controls

46 lines (30 loc) · 3.69 KB

User

(user)

Available Operations

getUserSelf

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

import { Leonardo } from "@leonardo-ai/sdk";

const leonardo = new Leonardo({
  bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
});

async function run() {
  const result = await leonardo.user.getUserSelf();

  // Handle the result
  console.log(result)
}

run();

Parameters

Parameter Type Required Description
options RequestOptions Used to set various options for making HTTP requests.
options.fetchOptions RequestInit Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.

Response

Promise<operations.GetUserSelfResponse>

Errors

Error Object Status Code Content Type
errors.SDKError 4xx-5xx /