@runwayml/sdk 4.30.0 → 4.31.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/CHANGELOG.md +11 -0
- package/client.d.mts +15 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +15 -0
- package/client.d.ts.map +1 -1
- package/client.js +15 -0
- package/client.js.map +1 -1
- package/client.mjs +15 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/generate/generate.d.mts +4 -0
- package/resources/generate/generate.d.mts.map +1 -1
- package/resources/generate/generate.d.ts +4 -0
- package/resources/generate/generate.d.ts.map +1 -1
- package/resources/generate/generate.js +4 -0
- package/resources/generate/generate.js.map +1 -1
- package/resources/generate/generate.mjs +4 -0
- package/resources/generate/generate.mjs.map +1 -1
- package/resources/generate/index.d.mts +1 -0
- package/resources/generate/index.d.mts.map +1 -1
- package/resources/generate/index.d.ts +1 -0
- package/resources/generate/index.d.ts.map +1 -1
- package/resources/generate/index.js +3 -1
- package/resources/generate/index.js.map +1 -1
- package/resources/generate/index.mjs +1 -0
- package/resources/generate/index.mjs.map +1 -1
- package/resources/generate/mesh.d.mts +162 -0
- package/resources/generate/mesh.d.mts.map +1 -0
- package/resources/generate/mesh.d.ts +162 -0
- package/resources/generate/mesh.d.ts.map +1 -0
- package/resources/generate/mesh.js +16 -0
- package/resources/generate/mesh.js.map +1 -0
- package/resources/generate/mesh.mjs +12 -0
- package/resources/generate/mesh.mjs.map +1 -0
- package/resources/image-to-mesh.d.mts +128 -0
- package/resources/image-to-mesh.d.mts.map +1 -0
- package/resources/image-to-mesh.d.ts +128 -0
- package/resources/image-to-mesh.d.ts.map +1 -0
- package/resources/image-to-mesh.js +27 -0
- package/resources/image-to-mesh.js.map +1 -0
- package/resources/image-to-mesh.mjs +23 -0
- package/resources/image-to-mesh.mjs.map +1 -0
- package/resources/index.d.mts +3 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +7 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +3 -0
- package/resources/index.mjs.map +1 -1
- package/resources/model-catalog.d.mts +139 -0
- package/resources/model-catalog.d.mts.map +1 -0
- package/resources/model-catalog.d.ts +139 -0
- package/resources/model-catalog.d.ts.map +1 -0
- package/resources/model-catalog.js +28 -0
- package/resources/model-catalog.js.map +1 -0
- package/resources/model-catalog.mjs +24 -0
- package/resources/model-catalog.mjs.map +1 -0
- package/resources/text-to-mesh.d.mts +83 -0
- package/resources/text-to-mesh.d.mts.map +1 -0
- package/resources/text-to-mesh.d.ts +83 -0
- package/resources/text-to-mesh.d.ts.map +1 -0
- package/resources/text-to-mesh.js +19 -0
- package/resources/text-to-mesh.js.map +1 -0
- package/resources/text-to-mesh.mjs +15 -0
- package/resources/text-to-mesh.mjs.map +1 -0
- package/src/client.ts +29 -0
- package/src/resources/generate/generate.ts +10 -0
- package/src/resources/generate/index.ts +1 -0
- package/src/resources/generate/mesh.ts +214 -0
- package/src/resources/image-to-mesh.ts +176 -0
- package/src/resources/index.ts +3 -0
- package/src/resources/model-catalog.ts +161 -0
- package/src/resources/text-to-mesh.ts +118 -0
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { APIPromise } from "../core/api-promise.js";
|
|
3
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
4
|
+
export declare class ModelCatalog extends APIResource {
|
|
5
|
+
/**
|
|
6
|
+
* List the endpoints and `model` values the organization associated with the API
|
|
7
|
+
* key has access to, grouped by model. An entry is `available` when model
|
|
8
|
+
* admission, the check a request makes on its `model` value before reading the
|
|
9
|
+
* body, accepts that value on that endpoint for the organization now, and `gated`
|
|
10
|
+
* with a reason when admission refuses it for a workspace policy or because the
|
|
11
|
+
* task it runs has been retired. A `model` value admission refuses for any other
|
|
12
|
+
* reason, such as no access or a release that has not reached the organization,
|
|
13
|
+
* has no entry. Deprecated and retired `model` values have no entry, and a request
|
|
14
|
+
* for a retired one is refused with a sunset error. A `model` value not yet
|
|
15
|
+
* announced has an entry only when admission accepts it, listed in
|
|
16
|
+
* `ungroupedEntries` and never `gated`. Checks that depend on the caller, the
|
|
17
|
+
* request or the moment run afterwards, at submission, and refuse with their own
|
|
18
|
+
* errors: the caller's region, the organization's country lock, daily task limits,
|
|
19
|
+
* credits, and provider outages.
|
|
20
|
+
*/
|
|
21
|
+
list(options?: RequestOptions): APIPromise<ModelCatalogListResponse>;
|
|
22
|
+
}
|
|
23
|
+
export interface ModelCatalogListResponse {
|
|
24
|
+
/**
|
|
25
|
+
* The models the organization has access to, with an entry per endpoint and
|
|
26
|
+
* `model` value. A `model` value admission refuses on an endpoint for a reason
|
|
27
|
+
* other than a workspace policy or a retired task, such as no access, has no
|
|
28
|
+
* entry. Deprecated and retired `model` values have no entry, and neither does a
|
|
29
|
+
* `model` value not yet announced that admission refuses.
|
|
30
|
+
*/
|
|
31
|
+
models: Array<ModelCatalogListResponse.Model>;
|
|
32
|
+
schemaVersion: 1;
|
|
33
|
+
/**
|
|
34
|
+
* Entries for `model` values that belong to no model listed in `models`, including
|
|
35
|
+
* every `model` value not yet announced.
|
|
36
|
+
*/
|
|
37
|
+
ungroupedEntries: Array<ModelCatalogListResponse.UngroupedEntry>;
|
|
38
|
+
}
|
|
39
|
+
export declare namespace ModelCatalogListResponse {
|
|
40
|
+
/**
|
|
41
|
+
* A model, with the endpoints and `model` values that request it.
|
|
42
|
+
*/
|
|
43
|
+
interface Model {
|
|
44
|
+
/**
|
|
45
|
+
* The model's catalog identifier.
|
|
46
|
+
*/
|
|
47
|
+
id: string;
|
|
48
|
+
/**
|
|
49
|
+
* Each endpoint and `model` value for this model, each answered on its own.
|
|
50
|
+
*/
|
|
51
|
+
entries: Array<Model.Entry>;
|
|
52
|
+
/**
|
|
53
|
+
* The kind of media the model produces.
|
|
54
|
+
*/
|
|
55
|
+
medium: 'image' | 'video' | 'audio' | 'mesh';
|
|
56
|
+
/**
|
|
57
|
+
* The model's display name.
|
|
58
|
+
*/
|
|
59
|
+
name: string;
|
|
60
|
+
}
|
|
61
|
+
namespace Model {
|
|
62
|
+
/**
|
|
63
|
+
* A `model` value one endpoint accepts, and whether the organization may request
|
|
64
|
+
* it there.
|
|
65
|
+
*/
|
|
66
|
+
interface Entry {
|
|
67
|
+
/**
|
|
68
|
+
* The endpoint path that accepts this `model` value.
|
|
69
|
+
*/
|
|
70
|
+
path: string;
|
|
71
|
+
/**
|
|
72
|
+
* The value to send as `model` in a request to `path`.
|
|
73
|
+
*/
|
|
74
|
+
requestName: string;
|
|
75
|
+
/**
|
|
76
|
+
* `available` when model admission accepts this `model` value on this endpoint for
|
|
77
|
+
* the organization now. `gated` when admission refuses it for a workspace policy
|
|
78
|
+
* or because the task it runs has been retired, explained in `reason`; a `model`
|
|
79
|
+
* value not yet announced is never `gated`. Admission does not cover the checks a
|
|
80
|
+
* request meets later at submission, which refuse with their own errors.
|
|
81
|
+
*/
|
|
82
|
+
state: 'available' | 'gated';
|
|
83
|
+
/**
|
|
84
|
+
* Why a request for a gated model would be refused.
|
|
85
|
+
*/
|
|
86
|
+
reason?: string;
|
|
87
|
+
/**
|
|
88
|
+
* A stable code for `reason` on a gated entry, for clients that write their own
|
|
89
|
+
* message. Known codes: `sunset` when admission refuses because the task it runs
|
|
90
|
+
* has been retired; `admin_disabled`, `runway_disabled`, `not_purchased` or
|
|
91
|
+
* `region_restricted` when a workspace policy refuses it (`runway_disabled` when
|
|
92
|
+
* Runway turned the model off for the workspace and its admins cannot turn it on).
|
|
93
|
+
* New codes may be added; treat a code you do not recognize as absent and show
|
|
94
|
+
* `reason`.
|
|
95
|
+
*/
|
|
96
|
+
reasonCode?: string;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* A `model` value one endpoint accepts, and whether the organization may request
|
|
101
|
+
* it there.
|
|
102
|
+
*/
|
|
103
|
+
interface UngroupedEntry {
|
|
104
|
+
/**
|
|
105
|
+
* The endpoint path that accepts this `model` value.
|
|
106
|
+
*/
|
|
107
|
+
path: string;
|
|
108
|
+
/**
|
|
109
|
+
* The value to send as `model` in a request to `path`.
|
|
110
|
+
*/
|
|
111
|
+
requestName: string;
|
|
112
|
+
/**
|
|
113
|
+
* `available` when model admission accepts this `model` value on this endpoint for
|
|
114
|
+
* the organization now. `gated` when admission refuses it for a workspace policy
|
|
115
|
+
* or because the task it runs has been retired, explained in `reason`; a `model`
|
|
116
|
+
* value not yet announced is never `gated`. Admission does not cover the checks a
|
|
117
|
+
* request meets later at submission, which refuse with their own errors.
|
|
118
|
+
*/
|
|
119
|
+
state: 'available' | 'gated';
|
|
120
|
+
/**
|
|
121
|
+
* Why a request for a gated model would be refused.
|
|
122
|
+
*/
|
|
123
|
+
reason?: string;
|
|
124
|
+
/**
|
|
125
|
+
* A stable code for `reason` on a gated entry, for clients that write their own
|
|
126
|
+
* message. Known codes: `sunset` when admission refuses because the task it runs
|
|
127
|
+
* has been retired; `admin_disabled`, `runway_disabled`, `not_purchased` or
|
|
128
|
+
* `region_restricted` when a workspace policy refuses it (`runway_disabled` when
|
|
129
|
+
* Runway turned the model off for the workspace and its admins cannot turn it on).
|
|
130
|
+
* New codes may be added; treat a code you do not recognize as absent and show
|
|
131
|
+
* `reason`.
|
|
132
|
+
*/
|
|
133
|
+
reasonCode?: string;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
export declare namespace ModelCatalog {
|
|
137
|
+
export { type ModelCatalogListResponse as ModelCatalogListResponse };
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=model-catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-catalog.d.ts","sourceRoot":"","sources":["../src/resources/model-catalog.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;CAGrE;AAED,MAAM,WAAW,wBAAwB;IACvC;;;;;;OAMG;IACH,MAAM,EAAE,KAAK,CAAC,wBAAwB,CAAC,KAAK,CAAC,CAAC;IAE9C,aAAa,EAAE,CAAC,CAAC;IAEjB;;;OAGG;IACH,gBAAgB,EAAE,KAAK,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC;CAClE;AAED,yBAAiB,wBAAwB,CAAC;IACxC;;OAEG;IACH,UAAiB,KAAK;QACpB;;WAEG;QACH,EAAE,EAAE,MAAM,CAAC;QAEX;;WAEG;QACH,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAE5B;;WAEG;QACH,MAAM,EAAE,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;QAE7C;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;KACd;IAED,UAAiB,KAAK,CAAC;QACrB;;;WAGG;QACH,UAAiB,KAAK;YACpB;;eAEG;YACH,IAAI,EAAE,MAAM,CAAC;YAEb;;eAEG;YACH,WAAW,EAAE,MAAM,CAAC;YAEpB;;;;;;eAMG;YACH,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC;YAE7B;;eAEG;YACH,MAAM,CAAC,EAAE,MAAM,CAAC;YAEhB;;;;;;;;eAQG;YACH,UAAU,CAAC,EAAE,MAAM,CAAC;SACrB;KACF;IAED;;;OAGG;IACH,UAAiB,cAAc;QAC7B;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,WAAW,EAAE,MAAM,CAAC;QAEpB;;;;;;WAMG;QACH,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC;QAE7B;;WAEG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAEhB;;;;;;;;WAQG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB;CACF;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EAAE,KAAK,wBAAwB,IAAI,wBAAwB,EAAE,CAAC;CACtE"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ModelCatalog = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
class ModelCatalog extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* List the endpoints and `model` values the organization associated with the API
|
|
9
|
+
* key has access to, grouped by model. An entry is `available` when model
|
|
10
|
+
* admission, the check a request makes on its `model` value before reading the
|
|
11
|
+
* body, accepts that value on that endpoint for the organization now, and `gated`
|
|
12
|
+
* with a reason when admission refuses it for a workspace policy or because the
|
|
13
|
+
* task it runs has been retired. A `model` value admission refuses for any other
|
|
14
|
+
* reason, such as no access or a release that has not reached the organization,
|
|
15
|
+
* has no entry. Deprecated and retired `model` values have no entry, and a request
|
|
16
|
+
* for a retired one is refused with a sunset error. A `model` value not yet
|
|
17
|
+
* announced has an entry only when admission accepts it, listed in
|
|
18
|
+
* `ungroupedEntries` and never `gated`. Checks that depend on the caller, the
|
|
19
|
+
* request or the moment run afterwards, at submission, and refuse with their own
|
|
20
|
+
* errors: the caller's region, the organization's country lock, daily task limits,
|
|
21
|
+
* credits, and provider outages.
|
|
22
|
+
*/
|
|
23
|
+
list(options) {
|
|
24
|
+
return this._client.get('/v1/model_catalog', options);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.ModelCatalog = ModelCatalog;
|
|
28
|
+
//# sourceMappingURL=model-catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-catalog.js","sourceRoot":"","sources":["../src/resources/model-catalog.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAI/C,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;CACF;AApBD,oCAoBC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
export class ModelCatalog extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* List the endpoints and `model` values the organization associated with the API
|
|
6
|
+
* key has access to, grouped by model. An entry is `available` when model
|
|
7
|
+
* admission, the check a request makes on its `model` value before reading the
|
|
8
|
+
* body, accepts that value on that endpoint for the organization now, and `gated`
|
|
9
|
+
* with a reason when admission refuses it for a workspace policy or because the
|
|
10
|
+
* task it runs has been retired. A `model` value admission refuses for any other
|
|
11
|
+
* reason, such as no access or a release that has not reached the organization,
|
|
12
|
+
* has no entry. Deprecated and retired `model` values have no entry, and a request
|
|
13
|
+
* for a retired one is refused with a sunset error. A `model` value not yet
|
|
14
|
+
* announced has an entry only when admission accepts it, listed in
|
|
15
|
+
* `ungroupedEntries` and never `gated`. Checks that depend on the caller, the
|
|
16
|
+
* request or the moment run afterwards, at submission, and refuse with their own
|
|
17
|
+
* errors: the caller's region, the organization's country lock, daily task limits,
|
|
18
|
+
* credits, and provider outages.
|
|
19
|
+
*/
|
|
20
|
+
list(options) {
|
|
21
|
+
return this._client.get('/v1/model_catalog', options);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=model-catalog.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-catalog.mjs","sourceRoot":"","sources":["../src/resources/model-catalog.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;;;;;;;;;;;;;OAeG;IACH,IAAI,CAAC,OAAwB;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAC;IACxD,CAAC;CACF"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.mjs";
|
|
2
|
+
import { RequestOptions } from "../internal/request-options.mjs";
|
|
3
|
+
import { APIPromiseWithAwaitableTask } from "../lib/polling.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* These endpoints all kick off tasks to create generations.
|
|
6
|
+
*/
|
|
7
|
+
export declare class TextToMesh extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Generate a GLB mesh from a text description.
|
|
10
|
+
*/
|
|
11
|
+
create(body: TextToMeshCreateParams, options?: RequestOptions): APIPromiseWithAwaitableTask<TextToMeshCreateResponse>;
|
|
12
|
+
}
|
|
13
|
+
export interface TextToMeshCreateResponse {
|
|
14
|
+
/**
|
|
15
|
+
* The ID of the task that was created. Use this to retrieve the task later.
|
|
16
|
+
*/
|
|
17
|
+
id: string;
|
|
18
|
+
/**
|
|
19
|
+
* The maximum credits this task may charge. The final amount may be lower after
|
|
20
|
+
* the task completes.
|
|
21
|
+
*/
|
|
22
|
+
estimatedCost: TextToMeshCreateResponse.EstimatedCost;
|
|
23
|
+
}
|
|
24
|
+
export declare namespace TextToMeshCreateResponse {
|
|
25
|
+
/**
|
|
26
|
+
* The maximum credits this task may charge. The final amount may be lower after
|
|
27
|
+
* the task completes.
|
|
28
|
+
*/
|
|
29
|
+
interface EstimatedCost {
|
|
30
|
+
/**
|
|
31
|
+
* Estimated cost of the generation in credits.
|
|
32
|
+
*/
|
|
33
|
+
credits: number;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export type TextToMeshCreateParams = TextToMeshCreateParams.Tripo3dH3_1 | TextToMeshCreateParams.Hunyuan3d3_1Pro;
|
|
37
|
+
export declare namespace TextToMeshCreateParams {
|
|
38
|
+
interface Tripo3dH3_1 {
|
|
39
|
+
model: 'tripo3d_h3_1';
|
|
40
|
+
promptText: string;
|
|
41
|
+
/**
|
|
42
|
+
* Estimate the physical size of the object.
|
|
43
|
+
*/
|
|
44
|
+
autoSize?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* The maximum number of faces in the generated mesh.
|
|
47
|
+
*/
|
|
48
|
+
faceLimit?: number;
|
|
49
|
+
geometryQuality?: 'standard' | 'detailed';
|
|
50
|
+
imageSeed?: number;
|
|
51
|
+
modelSeed?: number;
|
|
52
|
+
/**
|
|
53
|
+
* Generate physically based materials for the mesh.
|
|
54
|
+
*/
|
|
55
|
+
pbr?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Generate textures for the mesh. PBR also enables textures.
|
|
58
|
+
*/
|
|
59
|
+
texture?: boolean;
|
|
60
|
+
textureQuality?: 'standard' | 'detailed';
|
|
61
|
+
textureSeed?: number;
|
|
62
|
+
}
|
|
63
|
+
interface Hunyuan3d3_1Pro {
|
|
64
|
+
model: 'hunyuan_3d_3_1_pro';
|
|
65
|
+
promptText: string;
|
|
66
|
+
/**
|
|
67
|
+
* Generate physically based materials for a textured model.
|
|
68
|
+
*/
|
|
69
|
+
enablePbr?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* The target number of faces in the generated mesh.
|
|
72
|
+
*/
|
|
73
|
+
faceCount?: number;
|
|
74
|
+
/**
|
|
75
|
+
* Generate a textured model or geometry without textures.
|
|
76
|
+
*/
|
|
77
|
+
generateType?: 'Normal' | 'Geometry';
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
export declare namespace TextToMesh {
|
|
81
|
+
export { type TextToMeshCreateResponse as TextToMeshCreateResponse, type TextToMeshCreateParams as TextToMeshCreateParams, };
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=text-to-mesh.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-to-mesh.d.mts","sourceRoot":"","sources":["../src/resources/text-to-mesh.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAC/C,OAAO,EAAE,cAAc,EAAE,wCAAoC;AAC7D,OAAO,EAAE,2BAA2B,EAA0B,2BAAuB;AAErF;;GAEG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACzC;;OAEG;IACH,MAAM,CACJ,IAAI,EAAE,sBAAsB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,2BAA2B,CAAC,wBAAwB,CAAC;CAKzD;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,aAAa,EAAE,wBAAwB,CAAC,aAAa,CAAC;CACvD;AAED,yBAAiB,wBAAwB,CAAC;IACxC;;;OAGG;IACH,UAAiB,aAAa;QAC5B;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;KACjB;CACF;AAED,MAAM,MAAM,sBAAsB,GAC9B,sBAAsB,CAAC,WAAW,GAClC,sBAAsB,CAAC,eAAe,CAAC;AAE3C,MAAM,CAAC,OAAO,WAAW,sBAAsB,CAAC;IAC9C,UAAiB,WAAW;QAC1B,KAAK,EAAE,cAAc,CAAC;QAEtB,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,QAAQ,CAAC,EAAE,OAAO,CAAC;QAEnB;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB,eAAe,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;QAE1C,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,GAAG,CAAC,EAAE,OAAO,CAAC;QAEd;;WAEG;QACH,OAAO,CAAC,EAAE,OAAO,CAAC;QAElB,cAAc,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;QAEzC,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB;IAED,UAAiB,eAAe;QAC9B,KAAK,EAAE,oBAAoB,CAAC;QAE5B,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,SAAS,CAAC,EAAE,OAAO,CAAC;QAEpB;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,YAAY,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;KACtC;CACF;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { APIResource } from "../core/resource.js";
|
|
2
|
+
import { RequestOptions } from "../internal/request-options.js";
|
|
3
|
+
import { APIPromiseWithAwaitableTask } from "../lib/polling.js";
|
|
4
|
+
/**
|
|
5
|
+
* These endpoints all kick off tasks to create generations.
|
|
6
|
+
*/
|
|
7
|
+
export declare class TextToMesh extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Generate a GLB mesh from a text description.
|
|
10
|
+
*/
|
|
11
|
+
create(body: TextToMeshCreateParams, options?: RequestOptions): APIPromiseWithAwaitableTask<TextToMeshCreateResponse>;
|
|
12
|
+
}
|
|
13
|
+
export interface TextToMeshCreateResponse {
|
|
14
|
+
/**
|
|
15
|
+
* The ID of the task that was created. Use this to retrieve the task later.
|
|
16
|
+
*/
|
|
17
|
+
id: string;
|
|
18
|
+
/**
|
|
19
|
+
* The maximum credits this task may charge. The final amount may be lower after
|
|
20
|
+
* the task completes.
|
|
21
|
+
*/
|
|
22
|
+
estimatedCost: TextToMeshCreateResponse.EstimatedCost;
|
|
23
|
+
}
|
|
24
|
+
export declare namespace TextToMeshCreateResponse {
|
|
25
|
+
/**
|
|
26
|
+
* The maximum credits this task may charge. The final amount may be lower after
|
|
27
|
+
* the task completes.
|
|
28
|
+
*/
|
|
29
|
+
interface EstimatedCost {
|
|
30
|
+
/**
|
|
31
|
+
* Estimated cost of the generation in credits.
|
|
32
|
+
*/
|
|
33
|
+
credits: number;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
export type TextToMeshCreateParams = TextToMeshCreateParams.Tripo3dH3_1 | TextToMeshCreateParams.Hunyuan3d3_1Pro;
|
|
37
|
+
export declare namespace TextToMeshCreateParams {
|
|
38
|
+
interface Tripo3dH3_1 {
|
|
39
|
+
model: 'tripo3d_h3_1';
|
|
40
|
+
promptText: string;
|
|
41
|
+
/**
|
|
42
|
+
* Estimate the physical size of the object.
|
|
43
|
+
*/
|
|
44
|
+
autoSize?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* The maximum number of faces in the generated mesh.
|
|
47
|
+
*/
|
|
48
|
+
faceLimit?: number;
|
|
49
|
+
geometryQuality?: 'standard' | 'detailed';
|
|
50
|
+
imageSeed?: number;
|
|
51
|
+
modelSeed?: number;
|
|
52
|
+
/**
|
|
53
|
+
* Generate physically based materials for the mesh.
|
|
54
|
+
*/
|
|
55
|
+
pbr?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Generate textures for the mesh. PBR also enables textures.
|
|
58
|
+
*/
|
|
59
|
+
texture?: boolean;
|
|
60
|
+
textureQuality?: 'standard' | 'detailed';
|
|
61
|
+
textureSeed?: number;
|
|
62
|
+
}
|
|
63
|
+
interface Hunyuan3d3_1Pro {
|
|
64
|
+
model: 'hunyuan_3d_3_1_pro';
|
|
65
|
+
promptText: string;
|
|
66
|
+
/**
|
|
67
|
+
* Generate physically based materials for a textured model.
|
|
68
|
+
*/
|
|
69
|
+
enablePbr?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* The target number of faces in the generated mesh.
|
|
72
|
+
*/
|
|
73
|
+
faceCount?: number;
|
|
74
|
+
/**
|
|
75
|
+
* Generate a textured model or geometry without textures.
|
|
76
|
+
*/
|
|
77
|
+
generateType?: 'Normal' | 'Geometry';
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
export declare namespace TextToMesh {
|
|
81
|
+
export { type TextToMeshCreateResponse as TextToMeshCreateResponse, type TextToMeshCreateParams as TextToMeshCreateParams, };
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=text-to-mesh.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-to-mesh.d.ts","sourceRoot":"","sources":["../src/resources/text-to-mesh.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAC7D,OAAO,EAAE,2BAA2B,EAA0B,0BAAuB;AAErF;;GAEG;AACH,qBAAa,UAAW,SAAQ,WAAW;IACzC;;OAEG;IACH,MAAM,CACJ,IAAI,EAAE,sBAAsB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,2BAA2B,CAAC,wBAAwB,CAAC;CAKzD;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,aAAa,EAAE,wBAAwB,CAAC,aAAa,CAAC;CACvD;AAED,yBAAiB,wBAAwB,CAAC;IACxC;;;OAGG;IACH,UAAiB,aAAa;QAC5B;;WAEG;QACH,OAAO,EAAE,MAAM,CAAC;KACjB;CACF;AAED,MAAM,MAAM,sBAAsB,GAC9B,sBAAsB,CAAC,WAAW,GAClC,sBAAsB,CAAC,eAAe,CAAC;AAE3C,MAAM,CAAC,OAAO,WAAW,sBAAsB,CAAC;IAC9C,UAAiB,WAAW;QAC1B,KAAK,EAAE,cAAc,CAAC;QAEtB,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,QAAQ,CAAC,EAAE,OAAO,CAAC;QAEnB;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB,eAAe,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;QAE1C,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,GAAG,CAAC,EAAE,OAAO,CAAC;QAEd;;WAEG;QACH,OAAO,CAAC,EAAE,OAAO,CAAC;QAElB,cAAc,CAAC,EAAE,UAAU,GAAG,UAAU,CAAC;QAEzC,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB;IAED,UAAiB,eAAe;QAC9B,KAAK,EAAE,oBAAoB,CAAC;QAE5B,UAAU,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,SAAS,CAAC,EAAE,OAAO,CAAC;QAEpB;;WAEG;QACH,SAAS,CAAC,EAAE,MAAM,CAAC;QAEnB;;WAEG;QACH,YAAY,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;KACtC;CACF;AAED,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.TextToMesh = void 0;
|
|
5
|
+
const resource_1 = require("../core/resource.js");
|
|
6
|
+
const polling_1 = require("../lib/polling.js");
|
|
7
|
+
/**
|
|
8
|
+
* These endpoints all kick off tasks to create generations.
|
|
9
|
+
*/
|
|
10
|
+
class TextToMesh extends resource_1.APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Generate a GLB mesh from a text description.
|
|
13
|
+
*/
|
|
14
|
+
create(body, options) {
|
|
15
|
+
return (0, polling_1.wrapAsWaitableResource)(this._client)(this._client.post('/v1/text_to_mesh', { body, ...options }));
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
exports.TextToMesh = TextToMesh;
|
|
19
|
+
//# sourceMappingURL=text-to-mesh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-to-mesh.js","sourceRoot":"","sources":["../src/resources/text-to-mesh.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,kDAA+C;AAE/C,+CAAqF;AAErF;;GAEG;AACH,MAAa,UAAW,SAAQ,sBAAW;IACzC;;OAEG;IACH,MAAM,CACJ,IAA4B,EAC5B,OAAwB;QAExB,OAAO,IAAA,gCAAsB,EAA2B,IAAI,CAAC,OAAO,CAAC,CACnE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAC5D,CAAC;IACJ,CAAC;CACF;AAZD,gCAYC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../core/resource.mjs";
|
|
3
|
+
import { wrapAsWaitableResource } from "../lib/polling.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* These endpoints all kick off tasks to create generations.
|
|
6
|
+
*/
|
|
7
|
+
export class TextToMesh extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Generate a GLB mesh from a text description.
|
|
10
|
+
*/
|
|
11
|
+
create(body, options) {
|
|
12
|
+
return wrapAsWaitableResource(this._client)(this._client.post('/v1/text_to_mesh', { body, ...options }));
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=text-to-mesh.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-to-mesh.mjs","sourceRoot":"","sources":["../src/resources/text-to-mesh.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAE/C,OAAO,EAA+B,sBAAsB,EAAE,2BAAuB;AAErF;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,WAAW;IACzC;;OAEG;IACH,MAAM,CACJ,IAA4B,EAC5B,OAAwB;QAExB,OAAO,sBAAsB,CAA2B,IAAI,CAAC,OAAO,CAAC,CACnE,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kBAAkB,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAC5D,CAAC;IACJ,CAAC;CACF"}
|
package/src/client.ts
CHANGED
|
@@ -55,6 +55,7 @@ import {
|
|
|
55
55
|
DocumentUpdateParams,
|
|
56
56
|
Documents,
|
|
57
57
|
} from './resources/documents';
|
|
58
|
+
import { ImageToMesh, ImageToMeshCreateParams, ImageToMeshCreateResponse } from './resources/image-to-mesh';
|
|
58
59
|
import {
|
|
59
60
|
ImageToVector,
|
|
60
61
|
ImageToVectorCreateParams,
|
|
@@ -70,6 +71,7 @@ import {
|
|
|
70
71
|
ImageUpscaleCreateParams,
|
|
71
72
|
ImageUpscaleCreateResponse,
|
|
72
73
|
} from './resources/image-upscale';
|
|
74
|
+
import { ModelCatalog, ModelCatalogListResponse } from './resources/model-catalog';
|
|
73
75
|
import {
|
|
74
76
|
DeprecatedLivekit,
|
|
75
77
|
RealtimeSessionCreateParams,
|
|
@@ -116,6 +118,7 @@ import {
|
|
|
116
118
|
} from './resources/speech-to-speech';
|
|
117
119
|
import { TaskRetrieveResponse, Tasks } from './resources/tasks';
|
|
118
120
|
import { TextToImage, TextToImageCreateParams, TextToImageCreateResponse } from './resources/text-to-image';
|
|
121
|
+
import { TextToMesh, TextToMeshCreateParams, TextToMeshCreateResponse } from './resources/text-to-mesh';
|
|
119
122
|
import { TextToMusic, TextToMusicCreateParams, TextToMusicCreateResponse } from './resources/text-to-music';
|
|
120
123
|
import {
|
|
121
124
|
TextToSpeech,
|
|
@@ -974,6 +977,14 @@ export class RunwayML {
|
|
|
974
977
|
* These endpoints all kick off tasks to create generations.
|
|
975
978
|
*/
|
|
976
979
|
textToMusic: API.TextToMusic = new API.TextToMusic(this);
|
|
980
|
+
/**
|
|
981
|
+
* These endpoints all kick off tasks to create generations.
|
|
982
|
+
*/
|
|
983
|
+
textToMesh: API.TextToMesh = new API.TextToMesh(this);
|
|
984
|
+
/**
|
|
985
|
+
* These endpoints all kick off tasks to create generations.
|
|
986
|
+
*/
|
|
987
|
+
imageToMesh: API.ImageToMesh = new API.ImageToMesh(this);
|
|
977
988
|
/**
|
|
978
989
|
* These endpoints all kick off tasks to create generations.
|
|
979
990
|
*/
|
|
@@ -1018,6 +1029,7 @@ export class RunwayML {
|
|
|
1018
1029
|
voices: API.Voices = new API.Voices(this);
|
|
1019
1030
|
uploads: API.Uploads = new API.Uploads(this);
|
|
1020
1031
|
workflows: API.Workflows = new API.Workflows(this);
|
|
1032
|
+
modelCatalog: API.ModelCatalog = new API.ModelCatalog(this);
|
|
1021
1033
|
workflowInvocations: API.WorkflowInvocations = new API.WorkflowInvocations(this);
|
|
1022
1034
|
}
|
|
1023
1035
|
|
|
@@ -1030,6 +1042,8 @@ RunwayML.TextToVideo = TextToVideo;
|
|
|
1030
1042
|
RunwayML.TextToImage = TextToImage;
|
|
1031
1043
|
RunwayML.ImageToVector = ImageToVector;
|
|
1032
1044
|
RunwayML.TextToMusic = TextToMusic;
|
|
1045
|
+
RunwayML.TextToMesh = TextToMesh;
|
|
1046
|
+
RunwayML.ImageToMesh = ImageToMesh;
|
|
1033
1047
|
RunwayML.CharacterPerformance = CharacterPerformance;
|
|
1034
1048
|
RunwayML.TextToSpeech = TextToSpeech;
|
|
1035
1049
|
RunwayML.SoundEffect = SoundEffect;
|
|
@@ -1050,6 +1064,7 @@ RunwayML.Recipes = Recipes;
|
|
|
1050
1064
|
RunwayML.Voices = Voices;
|
|
1051
1065
|
RunwayML.Uploads = Uploads;
|
|
1052
1066
|
RunwayML.Workflows = Workflows;
|
|
1067
|
+
RunwayML.ModelCatalog = ModelCatalog;
|
|
1053
1068
|
RunwayML.WorkflowInvocations = WorkflowInvocations;
|
|
1054
1069
|
|
|
1055
1070
|
export declare namespace RunwayML {
|
|
@@ -1108,6 +1123,18 @@ export declare namespace RunwayML {
|
|
|
1108
1123
|
type TextToMusicCreateParams as TextToMusicCreateParams,
|
|
1109
1124
|
};
|
|
1110
1125
|
|
|
1126
|
+
export {
|
|
1127
|
+
TextToMesh as TextToMesh,
|
|
1128
|
+
type TextToMeshCreateResponse as TextToMeshCreateResponse,
|
|
1129
|
+
type TextToMeshCreateParams as TextToMeshCreateParams,
|
|
1130
|
+
};
|
|
1131
|
+
|
|
1132
|
+
export {
|
|
1133
|
+
ImageToMesh as ImageToMesh,
|
|
1134
|
+
type ImageToMeshCreateResponse as ImageToMeshCreateResponse,
|
|
1135
|
+
type ImageToMeshCreateParams as ImageToMeshCreateParams,
|
|
1136
|
+
};
|
|
1137
|
+
|
|
1111
1138
|
export {
|
|
1112
1139
|
CharacterPerformance as CharacterPerformance,
|
|
1113
1140
|
type CharacterPerformanceCreateResponse as CharacterPerformanceCreateResponse,
|
|
@@ -1273,6 +1300,8 @@ export declare namespace RunwayML {
|
|
|
1273
1300
|
type WorkflowRunParams as WorkflowRunParams,
|
|
1274
1301
|
};
|
|
1275
1302
|
|
|
1303
|
+
export { ModelCatalog as ModelCatalog, type ModelCatalogListResponse as ModelCatalogListResponse };
|
|
1304
|
+
|
|
1276
1305
|
export {
|
|
1277
1306
|
WorkflowInvocations as WorkflowInvocations,
|
|
1278
1307
|
type WorkflowInvocationRetrieveResponse as WorkflowInvocationRetrieveResponse,
|
|
@@ -5,6 +5,8 @@ import * as AudioAPI from './audio';
|
|
|
5
5
|
import { Audio, AudioCreateParams, AudioCreateResponse, ReferenceAudio, ReferenceVoice } from './audio';
|
|
6
6
|
import * as ImageAPI from './image';
|
|
7
7
|
import { Image, ImageCreateParams, ImageCreateResponse } from './image';
|
|
8
|
+
import * as MeshAPI from './mesh';
|
|
9
|
+
import { Mesh, MeshCreateParams, MeshCreateResponse } from './mesh';
|
|
8
10
|
import * as VideoAPI from './video';
|
|
9
11
|
import { Video, VideoCreateParams, VideoCreateResponse } from './video';
|
|
10
12
|
|
|
@@ -12,11 +14,13 @@ export class Generate extends APIResource {
|
|
|
12
14
|
video: VideoAPI.Video = new VideoAPI.Video(this._client);
|
|
13
15
|
image: ImageAPI.Image = new ImageAPI.Image(this._client);
|
|
14
16
|
audio: AudioAPI.Audio = new AudioAPI.Audio(this._client);
|
|
17
|
+
mesh: MeshAPI.Mesh = new MeshAPI.Mesh(this._client);
|
|
15
18
|
}
|
|
16
19
|
|
|
17
20
|
Generate.Video = Video;
|
|
18
21
|
Generate.Image = Image;
|
|
19
22
|
Generate.Audio = Audio;
|
|
23
|
+
Generate.Mesh = Mesh;
|
|
20
24
|
|
|
21
25
|
export declare namespace Generate {
|
|
22
26
|
export {
|
|
@@ -38,4 +42,10 @@ export declare namespace Generate {
|
|
|
38
42
|
type AudioCreateResponse as AudioCreateResponse,
|
|
39
43
|
type AudioCreateParams as AudioCreateParams,
|
|
40
44
|
};
|
|
45
|
+
|
|
46
|
+
export {
|
|
47
|
+
Mesh as Mesh,
|
|
48
|
+
type MeshCreateResponse as MeshCreateResponse,
|
|
49
|
+
type MeshCreateParams as MeshCreateParams,
|
|
50
|
+
};
|
|
41
51
|
}
|
|
@@ -9,4 +9,5 @@ export {
|
|
|
9
9
|
} from './audio';
|
|
10
10
|
export { Generate } from './generate';
|
|
11
11
|
export { Image, type ImageCreateResponse, type ImageCreateParams } from './image';
|
|
12
|
+
export { Mesh, type MeshCreateResponse, type MeshCreateParams } from './mesh';
|
|
12
13
|
export { Video, type VideoCreateResponse, type VideoCreateParams } from './video';
|