@remotion-studio/sdk 0.1.1 → 0.1.4
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 +2 -2
- package/dist/sdk/client.js +0 -3
- package/dist/sdk/types.d.ts +0 -4
- package/dist/shared/artifact.d.ts +1 -3
- package/dist/shared/artifact.js +1 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,6 +46,8 @@ The plaintext token is shown only once when it is created.
|
|
|
46
46
|
- `headers?: HeadersInit`
|
|
47
47
|
- `fetch?: typeof fetch`
|
|
48
48
|
|
|
49
|
+
`baseUrl` should be the Remotion Studio origin, for example `https://remotionstudio.io`, not `https://remotionstudio.io/api`.
|
|
50
|
+
|
|
49
51
|
## SDK Methods
|
|
50
52
|
|
|
51
53
|
| Method | HTTP | Endpoint | Purpose |
|
|
@@ -76,7 +78,6 @@ Request fields:
|
|
|
76
78
|
|
|
77
79
|
- `prompt: string`
|
|
78
80
|
- `presetId?: string`
|
|
79
|
-
- `model?: string`
|
|
80
81
|
- `reasoningEffort?: "none" | "low" | "medium" | "high" | "xhigh"`
|
|
81
82
|
- `frameImages?: string[]`
|
|
82
83
|
|
|
@@ -100,7 +101,6 @@ Common request fields:
|
|
|
100
101
|
- `errorCorrection?: { error: string; source?: "compilation" | "runtime" | "generation"; attemptNumber: number; maxAttempts: number; failedEdit?: { description: string; old_string: string; new_string: string; lineNumber?: number } }`
|
|
101
102
|
- `previouslyUsedSkills?: string[]`
|
|
102
103
|
- `frameImages?: string[]`
|
|
103
|
-
- `model?: string`
|
|
104
104
|
- `reasoningEffort?: "none" | "low" | "medium" | "high" | "xhigh"`
|
|
105
105
|
|
|
106
106
|
## Stream Generation
|
package/dist/sdk/client.js
CHANGED
|
@@ -268,7 +268,6 @@ const createRemotionStudioClient = ({ baseUrl, fetch: providedFetch, headers: de
|
|
|
268
268
|
const data = await assertJsonResponse(response);
|
|
269
269
|
callbacks.onMetadata?.({
|
|
270
270
|
skills: data.metadata.skills,
|
|
271
|
-
model: data.metadata.model,
|
|
272
271
|
preset: data.metadata.preset,
|
|
273
272
|
});
|
|
274
273
|
callbacks.onCode?.(data.code);
|
|
@@ -277,7 +276,6 @@ const createRemotionStudioClient = ({ baseUrl, fetch: providedFetch, headers: de
|
|
|
277
276
|
reasoning: "",
|
|
278
277
|
metadata: {
|
|
279
278
|
skills: data.metadata.skills,
|
|
280
|
-
model: data.metadata.model,
|
|
281
279
|
preset: data.metadata.preset,
|
|
282
280
|
},
|
|
283
281
|
summary: data.summary,
|
|
@@ -322,7 +320,6 @@ const createRemotionStudioClient = ({ baseUrl, fetch: providedFetch, headers: de
|
|
|
322
320
|
if (event.type === "metadata") {
|
|
323
321
|
streamMetadata = {
|
|
324
322
|
skills: event.skills,
|
|
325
|
-
model: event.model,
|
|
326
323
|
preset: event.preset,
|
|
327
324
|
};
|
|
328
325
|
callbacks.onMetadata?.(streamMetadata);
|
package/dist/sdk/types.d.ts
CHANGED
|
@@ -29,7 +29,6 @@ export type RenderCompositionInput = {
|
|
|
29
29
|
export type GenerateRequest = {
|
|
30
30
|
prompt: string;
|
|
31
31
|
presetId?: string;
|
|
32
|
-
model?: string;
|
|
33
32
|
reasoningEffort?: "none" | "low" | "medium" | "high" | "xhigh";
|
|
34
33
|
frameImages?: string[];
|
|
35
34
|
streaming?: boolean;
|
|
@@ -39,7 +38,6 @@ export type GenerateAsyncRequest = Omit<GenerateRequest, "streaming"> & {
|
|
|
39
38
|
};
|
|
40
39
|
export type EditRequest = {
|
|
41
40
|
prompt: string;
|
|
42
|
-
model?: string;
|
|
43
41
|
reasoningEffort?: "none" | "low" | "medium" | "high" | "xhigh";
|
|
44
42
|
currentCode: string;
|
|
45
43
|
threadId?: string;
|
|
@@ -91,7 +89,6 @@ export type ResponseMetadata = {
|
|
|
91
89
|
skills: string[];
|
|
92
90
|
editType: MotionGraphicsEditType;
|
|
93
91
|
edits?: EditOperation[];
|
|
94
|
-
model: string;
|
|
95
92
|
reasoning?: string;
|
|
96
93
|
preset?: MotionGraphicsPresetReference;
|
|
97
94
|
};
|
|
@@ -162,7 +159,6 @@ export type RemotionStudioErrorData = {
|
|
|
162
159
|
};
|
|
163
160
|
export type GenerateStreamMetadata = {
|
|
164
161
|
skills?: string[];
|
|
165
|
-
model?: string;
|
|
166
162
|
preset?: MotionGraphicsPresetReference;
|
|
167
163
|
};
|
|
168
164
|
export type GenerateStreamCallbacks = {
|
|
@@ -21,7 +21,6 @@ export type MotionGraphicsArtifactV1 = {
|
|
|
21
21
|
durationInFrames: number;
|
|
22
22
|
};
|
|
23
23
|
metadata: {
|
|
24
|
-
model: string;
|
|
25
24
|
skills: string[];
|
|
26
25
|
editType: MotionGraphicsEditType;
|
|
27
26
|
summary: string;
|
|
@@ -36,7 +35,6 @@ export type MotionGraphicsCompositionProps = {
|
|
|
36
35
|
type CreateMotionGraphicsArtifactParams = {
|
|
37
36
|
code: string;
|
|
38
37
|
summary?: string;
|
|
39
|
-
model?: string;
|
|
40
38
|
skills?: string[];
|
|
41
39
|
editType?: MotionGraphicsEditType;
|
|
42
40
|
preset?: MotionGraphicsPresetReference;
|
|
@@ -45,7 +43,7 @@ type CreateMotionGraphicsArtifactParams = {
|
|
|
45
43
|
fps?: number;
|
|
46
44
|
durationInFrames?: number;
|
|
47
45
|
};
|
|
48
|
-
export declare const createMotionGraphicsArtifact: ({ code, summary,
|
|
46
|
+
export declare const createMotionGraphicsArtifact: ({ code, summary, skills, editType, preset, width, height, fps, durationInFrames, }: CreateMotionGraphicsArtifactParams) => MotionGraphicsArtifactV1;
|
|
49
47
|
export declare const calculateMotionGraphicsMetadata: ({ props, }: {
|
|
50
48
|
props: MotionGraphicsCompositionProps;
|
|
51
49
|
}) => {
|
package/dist/shared/artifact.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.DEFAULT_MOTION_GRAPHICS_WIDTH = 1920;
|
|
|
7
7
|
exports.DEFAULT_MOTION_GRAPHICS_HEIGHT = 1080;
|
|
8
8
|
exports.DEFAULT_MOTION_GRAPHICS_FPS = 30;
|
|
9
9
|
exports.DEFAULT_MOTION_GRAPHICS_DURATION_IN_FRAMES = 180;
|
|
10
|
-
const createMotionGraphicsArtifact = ({ code, summary = "",
|
|
10
|
+
const createMotionGraphicsArtifact = ({ code, summary = "", skills = [], editType = "full_replacement", preset, width = exports.DEFAULT_MOTION_GRAPHICS_WIDTH, height = exports.DEFAULT_MOTION_GRAPHICS_HEIGHT, fps = exports.DEFAULT_MOTION_GRAPHICS_FPS, durationInFrames = exports.DEFAULT_MOTION_GRAPHICS_DURATION_IN_FRAMES, }) => {
|
|
11
11
|
return {
|
|
12
12
|
version: exports.MOTION_GRAPHICS_ARTIFACT_VERSION,
|
|
13
13
|
runtime: exports.MOTION_GRAPHICS_RUNTIME,
|
|
@@ -19,7 +19,6 @@ const createMotionGraphicsArtifact = ({ code, summary = "", model = "unknown", s
|
|
|
19
19
|
durationInFrames,
|
|
20
20
|
},
|
|
21
21
|
metadata: {
|
|
22
|
-
model,
|
|
23
22
|
skills,
|
|
24
23
|
editType,
|
|
25
24
|
summary,
|
package/package.json
CHANGED