@leonardo-ai/sdk 2.30.0 → 2.30.1
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 +1 -0
- package/dist/sdk/generation.d.ts +7 -0
- package/dist/sdk/generation.js +71 -0
- package/dist/sdk/models/operations/getgenerationbyid.d.ts +20 -0
- package/dist/sdk/models/operations/getgenerationbyid.js +25 -0
- package/dist/sdk/models/operations/getgenerationsbyuserid.d.ts +20 -0
- package/dist/sdk/models/operations/getgenerationsbyuserid.js +25 -0
- package/dist/sdk/models/operations/index.d.ts +1 -0
- package/dist/sdk/models/operations/index.js +1 -0
- package/dist/sdk/models/operations/postgenerationsmotionsvd.d.ts +58 -0
- package/dist/sdk/models/operations/postgenerationsmotionsvd.js +127 -0
- package/dist/sdk/sdk.js +3 -3
- package/docs/sdk/models/operations/generatedimages.md +5 -0
- package/docs/sdk/models/operations/getgenerationsbyuseridgeneratedimages.md +5 -0
- package/docs/sdk/models/operations/motionsvdgenerationoutput.md +9 -0
- package/docs/sdk/models/operations/postgenerationsmotionsvdrequestbody.md +14 -0
- package/docs/sdk/models/operations/postgenerationsmotionsvdresponse.md +11 -0
- package/docs/sdk/models/operations/postgenerationsmotionsvdresponsebody.md +10 -0
- package/docs/sdks/generation/README.md +44 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -77,6 +77,7 @@ run();
|
|
|
77
77
|
* [deleteGenerationsTextureId](docs/sdks/generation/README.md#deletegenerationstextureid) - Delete Texture Generation by ID
|
|
78
78
|
* [getGenerationById](docs/sdks/generation/README.md#getgenerationbyid) - Get a Single Generation
|
|
79
79
|
* [getGenerationsByUserId](docs/sdks/generation/README.md#getgenerationsbyuserid) - Get generations by user ID
|
|
80
|
+
* [postGenerationsMotionSvd](docs/sdks/generation/README.md#postgenerationsmotionsvd) - Create SVD Motion Generation
|
|
80
81
|
* [postGenerationsTexture](docs/sdks/generation/README.md#postgenerationstexture) - Create Texture Generation
|
|
81
82
|
|
|
82
83
|
### [initImage](docs/sdks/initimage/README.md)
|
package/dist/sdk/generation.d.ts
CHANGED
|
@@ -39,6 +39,13 @@ export declare class Generation {
|
|
|
39
39
|
* This endpoint returns all generations by a specific user
|
|
40
40
|
*/
|
|
41
41
|
getGenerationsByUserId(userId: string, limit?: number, offset?: number, config?: AxiosRequestConfig): Promise<operations.GetGenerationsByUserIdResponse>;
|
|
42
|
+
/**
|
|
43
|
+
* Create SVD Motion Generation
|
|
44
|
+
*
|
|
45
|
+
* @remarks
|
|
46
|
+
* This endpoint will generate a SVD motion generation.
|
|
47
|
+
*/
|
|
48
|
+
postGenerationsMotionSvd(req: operations.PostGenerationsMotionSvdRequestBody, config?: AxiosRequestConfig): Promise<operations.PostGenerationsMotionSvdResponse>;
|
|
42
49
|
/**
|
|
43
50
|
* Create Texture Generation
|
|
44
51
|
*
|
package/dist/sdk/generation.js
CHANGED
|
@@ -429,6 +429,77 @@ var Generation = /** @class */ (function () {
|
|
|
429
429
|
});
|
|
430
430
|
});
|
|
431
431
|
};
|
|
432
|
+
/**
|
|
433
|
+
* Create SVD Motion Generation
|
|
434
|
+
*
|
|
435
|
+
* @remarks
|
|
436
|
+
* This endpoint will generate a SVD motion generation.
|
|
437
|
+
*/
|
|
438
|
+
Generation.prototype.postGenerationsMotionSvd = function (req, config) {
|
|
439
|
+
var _a, _b;
|
|
440
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
441
|
+
var baseURL, operationUrl, _c, reqBodyHeaders, reqBody, client, globalSecurity, properties, headers, httpRes, responseContentType, res, decodedRes;
|
|
442
|
+
var _d;
|
|
443
|
+
return __generator(this, function (_e) {
|
|
444
|
+
switch (_e.label) {
|
|
445
|
+
case 0:
|
|
446
|
+
if (!(req instanceof utils.SpeakeasyBase)) {
|
|
447
|
+
req = new operations.PostGenerationsMotionSvdRequestBody(req);
|
|
448
|
+
}
|
|
449
|
+
baseURL = utils.templateUrl(this.sdkConfiguration.serverURL, this.sdkConfiguration.serverDefaults);
|
|
450
|
+
operationUrl = baseURL.replace(/\/$/, "") + "/generations-motion-svd";
|
|
451
|
+
_c = __read([{}, null], 2), reqBodyHeaders = _c[0], reqBody = _c[1];
|
|
452
|
+
try {
|
|
453
|
+
_d = __read(utils.serializeRequestBody(req, "request", "json"), 2), reqBodyHeaders = _d[0], reqBody = _d[1];
|
|
454
|
+
}
|
|
455
|
+
catch (e) {
|
|
456
|
+
if (e instanceof Error) {
|
|
457
|
+
throw new Error("Error serializing request body, cause: ".concat(e.message));
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
client = this.sdkConfiguration.defaultClient;
|
|
461
|
+
globalSecurity = this.sdkConfiguration.security;
|
|
462
|
+
if (!(typeof globalSecurity === "function")) return [3 /*break*/, 2];
|
|
463
|
+
return [4 /*yield*/, globalSecurity()];
|
|
464
|
+
case 1:
|
|
465
|
+
globalSecurity = _e.sent();
|
|
466
|
+
_e.label = 2;
|
|
467
|
+
case 2:
|
|
468
|
+
if (!(globalSecurity instanceof utils.SpeakeasyBase)) {
|
|
469
|
+
globalSecurity = new shared.Security(globalSecurity);
|
|
470
|
+
}
|
|
471
|
+
properties = utils.parseSecurityProperties(globalSecurity);
|
|
472
|
+
headers = __assign(__assign(__assign({}, reqBodyHeaders), config === null || config === void 0 ? void 0 : config.headers), properties.headers);
|
|
473
|
+
headers["Accept"] = "application/json";
|
|
474
|
+
headers["user-agent"] = this.sdkConfiguration.userAgent;
|
|
475
|
+
return [4 /*yield*/, client.request(__assign({ validateStatus: function () { return true; }, url: operationUrl, method: "post", headers: headers, responseType: "arraybuffer", data: reqBody }, config))];
|
|
476
|
+
case 3:
|
|
477
|
+
httpRes = _e.sent();
|
|
478
|
+
responseContentType = (_b = (_a = httpRes === null || httpRes === void 0 ? void 0 : httpRes.headers) === null || _a === void 0 ? void 0 : _a["content-type"]) !== null && _b !== void 0 ? _b : "";
|
|
479
|
+
if ((httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == null) {
|
|
480
|
+
throw new Error("status code not found in response: ".concat(httpRes));
|
|
481
|
+
}
|
|
482
|
+
res = new operations.PostGenerationsMotionSvdResponse({
|
|
483
|
+
statusCode: httpRes.status,
|
|
484
|
+
contentType: responseContentType,
|
|
485
|
+
rawResponse: httpRes,
|
|
486
|
+
});
|
|
487
|
+
decodedRes = new TextDecoder().decode(httpRes === null || httpRes === void 0 ? void 0 : httpRes.data);
|
|
488
|
+
switch (true) {
|
|
489
|
+
case (httpRes === null || httpRes === void 0 ? void 0 : httpRes.status) == 200:
|
|
490
|
+
if (utils.matchContentType(responseContentType, "application/json")) {
|
|
491
|
+
res.object = utils.objectToClass(JSON.parse(decodedRes), operations.PostGenerationsMotionSvdResponseBody);
|
|
492
|
+
}
|
|
493
|
+
else {
|
|
494
|
+
throw new errors.SDKError("unknown content-type received: " + responseContentType, httpRes.status, decodedRes, httpRes);
|
|
495
|
+
}
|
|
496
|
+
break;
|
|
497
|
+
}
|
|
498
|
+
return [2 /*return*/, res];
|
|
499
|
+
}
|
|
500
|
+
});
|
|
501
|
+
});
|
|
502
|
+
};
|
|
432
503
|
/**
|
|
433
504
|
* Create Texture Generation
|
|
434
505
|
*
|
|
@@ -28,7 +28,27 @@ export declare class GetGenerationByIdGeneratedImageVariationGeneric extends Spe
|
|
|
28
28
|
export declare class GeneratedImages extends SpeakeasyBase {
|
|
29
29
|
generatedImageVariationGenerics?: GetGenerationByIdGeneratedImageVariationGeneric[];
|
|
30
30
|
id?: string;
|
|
31
|
+
/**
|
|
32
|
+
* If it is an image to video generation.
|
|
33
|
+
*/
|
|
34
|
+
imageToVideo?: boolean;
|
|
31
35
|
likeCount?: number;
|
|
36
|
+
/**
|
|
37
|
+
* If generation is of motion type.
|
|
38
|
+
*/
|
|
39
|
+
motion?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* The URL of the motion MP4.
|
|
42
|
+
*/
|
|
43
|
+
motionMp4URL?: string;
|
|
44
|
+
/**
|
|
45
|
+
* The name of the motion model.
|
|
46
|
+
*/
|
|
47
|
+
motionModel?: string;
|
|
48
|
+
/**
|
|
49
|
+
* The motion strength.
|
|
50
|
+
*/
|
|
51
|
+
motionStrength?: number;
|
|
32
52
|
nsfw?: boolean;
|
|
33
53
|
url?: string;
|
|
34
54
|
}
|
|
@@ -116,11 +116,36 @@ var GeneratedImages = /** @class */ (function (_super) {
|
|
|
116
116
|
(0, class_transformer_1.Expose)({ name: "id" }),
|
|
117
117
|
__metadata("design:type", String)
|
|
118
118
|
], GeneratedImages.prototype, "id", void 0);
|
|
119
|
+
__decorate([
|
|
120
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
121
|
+
(0, class_transformer_1.Expose)({ name: "imageToVideo" }),
|
|
122
|
+
__metadata("design:type", Boolean)
|
|
123
|
+
], GeneratedImages.prototype, "imageToVideo", void 0);
|
|
119
124
|
__decorate([
|
|
120
125
|
(0, utils_1.SpeakeasyMetadata)(),
|
|
121
126
|
(0, class_transformer_1.Expose)({ name: "likeCount" }),
|
|
122
127
|
__metadata("design:type", Number)
|
|
123
128
|
], GeneratedImages.prototype, "likeCount", void 0);
|
|
129
|
+
__decorate([
|
|
130
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
131
|
+
(0, class_transformer_1.Expose)({ name: "motion" }),
|
|
132
|
+
__metadata("design:type", Boolean)
|
|
133
|
+
], GeneratedImages.prototype, "motion", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
136
|
+
(0, class_transformer_1.Expose)({ name: "motionMP4URL" }),
|
|
137
|
+
__metadata("design:type", String)
|
|
138
|
+
], GeneratedImages.prototype, "motionMp4URL", void 0);
|
|
139
|
+
__decorate([
|
|
140
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
141
|
+
(0, class_transformer_1.Expose)({ name: "motionModel" }),
|
|
142
|
+
__metadata("design:type", String)
|
|
143
|
+
], GeneratedImages.prototype, "motionModel", void 0);
|
|
144
|
+
__decorate([
|
|
145
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
146
|
+
(0, class_transformer_1.Expose)({ name: "motionStrength" }),
|
|
147
|
+
__metadata("design:type", Number)
|
|
148
|
+
], GeneratedImages.prototype, "motionStrength", void 0);
|
|
124
149
|
__decorate([
|
|
125
150
|
(0, utils_1.SpeakeasyMetadata)(),
|
|
126
151
|
(0, class_transformer_1.Expose)({ name: "nsfw" }),
|
|
@@ -27,7 +27,27 @@ export declare class GetGenerationsByUserIdGeneratedImageVariationGeneric extend
|
|
|
27
27
|
export declare class GetGenerationsByUserIdGeneratedImages extends SpeakeasyBase {
|
|
28
28
|
generatedImageVariationGenerics?: GetGenerationsByUserIdGeneratedImageVariationGeneric[];
|
|
29
29
|
id?: string;
|
|
30
|
+
/**
|
|
31
|
+
* If it is an image to video generation.
|
|
32
|
+
*/
|
|
33
|
+
imageToVideo?: boolean;
|
|
30
34
|
likeCount?: number;
|
|
35
|
+
/**
|
|
36
|
+
* If generation is of motion type.
|
|
37
|
+
*/
|
|
38
|
+
motion?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* The URL of the motion MP4.
|
|
41
|
+
*/
|
|
42
|
+
motionMp4URL?: string;
|
|
43
|
+
/**
|
|
44
|
+
* The name of the motion model.
|
|
45
|
+
*/
|
|
46
|
+
motionModel?: string;
|
|
47
|
+
/**
|
|
48
|
+
* The motion strength.
|
|
49
|
+
*/
|
|
50
|
+
motionStrength?: number;
|
|
31
51
|
nsfw?: boolean;
|
|
32
52
|
url?: string;
|
|
33
53
|
}
|
|
@@ -124,11 +124,36 @@ var GetGenerationsByUserIdGeneratedImages = /** @class */ (function (_super) {
|
|
|
124
124
|
(0, class_transformer_1.Expose)({ name: "id" }),
|
|
125
125
|
__metadata("design:type", String)
|
|
126
126
|
], GetGenerationsByUserIdGeneratedImages.prototype, "id", void 0);
|
|
127
|
+
__decorate([
|
|
128
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
129
|
+
(0, class_transformer_1.Expose)({ name: "imageToVideo" }),
|
|
130
|
+
__metadata("design:type", Boolean)
|
|
131
|
+
], GetGenerationsByUserIdGeneratedImages.prototype, "imageToVideo", void 0);
|
|
127
132
|
__decorate([
|
|
128
133
|
(0, utils_1.SpeakeasyMetadata)(),
|
|
129
134
|
(0, class_transformer_1.Expose)({ name: "likeCount" }),
|
|
130
135
|
__metadata("design:type", Number)
|
|
131
136
|
], GetGenerationsByUserIdGeneratedImages.prototype, "likeCount", void 0);
|
|
137
|
+
__decorate([
|
|
138
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
139
|
+
(0, class_transformer_1.Expose)({ name: "motion" }),
|
|
140
|
+
__metadata("design:type", Boolean)
|
|
141
|
+
], GetGenerationsByUserIdGeneratedImages.prototype, "motion", void 0);
|
|
142
|
+
__decorate([
|
|
143
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
144
|
+
(0, class_transformer_1.Expose)({ name: "motionMP4URL" }),
|
|
145
|
+
__metadata("design:type", String)
|
|
146
|
+
], GetGenerationsByUserIdGeneratedImages.prototype, "motionMp4URL", void 0);
|
|
147
|
+
__decorate([
|
|
148
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
149
|
+
(0, class_transformer_1.Expose)({ name: "motionModel" }),
|
|
150
|
+
__metadata("design:type", String)
|
|
151
|
+
], GetGenerationsByUserIdGeneratedImages.prototype, "motionModel", void 0);
|
|
152
|
+
__decorate([
|
|
153
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
154
|
+
(0, class_transformer_1.Expose)({ name: "motionStrength" }),
|
|
155
|
+
__metadata("design:type", Number)
|
|
156
|
+
], GetGenerationsByUserIdGeneratedImages.prototype, "motionStrength", void 0);
|
|
132
157
|
__decorate([
|
|
133
158
|
(0, utils_1.SpeakeasyMetadata)(),
|
|
134
159
|
(0, class_transformer_1.Expose)({ name: "nsfw" }),
|
|
@@ -18,6 +18,7 @@ export * from "./getmodelbyid";
|
|
|
18
18
|
export * from "./getplatformmodels";
|
|
19
19
|
export * from "./getuserself";
|
|
20
20
|
export * from "./getvariationbyid";
|
|
21
|
+
export * from "./postgenerationsmotionsvd";
|
|
21
22
|
export * from "./postgenerationstexture";
|
|
22
23
|
export * from "./postmodels3dupload";
|
|
23
24
|
export * from "./postvariationsunzoom";
|
|
@@ -37,6 +37,7 @@ __exportStar(require("./getmodelbyid"), exports);
|
|
|
37
37
|
__exportStar(require("./getplatformmodels"), exports);
|
|
38
38
|
__exportStar(require("./getuserself"), exports);
|
|
39
39
|
__exportStar(require("./getvariationbyid"), exports);
|
|
40
|
+
__exportStar(require("./postgenerationsmotionsvd"), exports);
|
|
40
41
|
__exportStar(require("./postgenerationstexture"), exports);
|
|
41
42
|
__exportStar(require("./postmodels3dupload"), exports);
|
|
42
43
|
__exportStar(require("./postvariationsunzoom"), exports);
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { SpeakeasyBase } from "../../../internal/utils";
|
|
2
|
+
import { AxiosResponse } from "axios";
|
|
3
|
+
/**
|
|
4
|
+
* Query parameters can also be provided in the request body as a JSON object
|
|
5
|
+
*/
|
|
6
|
+
export declare class PostGenerationsMotionSvdRequestBody extends SpeakeasyBase {
|
|
7
|
+
/**
|
|
8
|
+
* The ID of the image, supports generated images, variation images, and init images.
|
|
9
|
+
*/
|
|
10
|
+
imageId: string;
|
|
11
|
+
/**
|
|
12
|
+
* If it is an init image uploaded by the user. This image is uploaded from endpoint: Upload init image.
|
|
13
|
+
*/
|
|
14
|
+
isInitImage?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the generation is public or not
|
|
17
|
+
*/
|
|
18
|
+
isPublic?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* If it is a variation image.
|
|
21
|
+
*/
|
|
22
|
+
isVariation?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The motion strength.
|
|
25
|
+
*/
|
|
26
|
+
motionStrength?: number;
|
|
27
|
+
}
|
|
28
|
+
export declare class MotionSvdGenerationOutput extends SpeakeasyBase {
|
|
29
|
+
/**
|
|
30
|
+
* API credits cost, available for Production API users.
|
|
31
|
+
*/
|
|
32
|
+
apiCreditCost?: number;
|
|
33
|
+
generationId?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Responses for POST /generations-motion-svd
|
|
37
|
+
*/
|
|
38
|
+
export declare class PostGenerationsMotionSvdResponseBody extends SpeakeasyBase {
|
|
39
|
+
sdGenerationJob?: MotionSvdGenerationOutput;
|
|
40
|
+
}
|
|
41
|
+
export declare class PostGenerationsMotionSvdResponse extends SpeakeasyBase {
|
|
42
|
+
/**
|
|
43
|
+
* HTTP response content type for this operation
|
|
44
|
+
*/
|
|
45
|
+
contentType: string;
|
|
46
|
+
/**
|
|
47
|
+
* HTTP response status code for this operation
|
|
48
|
+
*/
|
|
49
|
+
statusCode: number;
|
|
50
|
+
/**
|
|
51
|
+
* Raw HTTP response; suitable for custom response parsing
|
|
52
|
+
*/
|
|
53
|
+
rawResponse: AxiosResponse;
|
|
54
|
+
/**
|
|
55
|
+
* Responses for POST /generations-motion-svd
|
|
56
|
+
*/
|
|
57
|
+
object?: PostGenerationsMotionSvdResponseBody;
|
|
58
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __extends = (this && this.__extends) || (function () {
|
|
6
|
+
var extendStatics = function (d, b) {
|
|
7
|
+
extendStatics = Object.setPrototypeOf ||
|
|
8
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
9
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
10
|
+
return extendStatics(d, b);
|
|
11
|
+
};
|
|
12
|
+
return function (d, b) {
|
|
13
|
+
if (typeof b !== "function" && b !== null)
|
|
14
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
15
|
+
extendStatics(d, b);
|
|
16
|
+
function __() { this.constructor = d; }
|
|
17
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
18
|
+
};
|
|
19
|
+
})();
|
|
20
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
21
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
22
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
23
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
24
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
25
|
+
};
|
|
26
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
27
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
28
|
+
};
|
|
29
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
+
exports.PostGenerationsMotionSvdResponse = exports.PostGenerationsMotionSvdResponseBody = exports.MotionSvdGenerationOutput = exports.PostGenerationsMotionSvdRequestBody = void 0;
|
|
31
|
+
var utils_1 = require("../../../internal/utils");
|
|
32
|
+
var class_transformer_1 = require("class-transformer");
|
|
33
|
+
/**
|
|
34
|
+
* Query parameters can also be provided in the request body as a JSON object
|
|
35
|
+
*/
|
|
36
|
+
var PostGenerationsMotionSvdRequestBody = /** @class */ (function (_super) {
|
|
37
|
+
__extends(PostGenerationsMotionSvdRequestBody, _super);
|
|
38
|
+
function PostGenerationsMotionSvdRequestBody() {
|
|
39
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
40
|
+
}
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
43
|
+
(0, class_transformer_1.Expose)({ name: "imageId" }),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], PostGenerationsMotionSvdRequestBody.prototype, "imageId", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
48
|
+
(0, class_transformer_1.Expose)({ name: "isInitImage" }),
|
|
49
|
+
__metadata("design:type", Boolean)
|
|
50
|
+
], PostGenerationsMotionSvdRequestBody.prototype, "isInitImage", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
53
|
+
(0, class_transformer_1.Expose)({ name: "isPublic" }),
|
|
54
|
+
__metadata("design:type", Boolean)
|
|
55
|
+
], PostGenerationsMotionSvdRequestBody.prototype, "isPublic", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
58
|
+
(0, class_transformer_1.Expose)({ name: "isVariation" }),
|
|
59
|
+
__metadata("design:type", Boolean)
|
|
60
|
+
], PostGenerationsMotionSvdRequestBody.prototype, "isVariation", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
63
|
+
(0, class_transformer_1.Expose)({ name: "motionStrength" }),
|
|
64
|
+
__metadata("design:type", Number)
|
|
65
|
+
], PostGenerationsMotionSvdRequestBody.prototype, "motionStrength", void 0);
|
|
66
|
+
return PostGenerationsMotionSvdRequestBody;
|
|
67
|
+
}(utils_1.SpeakeasyBase));
|
|
68
|
+
exports.PostGenerationsMotionSvdRequestBody = PostGenerationsMotionSvdRequestBody;
|
|
69
|
+
var MotionSvdGenerationOutput = /** @class */ (function (_super) {
|
|
70
|
+
__extends(MotionSvdGenerationOutput, _super);
|
|
71
|
+
function MotionSvdGenerationOutput() {
|
|
72
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
73
|
+
}
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
76
|
+
(0, class_transformer_1.Expose)({ name: "apiCreditCost" }),
|
|
77
|
+
__metadata("design:type", Number)
|
|
78
|
+
], MotionSvdGenerationOutput.prototype, "apiCreditCost", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
81
|
+
(0, class_transformer_1.Expose)({ name: "generationId" }),
|
|
82
|
+
__metadata("design:type", String)
|
|
83
|
+
], MotionSvdGenerationOutput.prototype, "generationId", void 0);
|
|
84
|
+
return MotionSvdGenerationOutput;
|
|
85
|
+
}(utils_1.SpeakeasyBase));
|
|
86
|
+
exports.MotionSvdGenerationOutput = MotionSvdGenerationOutput;
|
|
87
|
+
/**
|
|
88
|
+
* Responses for POST /generations-motion-svd
|
|
89
|
+
*/
|
|
90
|
+
var PostGenerationsMotionSvdResponseBody = /** @class */ (function (_super) {
|
|
91
|
+
__extends(PostGenerationsMotionSvdResponseBody, _super);
|
|
92
|
+
function PostGenerationsMotionSvdResponseBody() {
|
|
93
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
94
|
+
}
|
|
95
|
+
__decorate([
|
|
96
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
97
|
+
(0, class_transformer_1.Expose)({ name: "sdGenerationJob" }),
|
|
98
|
+
(0, class_transformer_1.Type)(function () { return MotionSvdGenerationOutput; }),
|
|
99
|
+
__metadata("design:type", MotionSvdGenerationOutput)
|
|
100
|
+
], PostGenerationsMotionSvdResponseBody.prototype, "sdGenerationJob", void 0);
|
|
101
|
+
return PostGenerationsMotionSvdResponseBody;
|
|
102
|
+
}(utils_1.SpeakeasyBase));
|
|
103
|
+
exports.PostGenerationsMotionSvdResponseBody = PostGenerationsMotionSvdResponseBody;
|
|
104
|
+
var PostGenerationsMotionSvdResponse = /** @class */ (function (_super) {
|
|
105
|
+
__extends(PostGenerationsMotionSvdResponse, _super);
|
|
106
|
+
function PostGenerationsMotionSvdResponse() {
|
|
107
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
108
|
+
}
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
111
|
+
__metadata("design:type", String)
|
|
112
|
+
], PostGenerationsMotionSvdResponse.prototype, "contentType", void 0);
|
|
113
|
+
__decorate([
|
|
114
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
115
|
+
__metadata("design:type", Number)
|
|
116
|
+
], PostGenerationsMotionSvdResponse.prototype, "statusCode", void 0);
|
|
117
|
+
__decorate([
|
|
118
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
119
|
+
__metadata("design:type", Object)
|
|
120
|
+
], PostGenerationsMotionSvdResponse.prototype, "rawResponse", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
(0, utils_1.SpeakeasyMetadata)(),
|
|
123
|
+
__metadata("design:type", PostGenerationsMotionSvdResponseBody)
|
|
124
|
+
], PostGenerationsMotionSvdResponse.prototype, "object", void 0);
|
|
125
|
+
return PostGenerationsMotionSvdResponse;
|
|
126
|
+
}(utils_1.SpeakeasyBase));
|
|
127
|
+
exports.PostGenerationsMotionSvdResponse = PostGenerationsMotionSvdResponse;
|
package/dist/sdk/sdk.js
CHANGED
|
@@ -52,9 +52,9 @@ var SDKConfiguration = /** @class */ (function () {
|
|
|
52
52
|
function SDKConfiguration(init) {
|
|
53
53
|
this.language = "typescript";
|
|
54
54
|
this.openapiDocVersion = "v1.0.0";
|
|
55
|
-
this.sdkVersion = "2.30.
|
|
56
|
-
this.genVersion = "2.
|
|
57
|
-
this.userAgent = "speakeasy-sdk/typescript 2.30.
|
|
55
|
+
this.sdkVersion = "2.30.1";
|
|
56
|
+
this.genVersion = "2.237.2";
|
|
57
|
+
this.userAgent = "speakeasy-sdk/typescript 2.30.1 2.237.2 v1.0.0 @leonardo-ai/sdk";
|
|
58
58
|
Object.assign(this, init);
|
|
59
59
|
}
|
|
60
60
|
return SDKConfiguration;
|
|
@@ -9,6 +9,11 @@ columns and relationships of "generated_images"
|
|
|
9
9
|
| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
10
10
|
| `generatedImageVariationGenerics` | [operations.GetGenerationByIdGeneratedImageVariationGeneric](../../../sdk/models/operations/getgenerationbyidgeneratedimagevariationgeneric.md)[] | :heavy_minus_sign: | N/A |
|
|
11
11
|
| `id` | *string* | :heavy_minus_sign: | N/A |
|
|
12
|
+
| `imageToVideo` | *boolean* | :heavy_minus_sign: | If it is an image to video generation. |
|
|
12
13
|
| `likeCount` | *number* | :heavy_minus_sign: | N/A |
|
|
14
|
+
| `motion` | *boolean* | :heavy_minus_sign: | If generation is of motion type. |
|
|
15
|
+
| `motionMp4URL` | *string* | :heavy_minus_sign: | The URL of the motion MP4. |
|
|
16
|
+
| `motionModel` | *string* | :heavy_minus_sign: | The name of the motion model. |
|
|
17
|
+
| `motionStrength` | *number* | :heavy_minus_sign: | The motion strength. |
|
|
13
18
|
| `nsfw` | *boolean* | :heavy_minus_sign: | N/A |
|
|
14
19
|
| `url` | *string* | :heavy_minus_sign: | N/A |
|
|
@@ -9,6 +9,11 @@ columns and relationships of "generated_images"
|
|
|
9
9
|
| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
10
10
|
| `generatedImageVariationGenerics` | [operations.GetGenerationsByUserIdGeneratedImageVariationGeneric](../../../sdk/models/operations/getgenerationsbyuseridgeneratedimagevariationgeneric.md)[] | :heavy_minus_sign: | N/A |
|
|
11
11
|
| `id` | *string* | :heavy_minus_sign: | N/A |
|
|
12
|
+
| `imageToVideo` | *boolean* | :heavy_minus_sign: | If it is an image to video generation. |
|
|
12
13
|
| `likeCount` | *number* | :heavy_minus_sign: | N/A |
|
|
14
|
+
| `motion` | *boolean* | :heavy_minus_sign: | If generation is of motion type. |
|
|
15
|
+
| `motionMp4URL` | *string* | :heavy_minus_sign: | The URL of the motion MP4. |
|
|
16
|
+
| `motionModel` | *string* | :heavy_minus_sign: | The name of the motion model. |
|
|
17
|
+
| `motionStrength` | *number* | :heavy_minus_sign: | The motion strength. |
|
|
13
18
|
| `nsfw` | *boolean* | :heavy_minus_sign: | N/A |
|
|
14
19
|
| `url` | *string* | :heavy_minus_sign: | N/A |
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# MotionSvdGenerationOutput
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Fields
|
|
5
|
+
|
|
6
|
+
| Field | Type | Required | Description |
|
|
7
|
+
| ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- | ----------------------------------------------------- |
|
|
8
|
+
| `apiCreditCost` | *number* | :heavy_minus_sign: | API credits cost, available for Production API users. |
|
|
9
|
+
| `generationId` | *string* | :heavy_minus_sign: | N/A |
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# PostGenerationsMotionSvdRequestBody
|
|
2
|
+
|
|
3
|
+
Query parameters can also be provided in the request body as a JSON object
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Fields
|
|
7
|
+
|
|
8
|
+
| Field | Type | Required | Description |
|
|
9
|
+
| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- |
|
|
10
|
+
| `imageId` | *string* | :heavy_check_mark: | The ID of the image, supports generated images, variation images, and init images. |
|
|
11
|
+
| `isInitImage` | *boolean* | :heavy_minus_sign: | If it is an init image uploaded by the user. This image is uploaded from endpoint: Upload init image. |
|
|
12
|
+
| `isPublic` | *boolean* | :heavy_minus_sign: | Whether the generation is public or not |
|
|
13
|
+
| `isVariation` | *boolean* | :heavy_minus_sign: | If it is a variation image. |
|
|
14
|
+
| `motionStrength` | *number* | :heavy_minus_sign: | The motion strength. |
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# PostGenerationsMotionSvdResponse
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Fields
|
|
5
|
+
|
|
6
|
+
| Field | Type | Required | Description |
|
|
7
|
+
| ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- |
|
|
8
|
+
| `contentType` | *string* | :heavy_check_mark: | HTTP response content type for this operation |
|
|
9
|
+
| `statusCode` | *number* | :heavy_check_mark: | HTTP response status code for this operation |
|
|
10
|
+
| `rawResponse` | [AxiosResponse](https://axios-http.com/docs/res_schema) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing |
|
|
11
|
+
| `object` | [operations.PostGenerationsMotionSvdResponseBody](../../../sdk/models/operations/postgenerationsmotionsvdresponsebody.md) | :heavy_minus_sign: | Responses for POST /generations-motion-svd |
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# PostGenerationsMotionSvdResponseBody
|
|
2
|
+
|
|
3
|
+
Responses for POST /generations-motion-svd
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Fields
|
|
7
|
+
|
|
8
|
+
| Field | Type | Required | Description |
|
|
9
|
+
| --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
|
|
10
|
+
| `sdGenerationJob` | [operations.MotionSvdGenerationOutput](../../../sdk/models/operations/motionsvdgenerationoutput.md) | :heavy_minus_sign: | N/A |
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* [deleteGenerationsTextureId](#deletegenerationstextureid) - Delete Texture Generation by ID
|
|
9
9
|
* [getGenerationById](#getgenerationbyid) - Get a Single Generation
|
|
10
10
|
* [getGenerationsByUserId](#getgenerationsbyuserid) - Get generations by user ID
|
|
11
|
+
* [postGenerationsMotionSvd](#postgenerationsmotionsvd) - Create SVD Motion Generation
|
|
11
12
|
* [postGenerationsTexture](#postgenerationstexture) - Create Texture Generation
|
|
12
13
|
|
|
13
14
|
## createGeneration
|
|
@@ -238,6 +239,49 @@ run();
|
|
|
238
239
|
| --------------- | --------------- | --------------- |
|
|
239
240
|
| errors.SDKError | 4xx-5xx | */* |
|
|
240
241
|
|
|
242
|
+
## postGenerationsMotionSvd
|
|
243
|
+
|
|
244
|
+
This endpoint will generate a SVD motion generation.
|
|
245
|
+
|
|
246
|
+
### Example Usage
|
|
247
|
+
|
|
248
|
+
```typescript
|
|
249
|
+
import { Leonardo } from "@leonardo-ai/sdk";
|
|
250
|
+
|
|
251
|
+
async function run() {
|
|
252
|
+
const sdk = new Leonardo({
|
|
253
|
+
bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
|
|
254
|
+
});
|
|
255
|
+
|
|
256
|
+
const res = await sdk.generation.postGenerationsMotionSvd({
|
|
257
|
+
imageId: "string",
|
|
258
|
+
});
|
|
259
|
+
|
|
260
|
+
if (res.statusCode == 200) {
|
|
261
|
+
// handle response
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
run();
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
### Parameters
|
|
269
|
+
|
|
270
|
+
| Parameter | Type | Required | Description |
|
|
271
|
+
| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
|
|
272
|
+
| `request` | [operations.PostGenerationsMotionSvdRequestBody](../../sdk/models/operations/postgenerationsmotionsvdrequestbody.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
273
|
+
| `config` | [AxiosRequestConfig](https://axios-http.com/docs/req_config) | :heavy_minus_sign: | Available config options for making requests. |
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
### Response
|
|
277
|
+
|
|
278
|
+
**Promise<[operations.PostGenerationsMotionSvdResponse](../../sdk/models/operations/postgenerationsmotionsvdresponse.md)>**
|
|
279
|
+
### Errors
|
|
280
|
+
|
|
281
|
+
| Error Object | Status Code | Content Type |
|
|
282
|
+
| --------------- | --------------- | --------------- |
|
|
283
|
+
| errors.SDKError | 4xx-5xx | */* |
|
|
284
|
+
|
|
241
285
|
## postGenerationsTexture
|
|
242
286
|
|
|
243
287
|
This endpoint will generate a texture generation.
|