@leonardo-ai/sdk 2.1.3 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -56
- package/dist/sdk/models/operations/createdataset.d.ts +1 -1
- package/dist/sdk/models/operations/creategeneration.d.ts +1 -1
- package/dist/sdk/models/operations/createmodel.d.ts +1 -1
- package/dist/sdk/models/operations/createvariationnobg.d.ts +1 -1
- package/dist/sdk/models/operations/createvariationupscale.d.ts +1 -1
- package/dist/sdk/models/operations/deletedatasetbyid.d.ts +1 -1
- package/dist/sdk/models/operations/deletegenerationbyid.d.ts +1 -1
- package/dist/sdk/models/operations/deletegenerationstextureid.d.ts +1 -1
- package/dist/sdk/models/operations/deleteinitimagebyid.d.ts +1 -1
- package/dist/sdk/models/operations/deletemodelbyid.d.ts +1 -1
- package/dist/sdk/models/operations/deletemodels3did.d.ts +1 -1
- package/dist/sdk/models/operations/getdatasetbyid.d.ts +1 -1
- package/dist/sdk/models/operations/getelements.d.ts +1 -1
- package/dist/sdk/models/operations/getgenerationbyid.d.ts +1 -1
- package/dist/sdk/models/operations/getgenerationsbyuserid.d.ts +1 -1
- package/dist/sdk/models/operations/getinitimagebyid.d.ts +1 -1
- package/dist/sdk/models/operations/getmodelbyid.d.ts +1 -1
- package/dist/sdk/models/operations/getplatformmodels.d.ts +1 -1
- package/dist/sdk/models/operations/getuserself.d.ts +1 -1
- package/dist/sdk/models/operations/getvariationbyid.d.ts +1 -1
- package/dist/sdk/models/operations/postgenerationstexture.d.ts +1 -1
- package/dist/sdk/models/operations/postmodels3dupload.d.ts +1 -1
- package/dist/sdk/models/operations/postvariationsunzoom.d.ts +1 -1
- package/dist/sdk/models/operations/uploaddatasetimage.d.ts +1 -1
- package/dist/sdk/models/operations/uploaddatasetimagefromgen.d.ts +1 -1
- package/dist/sdk/models/operations/uploadinitimage.d.ts +1 -1
- package/dist/sdk/sdk.js +3 -3
- package/docs/sdk/models/operations/createdatasetresponse.md +1 -1
- package/docs/sdk/models/operations/creategenerationresponse.md +1 -1
- package/docs/sdk/models/operations/createmodelresponse.md +1 -1
- package/docs/sdk/models/operations/createvariationnobgresponse.md +1 -1
- package/docs/sdk/models/operations/createvariationupscaleresponse.md +1 -1
- package/docs/sdk/models/operations/deletedatasetbyidresponse.md +1 -1
- package/docs/sdk/models/operations/deletegenerationbyidresponse.md +1 -1
- package/docs/sdk/models/operations/deletegenerationstextureidresponse.md +1 -1
- package/docs/sdk/models/operations/deleteinitimagebyidresponse.md +1 -1
- package/docs/sdk/models/operations/deletemodelbyidresponse.md +1 -1
- package/docs/sdk/models/operations/deletemodels3didresponse.md +1 -1
- package/docs/sdk/models/operations/getdatasetbyidresponse.md +1 -1
- package/docs/sdk/models/operations/getelementsresponse.md +1 -1
- package/docs/sdk/models/operations/getgenerationbyidresponse.md +1 -1
- package/docs/sdk/models/operations/getgenerationsbyuseridresponse.md +1 -1
- package/docs/sdk/models/operations/getinitimagebyidresponse.md +1 -1
- package/docs/sdk/models/operations/getmodelbyidresponse.md +1 -1
- package/docs/sdk/models/operations/getplatformmodelsresponse.md +1 -1
- package/docs/sdk/models/operations/getuserselfresponse.md +1 -1
- package/docs/sdk/models/operations/getvariationbyidresponse.md +1 -1
- package/docs/sdk/models/operations/postgenerationstextureresponse.md +1 -1
- package/docs/sdk/models/operations/postmodels3duploadresponse.md +1 -1
- package/docs/sdk/models/operations/postvariationsunzoomresponse.md +1 -1
- package/docs/sdk/models/operations/uploaddatasetimagefromgenresponse.md +1 -1
- package/docs/sdk/models/operations/uploaddatasetimageresponse.md +1 -1
- package/docs/sdk/models/operations/uploadinitimageresponse.md +1 -1
- package/docs/sdk/models/shared/security.md +3 -3
- package/docs/sdks/dataset/README.md +35 -25
- package/docs/sdks/element/README.md +5 -3
- package/docs/sdks/generation/README.md +35 -23
- package/docs/sdks/initimage/README.md +15 -9
- package/docs/sdks/model/README.md +35 -23
- package/docs/sdks/user/README.md +5 -3
- package/docs/sdks/variation/README.md +20 -12
- package/package.json +1 -1
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
| --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
|
|
8
8
|
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
9
9
|
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
10
|
-
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :
|
|
10
|
+
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
11
11
|
| `object` | [operations.DeleteInitImageByIdResponseBody](../../../sdk/models/operations/deleteinitimagebyidresponsebody.md) | :heavy_minus_sign: | Responses for DELETE /init-image/{id} |
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
8
8
|
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
9
9
|
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
10
|
-
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :
|
|
10
|
+
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
11
11
|
| `object` | [operations.DeleteModelByIdResponseBody](../../../sdk/models/operations/deletemodelbyidresponsebody.md) | :heavy_minus_sign: | Responses for DELETE /models/{id} |
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
|
|
8
8
|
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
9
9
|
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
10
|
-
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :
|
|
10
|
+
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
11
11
|
| `object` | [operations.DeleteModels3dIdResponseBody](../../../sdk/models/operations/deletemodels3didresponsebody.md) | :heavy_minus_sign: | Responses for DELETE /api/rest/v1/models-3d/{id} |
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
|
8
8
|
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
9
9
|
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
10
|
-
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :
|
|
10
|
+
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
11
11
|
| `object` | [operations.GetDatasetByIdResponseBody](../../../sdk/models/operations/getdatasetbyidresponsebody.md) | :heavy_minus_sign: | Responses for GET /datasets/{id} |
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
|
8
8
|
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
9
9
|
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
10
|
-
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :
|
|
10
|
+
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
11
11
|
| `object` | [operations.GetElementsResponseBody](../../../sdk/models/operations/getelementsresponsebody.md) | :heavy_minus_sign: | Responses for GET /api/rest/v1/elements |
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
|
8
8
|
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
9
9
|
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
10
|
-
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :
|
|
10
|
+
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
11
11
|
| `object` | [operations.GetGenerationByIdResponseBody](../../../sdk/models/operations/getgenerationbyidresponsebody.md) | :heavy_minus_sign: | Responses for GET /generations/{id} |
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
|
|
8
8
|
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
9
9
|
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
10
|
-
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :
|
|
10
|
+
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
11
11
|
| `object` | [operations.GetGenerationsByUserIdResponseBody](../../../sdk/models/operations/getgenerationsbyuseridresponsebody.md) | :heavy_minus_sign: | Responses for GET /generations/user/{userId} |
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
|
|
8
8
|
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
9
9
|
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
10
|
-
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :
|
|
10
|
+
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
11
11
|
| `object` | [operations.GetInitImageByIdResponseBody](../../../sdk/models/operations/getinitimagebyidresponsebody.md) | :heavy_minus_sign: | Responses for GET /init-image/{id} |
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
| ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
|
|
8
8
|
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
9
9
|
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
10
|
-
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :
|
|
10
|
+
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
11
11
|
| `object` | [operations.GetModelByIdResponseBody](../../../sdk/models/operations/getmodelbyidresponsebody.md) | :heavy_minus_sign: | Responses for GET /models/{id} |
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
|
8
8
|
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
9
9
|
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
10
|
-
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :
|
|
10
|
+
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
11
11
|
| `object` | [operations.GetPlatformModelsResponseBody](../../../sdk/models/operations/getplatformmodelsresponsebody.md) | :heavy_minus_sign: | Responses for GET /api/rest/v1/platformModels |
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
|
8
8
|
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
9
9
|
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
10
|
-
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :
|
|
10
|
+
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
11
11
|
| `object` | [operations.GetUserSelfResponseBody](../../../sdk/models/operations/getuserselfresponsebody.md) | :heavy_minus_sign: | Responses for GET /me |
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- |
|
|
8
8
|
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
9
9
|
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
10
|
-
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :
|
|
10
|
+
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
11
11
|
| `object` | [operations.GetVariationByIdResponseBody](../../../sdk/models/operations/getvariationbyidresponsebody.md) | :heavy_minus_sign: | Responses for GET /variations/{id} |
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
|
|
8
8
|
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
9
9
|
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
10
|
-
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :
|
|
10
|
+
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
11
11
|
| `object` | [operations.PostGenerationsTextureResponseBody](../../../sdk/models/operations/postgenerationstextureresponsebody.md) | :heavy_minus_sign: | Responses for POST /api/rest/v1/generations-texture |
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
8
8
|
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
9
9
|
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
10
|
-
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :
|
|
10
|
+
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
11
11
|
| `object` | [operations.PostModels3dUploadResponseBody](../../../sdk/models/operations/postmodels3duploadresponsebody.md) | :heavy_minus_sign: | Responses for POST /api/rest/v1/models-3d/upload |
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
| ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
|
|
8
8
|
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
9
9
|
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
10
|
-
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :
|
|
10
|
+
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
11
11
|
| `object` | [operations.PostVariationsUnzoomResponseBody](../../../sdk/models/operations/postvariationsunzoomresponsebody.md) | :heavy_minus_sign: | Responses for POST /api/rest/v1/variations/unzoom |
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
|
8
8
|
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
9
9
|
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
10
|
-
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :
|
|
10
|
+
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
11
11
|
| `object` | [operations.UploadDatasetImageFromGenResponseBody](../../../sdk/models/operations/uploaddatasetimagefromgenresponsebody.md) | :heavy_minus_sign: | Responses for POST /datasets/{datasetId}/upload/gen |
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
|
|
8
8
|
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
9
9
|
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
10
|
-
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :
|
|
10
|
+
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
11
11
|
| `object` | [operations.UploadDatasetImageResponseBody](../../../sdk/models/operations/uploaddatasetimageresponsebody.md) | :heavy_minus_sign: | Responses for POST /datasets/{datasetId}/upload |
|
|
@@ -7,5 +7,5 @@
|
|
|
7
7
|
| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
|
|
8
8
|
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
9
9
|
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
10
|
-
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :
|
|
10
|
+
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
11
11
|
| `object` | [operations.UploadInitImageResponseBody](../../../sdk/models/operations/uploadinitimageresponsebody.md) | :heavy_minus_sign: | Responses for POST /init-image |
|
|
@@ -3,6 +3,6 @@
|
|
|
3
3
|
|
|
4
4
|
## Fields
|
|
5
5
|
|
|
6
|
-
| Field | Type | Required | Description |
|
|
7
|
-
| ------------------ | ------------------ | ------------------ | ------------------ |
|
|
8
|
-
| `bearerAuth` | *string* | :heavy_check_mark: | N/A |
|
|
6
|
+
| Field | Type | Required | Description |
|
|
7
|
+
| ------------------ | ------------------ | ------------------ | ------------------ |
|
|
8
|
+
| `bearerAuth` | *string* | :heavy_check_mark: | N/A |
|
|
@@ -18,9 +18,9 @@ This endpoint creates a new dataset
|
|
|
18
18
|
```typescript
|
|
19
19
|
import { Leonardo } from "@leonardo-ai/sdk";
|
|
20
20
|
|
|
21
|
-
|
|
21
|
+
async function run() {
|
|
22
22
|
const sdk = new Leonardo({
|
|
23
|
-
bearerAuth: "",
|
|
23
|
+
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
|
|
24
24
|
});
|
|
25
25
|
|
|
26
26
|
const res = await sdk.dataset.createDataset({
|
|
@@ -30,7 +30,9 @@ import { Leonardo } from "@leonardo-ai/sdk";
|
|
|
30
30
|
if (res.statusCode == 200) {
|
|
31
31
|
// handle response
|
|
32
32
|
}
|
|
33
|
-
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
run();
|
|
34
36
|
```
|
|
35
37
|
|
|
36
38
|
### Parameters
|
|
@@ -60,9 +62,9 @@ This endpoint deletes the specific dataset
|
|
|
60
62
|
import { Leonardo } from "@leonardo-ai/sdk";
|
|
61
63
|
import { DeleteDatasetByIdRequest } from "@leonardo-ai/sdk/dist/sdk/models/operations";
|
|
62
64
|
|
|
63
|
-
|
|
65
|
+
async function run() {
|
|
64
66
|
const sdk = new Leonardo({
|
|
65
|
-
bearerAuth: "",
|
|
67
|
+
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
|
|
66
68
|
});
|
|
67
69
|
const id: string = "string";
|
|
68
70
|
|
|
@@ -71,7 +73,9 @@ const id: string = "string";
|
|
|
71
73
|
if (res.statusCode == 200) {
|
|
72
74
|
// handle response
|
|
73
75
|
}
|
|
74
|
-
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
run();
|
|
75
79
|
```
|
|
76
80
|
|
|
77
81
|
### Parameters
|
|
@@ -101,9 +105,9 @@ This endpoint gets the specific dataset
|
|
|
101
105
|
import { Leonardo } from "@leonardo-ai/sdk";
|
|
102
106
|
import { GetDatasetByIdRequest } from "@leonardo-ai/sdk/dist/sdk/models/operations";
|
|
103
107
|
|
|
104
|
-
|
|
108
|
+
async function run() {
|
|
105
109
|
const sdk = new Leonardo({
|
|
106
|
-
bearerAuth: "",
|
|
110
|
+
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
|
|
107
111
|
});
|
|
108
112
|
const id: string = "string";
|
|
109
113
|
|
|
@@ -112,7 +116,9 @@ const id: string = "string";
|
|
|
112
116
|
if (res.statusCode == 200) {
|
|
113
117
|
// handle response
|
|
114
118
|
}
|
|
115
|
-
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
run();
|
|
116
122
|
```
|
|
117
123
|
|
|
118
124
|
### Parameters
|
|
@@ -142,9 +148,9 @@ This endpoint returns presigned details to upload a dataset image to S3
|
|
|
142
148
|
import { Leonardo } from "@leonardo-ai/sdk";
|
|
143
149
|
import { UploadDatasetImageRequest, UploadDatasetImageRequestBody } from "@leonardo-ai/sdk/dist/sdk/models/operations";
|
|
144
150
|
|
|
145
|
-
|
|
151
|
+
async function run() {
|
|
146
152
|
const sdk = new Leonardo({
|
|
147
|
-
bearerAuth: "",
|
|
153
|
+
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
|
|
148
154
|
});
|
|
149
155
|
const requestBody: UploadDatasetImageRequestBody = {
|
|
150
156
|
extension: "mpg4",
|
|
@@ -156,16 +162,18 @@ const datasetId: string = "string";
|
|
|
156
162
|
if (res.statusCode == 200) {
|
|
157
163
|
// handle response
|
|
158
164
|
}
|
|
159
|
-
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
run();
|
|
160
168
|
```
|
|
161
169
|
|
|
162
170
|
### Parameters
|
|
163
171
|
|
|
164
|
-
| Parameter
|
|
165
|
-
|
|
|
166
|
-
| `requestBody`
|
|
167
|
-
| `datasetId`
|
|
168
|
-
| `config`
|
|
172
|
+
| Parameter | Type | Required | Description |
|
|
173
|
+
| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
|
|
174
|
+
| `requestBody` | [operations.UploadDatasetImageRequestBody](../../sdk/models/operations/uploaddatasetimagerequestbody.md) | :heavy_check_mark: | Query parameters provided in the request body as a JSON object |
|
|
175
|
+
| `datasetId` | *string* | :heavy_check_mark: | _"datasetId" is required |
|
|
176
|
+
| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. |
|
|
169
177
|
|
|
170
178
|
|
|
171
179
|
### Response
|
|
@@ -187,9 +195,9 @@ This endpoint will upload a previously generated image to the dataset
|
|
|
187
195
|
import { Leonardo } from "@leonardo-ai/sdk";
|
|
188
196
|
import { UploadDatasetImageFromGenRequest, UploadDatasetImageFromGenRequestBody } from "@leonardo-ai/sdk/dist/sdk/models/operations";
|
|
189
197
|
|
|
190
|
-
|
|
198
|
+
async function run() {
|
|
191
199
|
const sdk = new Leonardo({
|
|
192
|
-
bearerAuth: "",
|
|
200
|
+
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
|
|
193
201
|
});
|
|
194
202
|
const requestBody: UploadDatasetImageFromGenRequestBody = {
|
|
195
203
|
generatedImageId: "string",
|
|
@@ -201,16 +209,18 @@ const datasetId: string = "string";
|
|
|
201
209
|
if (res.statusCode == 200) {
|
|
202
210
|
// handle response
|
|
203
211
|
}
|
|
204
|
-
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
run();
|
|
205
215
|
```
|
|
206
216
|
|
|
207
217
|
### Parameters
|
|
208
218
|
|
|
209
|
-
| Parameter
|
|
210
|
-
|
|
|
211
|
-
| `requestBody`
|
|
212
|
-
| `datasetId`
|
|
213
|
-
| `config`
|
|
219
|
+
| Parameter | Type | Required | Description |
|
|
220
|
+
| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
|
|
221
|
+
| `requestBody` | [operations.UploadDatasetImageFromGenRequestBody](../../sdk/models/operations/uploaddatasetimagefromgenrequestbody.md) | :heavy_check_mark: | Query parameters to be provided in the request body as a JSON object |
|
|
222
|
+
| `datasetId` | *string* | :heavy_check_mark: | The ID of the dataset to upload the image to. |
|
|
223
|
+
| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. |
|
|
214
224
|
|
|
215
225
|
|
|
216
226
|
### Response
|
|
@@ -14,9 +14,9 @@ Get a list of public Elements available for use with generations.
|
|
|
14
14
|
```typescript
|
|
15
15
|
import { Leonardo } from "@leonardo-ai/sdk";
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
async function run() {
|
|
18
18
|
const sdk = new Leonardo({
|
|
19
|
-
bearerAuth: "",
|
|
19
|
+
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
const res = await sdk.element.getElements();
|
|
@@ -24,7 +24,9 @@ import { Leonardo } from "@leonardo-ai/sdk";
|
|
|
24
24
|
if (res.statusCode == 200) {
|
|
25
25
|
// handle response
|
|
26
26
|
}
|
|
27
|
-
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
run();
|
|
28
30
|
```
|
|
29
31
|
|
|
30
32
|
### Parameters
|
|
@@ -20,9 +20,9 @@ This endpoint will generate images
|
|
|
20
20
|
import { Leonardo } from "@leonardo-ai/sdk";
|
|
21
21
|
import { ControlnetType, SdGenerationSchedulers, SdGenerationStyle, SdVersions } from "@leonardo-ai/sdk/dist/sdk/models/shared";
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
async function run() {
|
|
24
24
|
const sdk = new Leonardo({
|
|
25
|
-
bearerAuth: "",
|
|
25
|
+
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
|
|
26
26
|
});
|
|
27
27
|
|
|
28
28
|
const res = await sdk.generation.createGeneration({
|
|
@@ -37,7 +37,9 @@ import { ControlnetType, SdGenerationSchedulers, SdGenerationStyle, SdVersions }
|
|
|
37
37
|
if (res.statusCode == 200) {
|
|
38
38
|
// handle response
|
|
39
39
|
}
|
|
40
|
-
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
run();
|
|
41
43
|
```
|
|
42
44
|
|
|
43
45
|
### Parameters
|
|
@@ -67,9 +69,9 @@ This endpoint deletes a specific generation
|
|
|
67
69
|
import { Leonardo } from "@leonardo-ai/sdk";
|
|
68
70
|
import { DeleteGenerationByIdRequest } from "@leonardo-ai/sdk/dist/sdk/models/operations";
|
|
69
71
|
|
|
70
|
-
|
|
72
|
+
async function run() {
|
|
71
73
|
const sdk = new Leonardo({
|
|
72
|
-
bearerAuth: "",
|
|
74
|
+
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
|
|
73
75
|
});
|
|
74
76
|
const id: string = "string";
|
|
75
77
|
|
|
@@ -78,7 +80,9 @@ const id: string = "string";
|
|
|
78
80
|
if (res.statusCode == 200) {
|
|
79
81
|
// handle response
|
|
80
82
|
}
|
|
81
|
-
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
run();
|
|
82
86
|
```
|
|
83
87
|
|
|
84
88
|
### Parameters
|
|
@@ -108,9 +112,9 @@ This endpoint deletes the specific texture generation.
|
|
|
108
112
|
import { Leonardo } from "@leonardo-ai/sdk";
|
|
109
113
|
import { DeleteGenerationsTextureIdRequest, DeleteGenerationsTextureIdRequestBody } from "@leonardo-ai/sdk/dist/sdk/models/operations";
|
|
110
114
|
|
|
111
|
-
|
|
115
|
+
async function run() {
|
|
112
116
|
const sdk = new Leonardo({
|
|
113
|
-
bearerAuth: "",
|
|
117
|
+
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
|
|
114
118
|
});
|
|
115
119
|
const id: string = "string";
|
|
116
120
|
const requestBody: DeleteGenerationsTextureIdRequestBody = {};
|
|
@@ -120,16 +124,18 @@ const requestBody: DeleteGenerationsTextureIdRequestBody = {};
|
|
|
120
124
|
if (res.statusCode == 200) {
|
|
121
125
|
// handle response
|
|
122
126
|
}
|
|
123
|
-
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
run();
|
|
124
130
|
```
|
|
125
131
|
|
|
126
132
|
### Parameters
|
|
127
133
|
|
|
128
|
-
| Parameter
|
|
129
|
-
|
|
|
130
|
-
| `id`
|
|
131
|
-
| `requestBody`
|
|
132
|
-
| `config`
|
|
134
|
+
| Parameter | Type | Required | Description |
|
|
135
|
+
| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ |
|
|
136
|
+
| `id` | *string* | :heavy_check_mark: | _"id" is required (enter it either in parameters or request body)_ |
|
|
137
|
+
| `requestBody` | [operations.DeleteGenerationsTextureIdRequestBody](../../sdk/models/operations/deletegenerationstextureidrequestbody.md) | :heavy_minus_sign: | Query parameters can also be provided in the request body as a JSON object |
|
|
138
|
+
| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. |
|
|
133
139
|
|
|
134
140
|
|
|
135
141
|
### Response
|
|
@@ -151,9 +157,9 @@ This endpoint will provide information about a specific generation
|
|
|
151
157
|
import { Leonardo } from "@leonardo-ai/sdk";
|
|
152
158
|
import { GetGenerationByIdRequest } from "@leonardo-ai/sdk/dist/sdk/models/operations";
|
|
153
159
|
|
|
154
|
-
|
|
160
|
+
async function run() {
|
|
155
161
|
const sdk = new Leonardo({
|
|
156
|
-
bearerAuth: "",
|
|
162
|
+
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
|
|
157
163
|
});
|
|
158
164
|
const id: string = "string";
|
|
159
165
|
|
|
@@ -162,7 +168,9 @@ const id: string = "string";
|
|
|
162
168
|
if (res.statusCode == 200) {
|
|
163
169
|
// handle response
|
|
164
170
|
}
|
|
165
|
-
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
run();
|
|
166
174
|
```
|
|
167
175
|
|
|
168
176
|
### Parameters
|
|
@@ -192,9 +200,9 @@ This endpoint returns all generations by a specific user
|
|
|
192
200
|
import { Leonardo } from "@leonardo-ai/sdk";
|
|
193
201
|
import { GetGenerationsByUserIdRequest } from "@leonardo-ai/sdk/dist/sdk/models/operations";
|
|
194
202
|
|
|
195
|
-
|
|
203
|
+
async function run() {
|
|
196
204
|
const sdk = new Leonardo({
|
|
197
|
-
bearerAuth: "",
|
|
205
|
+
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
|
|
198
206
|
});
|
|
199
207
|
const userId: string = "string";
|
|
200
208
|
const limit: number = 270501;
|
|
@@ -205,7 +213,9 @@ const offset: number = 770121;
|
|
|
205
213
|
if (res.statusCode == 200) {
|
|
206
214
|
// handle response
|
|
207
215
|
}
|
|
208
|
-
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
run();
|
|
209
219
|
```
|
|
210
220
|
|
|
211
221
|
### Parameters
|
|
@@ -236,9 +246,9 @@ This endpoint will generate a texture generation.
|
|
|
236
246
|
```typescript
|
|
237
247
|
import { Leonardo } from "@leonardo-ai/sdk";
|
|
238
248
|
|
|
239
|
-
|
|
249
|
+
async function run() {
|
|
240
250
|
const sdk = new Leonardo({
|
|
241
|
-
bearerAuth: "",
|
|
251
|
+
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
|
|
242
252
|
});
|
|
243
253
|
|
|
244
254
|
const res = await sdk.generation.postGenerationsTexture({});
|
|
@@ -246,7 +256,9 @@ import { Leonardo } from "@leonardo-ai/sdk";
|
|
|
246
256
|
if (res.statusCode == 200) {
|
|
247
257
|
// handle response
|
|
248
258
|
}
|
|
249
|
-
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
run();
|
|
250
262
|
```
|
|
251
263
|
|
|
252
264
|
### Parameters
|