Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/speakeasy-sdks/leonardo-ts-sdk
- Owner: speakeasy-sdks
- License: mit
- Created: 2023-02-14T02:10:01.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-04-02T21:12:42.000Z (7 months ago)
- Last Synced: 2024-04-28T05:14:46.057Z (6 months ago)
- Topics: ai, api, image-processing, sdk, ts
- Language: TypeScript
- Homepage: https://docs.leonardo.ai/reference/get_me
- Size: 116 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Leonardo TS SDK
## 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)