1.1.4 • Published 2 years ago

@leap-ai/sdk v1.1.4

Weekly downloads
-
License
Unlicense
Repository
github
Last release
2 years ago

@leap-ai/sdk

npm More Info

The Official Leap API

Installing

npm

npm install @leap-ai/sdk --save

yarn

yarn add @leap-ai/sdk

Important note: this library can be used in both the client-side or server-side, but using it in client-side browser code is not recommended as you would expose security credentials.

Getting Started

import { Leap } from "@leap-ai/sdk";

const leap = new Leap({
  // Defining the base path is optional and defaults to https://api.tryleap.ai
  // basePath: "https://api.tryleap.ai",
  accessToken: "ACCESS_TOKEN",
});

const generateResponse = await leap.images.generate({
  modelId: "modelId_example",
  prompt: "A photo of an astronaut riding a horse",
  negativePrompt: "asymmetric, bad hands, bad hair",
  steps: 50,
  width: 1024,
  height: 1024,
  numberOfImages: 1,
  promptStrength: 7,
  seed: 4523184,
});

console.log(generateResponse);

Documentation for API Endpoints

All URIs are relative to https://api.tryleap.ai

TagMethodHTTP requestDescription
ImagesgeneratePOST /api/v1/images/models/{modelId}/inferencesGenerate an Image
ImagesdeleteDELETE /api/v1/images/models/{modelId}/inferences/{inferenceId}Delete Image Job
ImagesfindOneGET /api/v1/images/models/{modelId}/inferences/{inferenceId}Get Single Image Job
ImageslistAllGET /api/v1/images/models/{modelId}/inferencesList All Image Jobs
Image ModelsdeleteModelDELETE /api/v2/images/models/{modelId}Delete a Model
Image ModelsgetModelGET /api/v2/images/models/{modelId}Get a Single Model
Image ModelslistAllModelsGET /api/v2/images/modelsList All Models
Image ModelstrainModelPOST /api/v2/images/models/newTrain Model
MusicfindOneGET /api/v1/music/{inferenceId}Get a Music Generation Job
MusicgeneratePOST /api/v1/musicGenerate Music
MusiclistAllGET /api/v1/musicList Music Generation Jobs

Author

This TypeScript package is automatically generated by Konfig

1.1.1

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago

0.0.130

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

0.0.128

2 years ago

0.0.127

2 years ago

0.0.126

2 years ago

0.0.125

2 years ago

0.0.129

2 years ago

0.0.120

2 years ago

0.0.124

2 years ago

0.0.123

2 years ago

0.0.122

2 years ago

0.0.121

2 years ago

0.1.0

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.3

2 years ago

1.0.0-beta.0

2 years ago

1.0.0-beta.1

2 years ago

0.0.117

2 years ago

0.0.116

2 years ago

0.0.115

2 years ago

0.0.119

2 years ago

0.0.118

2 years ago

0.0.113

2 years ago

0.0.112

2 years ago

0.0.111

2 years ago

0.0.110

2 years ago

0.0.109

2 years ago

0.0.108

2 years ago

0.0.107

2 years ago

0.0.106

2 years ago

0.0.105

2 years ago

0.0.104

2 years ago

0.0.103

2 years ago

0.0.102

2 years ago

0.0.101

2 years ago

0.0.1

2 years ago