Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/speakeasy-sdks/leonardo-ts-sdk

Typescript SDK for the Leonardo AI
https://github.com/speakeasy-sdks/leonardo-ts-sdk

ai api image-processing sdk ts

Last synced: 2 days ago
JSON representation

Typescript SDK for the Leonardo AI

Awesome Lists containing this project

README

        

# Leonardo TS SDK


The API for creating stunning game assets with AI.





## SDK Installation

### NPM

```bash
npm add @leonardo/sdk
```

### Yarn

```bash
yarn add @leonardo/sdk
```

## Authentication

To get access to the API and fetch an API key please sign up for [access](https://leonardo.ai/).

## SDK Example Usage

```typescript
import { Leonardo, withSecurity} from "@leonardo/sdk";
import { DeleteDatasetsIdRequest, DeleteDatasetsIdResponse } from "@leonardo/sdk/src/sdk/models/operations";
import { AxiosError } from "axios";

const sdk = new Leonardo(withSecurity(
security: {
bearerAuth: {
authorization: "Bearer YOUR_BEARER_TOKEN_HERE",
},
}
));

const req: DeleteDatasetsIdRequest = {
pathParams: {
id: "unde",
},
};

sdk.creatingDatasets.deleteDatasetsId(req).then((res: DeleteDatasetsIdResponse | AxiosError) => {
// handle response
});
```

## SDK Available Operations

### creatingDatasets

* `deleteDatasetsId` - Delete a Single Dataset by ID
* `getDatasetsId` - Get a Single Dataset by ID
* `postDatasets` - Create a Dataset
* `postDatasetsDatasetIdUpload` - Upload dataset image
* `postDatasetsDatasetIdUploadGen` - Upload a Single Generated Image to a Dataset

### generatingImages

* `deleteGenerationsId` - Delete a Single Generation
* `getGenerationsUserUserId` - Get generations by user ID
* `getGenerationsId` - Get a Single Generation
* `postGenerations` - Create a Generation of Images

### imageVariations

* `getVariationsId` - Get variation by ID
* `postVariationsUpscale` - Create upscale

### initImages

* `deleteInitImageId` - Delete init image
* `getInitImageId` - Get single init image
* `postInitImage` - Upload init image

### trainingModels

* `deleteModelsId` - Delete a Single Custom Model by ID
* `getModelsId` - Get a Single Custom Model by ID
* `postModels` - Train a Custom Model

### userInformation

* `getMe` - Get user information

### SDK Generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)