@runwayml/sdk 4.30.0 → 4.31.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/CHANGELOG.md +18 -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/lib/polling.d.mts.map +1 -1
- package/lib/polling.d.ts.map +1 -1
- package/lib/polling.js +6 -8
- package/lib/polling.js.map +1 -1
- package/lib/polling.mjs +6 -8
- package/lib/polling.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/lib/polling.ts +6 -8
- 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,161 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
|
|
7
|
+
export class ModelCatalog extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* List the endpoints and `model` values the organization associated with the API
|
|
10
|
+
* key has access to, grouped by model. An entry is `available` when model
|
|
11
|
+
* admission, the check a request makes on its `model` value before reading the
|
|
12
|
+
* body, accepts that value on that endpoint for the organization now, and `gated`
|
|
13
|
+
* with a reason when admission refuses it for a workspace policy or because the
|
|
14
|
+
* task it runs has been retired. A `model` value admission refuses for any other
|
|
15
|
+
* reason, such as no access or a release that has not reached the organization,
|
|
16
|
+
* has no entry. Deprecated and retired `model` values have no entry, and a request
|
|
17
|
+
* for a retired one is refused with a sunset error. A `model` value not yet
|
|
18
|
+
* announced has an entry only when admission accepts it, listed in
|
|
19
|
+
* `ungroupedEntries` and never `gated`. Checks that depend on the caller, the
|
|
20
|
+
* request or the moment run afterwards, at submission, and refuse with their own
|
|
21
|
+
* errors: the caller's region, the organization's country lock, daily task limits,
|
|
22
|
+
* credits, and provider outages.
|
|
23
|
+
*/
|
|
24
|
+
list(options?: RequestOptions): APIPromise<ModelCatalogListResponse> {
|
|
25
|
+
return this._client.get('/v1/model_catalog', options);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface ModelCatalogListResponse {
|
|
30
|
+
/**
|
|
31
|
+
* The models the organization has access to, with an entry per endpoint and
|
|
32
|
+
* `model` value. A `model` value admission refuses on an endpoint for a reason
|
|
33
|
+
* other than a workspace policy or a retired task, such as no access, has no
|
|
34
|
+
* entry. Deprecated and retired `model` values have no entry, and neither does a
|
|
35
|
+
* `model` value not yet announced that admission refuses.
|
|
36
|
+
*/
|
|
37
|
+
models: Array<ModelCatalogListResponse.Model>;
|
|
38
|
+
|
|
39
|
+
schemaVersion: 1;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Entries for `model` values that belong to no model listed in `models`, including
|
|
43
|
+
* every `model` value not yet announced.
|
|
44
|
+
*/
|
|
45
|
+
ungroupedEntries: Array<ModelCatalogListResponse.UngroupedEntry>;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export namespace ModelCatalogListResponse {
|
|
49
|
+
/**
|
|
50
|
+
* A model, with the endpoints and `model` values that request it.
|
|
51
|
+
*/
|
|
52
|
+
export interface Model {
|
|
53
|
+
/**
|
|
54
|
+
* The model's catalog identifier.
|
|
55
|
+
*/
|
|
56
|
+
id: string;
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Each endpoint and `model` value for this model, each answered on its own.
|
|
60
|
+
*/
|
|
61
|
+
entries: Array<Model.Entry>;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The kind of media the model produces.
|
|
65
|
+
*/
|
|
66
|
+
medium: 'image' | 'video' | 'audio' | 'mesh';
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The model's display name.
|
|
70
|
+
*/
|
|
71
|
+
name: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export namespace Model {
|
|
75
|
+
/**
|
|
76
|
+
* A `model` value one endpoint accepts, and whether the organization may request
|
|
77
|
+
* it there.
|
|
78
|
+
*/
|
|
79
|
+
export interface Entry {
|
|
80
|
+
/**
|
|
81
|
+
* The endpoint path that accepts this `model` value.
|
|
82
|
+
*/
|
|
83
|
+
path: string;
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* The value to send as `model` in a request to `path`.
|
|
87
|
+
*/
|
|
88
|
+
requestName: string;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* `available` when model admission accepts this `model` value on this endpoint for
|
|
92
|
+
* the organization now. `gated` when admission refuses it for a workspace policy
|
|
93
|
+
* or because the task it runs has been retired, explained in `reason`; a `model`
|
|
94
|
+
* value not yet announced is never `gated`. Admission does not cover the checks a
|
|
95
|
+
* request meets later at submission, which refuse with their own errors.
|
|
96
|
+
*/
|
|
97
|
+
state: 'available' | 'gated';
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Why a request for a gated model would be refused.
|
|
101
|
+
*/
|
|
102
|
+
reason?: string;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* A stable code for `reason` on a gated entry, for clients that write their own
|
|
106
|
+
* message. Known codes: `sunset` when admission refuses because the task it runs
|
|
107
|
+
* has been retired; `admin_disabled`, `runway_disabled`, `not_purchased` or
|
|
108
|
+
* `region_restricted` when a workspace policy refuses it (`runway_disabled` when
|
|
109
|
+
* Runway turned the model off for the workspace and its admins cannot turn it on).
|
|
110
|
+
* New codes may be added; treat a code you do not recognize as absent and show
|
|
111
|
+
* `reason`.
|
|
112
|
+
*/
|
|
113
|
+
reasonCode?: string;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* A `model` value one endpoint accepts, and whether the organization may request
|
|
119
|
+
* it there.
|
|
120
|
+
*/
|
|
121
|
+
export interface UngroupedEntry {
|
|
122
|
+
/**
|
|
123
|
+
* The endpoint path that accepts this `model` value.
|
|
124
|
+
*/
|
|
125
|
+
path: string;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* The value to send as `model` in a request to `path`.
|
|
129
|
+
*/
|
|
130
|
+
requestName: string;
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* `available` when model admission accepts this `model` value on this endpoint for
|
|
134
|
+
* the organization now. `gated` when admission refuses it for a workspace policy
|
|
135
|
+
* or because the task it runs has been retired, explained in `reason`; a `model`
|
|
136
|
+
* value not yet announced is never `gated`. Admission does not cover the checks a
|
|
137
|
+
* request meets later at submission, which refuse with their own errors.
|
|
138
|
+
*/
|
|
139
|
+
state: 'available' | 'gated';
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Why a request for a gated model would be refused.
|
|
143
|
+
*/
|
|
144
|
+
reason?: string;
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* A stable code for `reason` on a gated entry, for clients that write their own
|
|
148
|
+
* message. Known codes: `sunset` when admission refuses because the task it runs
|
|
149
|
+
* has been retired; `admin_disabled`, `runway_disabled`, `not_purchased` or
|
|
150
|
+
* `region_restricted` when a workspace policy refuses it (`runway_disabled` when
|
|
151
|
+
* Runway turned the model off for the workspace and its admins cannot turn it on).
|
|
152
|
+
* New codes may be added; treat a code you do not recognize as absent and show
|
|
153
|
+
* `reason`.
|
|
154
|
+
*/
|
|
155
|
+
reasonCode?: string;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export declare namespace ModelCatalog {
|
|
160
|
+
export { type ModelCatalogListResponse as ModelCatalogListResponse };
|
|
161
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { RequestOptions } from '../internal/request-options';
|
|
5
|
+
import { APIPromiseWithAwaitableTask, wrapAsWaitableResource } from '../lib/polling';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* These endpoints all kick off tasks to create generations.
|
|
9
|
+
*/
|
|
10
|
+
export class TextToMesh extends APIResource {
|
|
11
|
+
/**
|
|
12
|
+
* Generate a GLB mesh from a text description.
|
|
13
|
+
*/
|
|
14
|
+
create(
|
|
15
|
+
body: TextToMeshCreateParams,
|
|
16
|
+
options?: RequestOptions,
|
|
17
|
+
): APIPromiseWithAwaitableTask<TextToMeshCreateResponse> {
|
|
18
|
+
return wrapAsWaitableResource<TextToMeshCreateResponse>(this._client)(
|
|
19
|
+
this._client.post('/v1/text_to_mesh', { body, ...options }),
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export interface TextToMeshCreateResponse {
|
|
25
|
+
/**
|
|
26
|
+
* The ID of the task that was created. Use this to retrieve the task later.
|
|
27
|
+
*/
|
|
28
|
+
id: string;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* The maximum credits this task may charge. The final amount may be lower after
|
|
32
|
+
* the task completes.
|
|
33
|
+
*/
|
|
34
|
+
estimatedCost: TextToMeshCreateResponse.EstimatedCost;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export namespace TextToMeshCreateResponse {
|
|
38
|
+
/**
|
|
39
|
+
* The maximum credits this task may charge. The final amount may be lower after
|
|
40
|
+
* the task completes.
|
|
41
|
+
*/
|
|
42
|
+
export interface EstimatedCost {
|
|
43
|
+
/**
|
|
44
|
+
* Estimated cost of the generation in credits.
|
|
45
|
+
*/
|
|
46
|
+
credits: number;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export type TextToMeshCreateParams =
|
|
51
|
+
| TextToMeshCreateParams.Tripo3dH3_1
|
|
52
|
+
| TextToMeshCreateParams.Hunyuan3d3_1Pro;
|
|
53
|
+
|
|
54
|
+
export declare namespace TextToMeshCreateParams {
|
|
55
|
+
export interface Tripo3dH3_1 {
|
|
56
|
+
model: 'tripo3d_h3_1';
|
|
57
|
+
|
|
58
|
+
promptText: string;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Estimate the physical size of the object.
|
|
62
|
+
*/
|
|
63
|
+
autoSize?: boolean;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* The maximum number of faces in the generated mesh.
|
|
67
|
+
*/
|
|
68
|
+
faceLimit?: number;
|
|
69
|
+
|
|
70
|
+
geometryQuality?: 'standard' | 'detailed';
|
|
71
|
+
|
|
72
|
+
imageSeed?: number;
|
|
73
|
+
|
|
74
|
+
modelSeed?: number;
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Generate physically based materials for the mesh.
|
|
78
|
+
*/
|
|
79
|
+
pbr?: boolean;
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Generate textures for the mesh. PBR also enables textures.
|
|
83
|
+
*/
|
|
84
|
+
texture?: boolean;
|
|
85
|
+
|
|
86
|
+
textureQuality?: 'standard' | 'detailed';
|
|
87
|
+
|
|
88
|
+
textureSeed?: number;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface Hunyuan3d3_1Pro {
|
|
92
|
+
model: 'hunyuan_3d_3_1_pro';
|
|
93
|
+
|
|
94
|
+
promptText: string;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Generate physically based materials for a textured model.
|
|
98
|
+
*/
|
|
99
|
+
enablePbr?: boolean;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* The target number of faces in the generated mesh.
|
|
103
|
+
*/
|
|
104
|
+
faceCount?: number;
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Generate a textured model or geometry without textures.
|
|
108
|
+
*/
|
|
109
|
+
generateType?: 'Normal' | 'Geometry';
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export declare namespace TextToMesh {
|
|
114
|
+
export {
|
|
115
|
+
type TextToMeshCreateResponse as TextToMeshCreateResponse,
|
|
116
|
+
type TextToMeshCreateParams as TextToMeshCreateParams,
|
|
117
|
+
};
|
|
118
|
+
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '4.
|
|
1
|
+
export const VERSION = '4.31.1'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "4.
|
|
1
|
+
export declare const VERSION = "4.31.1";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "4.
|
|
1
|
+
export declare const VERSION = "4.31.1";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '4.
|
|
1
|
+
export const VERSION = '4.31.1'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|