Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .sdk.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "88b59ac0-5cb1-4f23-836d-c115911d1213",
"id": "65155b01-1bb3-4bd8-a8bc-d7a815ca4873",
"tracked_paths": [
{
"editable": true,
Expand Down Expand Up @@ -801,6 +801,14 @@
"editable": false,
"path": "src/types/v1-ai-video-editor-create-body-assets.ts"
},
{
"editable": false,
"path": "src/types/v1-ai-video-editor-create-body-model-enum.ts"
},
{
"editable": false,
"path": "src/types/v1-ai-video-editor-create-body-resolution-enum.ts"
},
{
"editable": false,
"path": "src/types/v1-ai-video-editor-create-body-style.ts"
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "magic-hour",
"version": "0.70.0",
"version": "0.71.0",
"main": "./dist/index.js",
"types": "./dist/index.d.ts",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion src/environment.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export enum Environment {
Environment = "https://api.magichour.ai",
MockServer = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.71.0",
MockServer = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.72.0",
}
4 changes: 4 additions & 0 deletions src/resources/v1/ai-video-editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ For detailed examples, see the [product page](https://magichour.ai/products/vide
| `endSeconds` | ✓ | End time of your clip in seconds. Must be greater than `start_seconds`. Duration must be between 3 and 10 seconds. | `5.0` |
| `style` | ✓ | | `{"prompt": "Change the car color to blue"}` |
| `└─ prompt` | ✓ | The prompt used to edit the video. | `"Change the car color to blue"` |
| `model` | ✗ | Editing model. Defaults to `ltx-2.3` for free tier and `gemini-omni` for paid. Use `ltx-2.3` for LTX video edit. | `"gemini-omni"` |
| `name` | ✗ | Give your video a custom name for easy identification. | `"My Video Editor video"` |
| `resolution` | ✗ | Output resolution. Defaults to `480p` for free tier and `720p` for paid. Google Omni supports 720p only; LTX-2.3 supports 480p, 720p, and 1080p. | `"720p"` |
| `startSeconds` | ✗ | Start time of your clip (seconds). Must be ≥ 0. | `0.0` |

#### Example Snippet
Expand All @@ -99,7 +101,9 @@ const client = new Client({ token: process.env["API_TOKEN"]!! });
const res = await client.v1.aiVideoEditor.create({
assets: { videoFilePath: "api-assets/id/1234.mp4" },
endSeconds: 5.0,
model: "gemini-omni",
name: "My Video Editor video",
resolution: "720p",
startSeconds: 0.0,
style: { prompt: "Change the car color to blue" },
});
Expand Down
18 changes: 18 additions & 0 deletions src/resources/v1/ai-video-editor/request-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,18 @@ export type CreateRequest = {
* End time of your clip in seconds. Must be greater than `start_seconds`. Duration must be between 3 and 10 seconds.
*/
endSeconds: number;
/**
* Editing model. Defaults to `ltx-2.3` for free tier and `gemini-omni` for paid. Use `ltx-2.3` for LTX video edit.
*/
model?: ("gemini-omni" | "ltx-2.3") | undefined;
/**
* Give your video a custom name for easy identification.
*/
name?: string | undefined;
/**
* Output resolution. Defaults to `480p` for free tier and `720p` for paid. Google Omni supports 720p only; LTX-2.3 supports 480p, 720p, and 1080p.
*/
resolution?: ("1080p" | "480p" | "720p") | undefined;
/**
* Start time of your clip (seconds). Must be ≥ 0.
*/
Expand All @@ -43,7 +51,9 @@ export type CreateRequest = {
export type External$CreateRequest = {
assets: External$V1AiVideoEditorCreateBodyAssets;
end_seconds: number;
model?: ("gemini-omni" | "ltx-2.3") | undefined;
name?: string | undefined;
resolution?: ("1080p" | "480p" | "720p") | undefined;
start_seconds?: number | undefined;
style: External$V1AiVideoEditorCreateBodyStyle;
};
Expand All @@ -59,15 +69,19 @@ const SchemaIn$CreateRequest: z.ZodType<
.object({
assets: Schemas$V1AiVideoEditorCreateBodyAssets.in,
end_seconds: z.number(),
model: z.enum(["gemini-omni", "ltx-2.3"]).optional(),
name: z.string().optional(),
resolution: z.enum(["1080p", "480p", "720p"]).optional(),
start_seconds: z.number().optional(),
style: Schemas$V1AiVideoEditorCreateBodyStyle.in,
})
.transform((obj) => {
return zodTransform(obj, {
assets: "assets",
end_seconds: "endSeconds",
model: "model",
name: "name",
resolution: "resolution",
start_seconds: "startSeconds",
style: "style",
});
Expand All @@ -85,15 +99,19 @@ const SchemaOut$CreateRequest: z.ZodType<
.object({
assets: Schemas$V1AiVideoEditorCreateBodyAssets.out,
endSeconds: z.number(),
model: z.enum(["gemini-omni", "ltx-2.3"]).optional(),
name: z.string().optional(),
resolution: z.enum(["1080p", "480p", "720p"]).optional(),
startSeconds: z.number().optional(),
style: Schemas$V1AiVideoEditorCreateBodyStyle.out,
})
.transform((obj) => {
return zodTransform(obj, {
assets: "assets",
endSeconds: "end_seconds",
model: "model",
name: "name",
resolution: "resolution",
startSeconds: "start_seconds",
style: "style",
});
Expand Down
2 changes: 2 additions & 0 deletions src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ export { V1AiTalkingPhotoCreateBodyStyleGenerationModeEnum } from "./v1-ai-talki
export { V1AiTalkingPhotoCreateResponse } from "./v1-ai-talking-photo-create-response";
export { V1AiVideoEditorCreateBody } from "./v1-ai-video-editor-create-body";
export { V1AiVideoEditorCreateBodyAssets } from "./v1-ai-video-editor-create-body-assets";
export { V1AiVideoEditorCreateBodyModelEnum } from "./v1-ai-video-editor-create-body-model-enum";
export { V1AiVideoEditorCreateBodyResolutionEnum } from "./v1-ai-video-editor-create-body-resolution-enum";
export { V1AiVideoEditorCreateBodyStyle } from "./v1-ai-video-editor-create-body-style";
export { V1AiVideoEditorCreateResponse } from "./v1-ai-video-editor-create-response";
export { V1AiVoiceClonerCreateBody } from "./v1-ai-voice-cloner-create-body";
Expand Down
4 changes: 4 additions & 0 deletions src/types/v1-ai-video-editor-create-body-model-enum.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Editing model. Defaults to `ltx-2.3` for free tier and `gemini-omni` for paid. Use `ltx-2.3` for LTX video edit.
*/
export type V1AiVideoEditorCreateBodyModelEnum = "gemini-omni" | "ltx-2.3";
4 changes: 4 additions & 0 deletions src/types/v1-ai-video-editor-create-body-resolution-enum.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/**
* Output resolution. Defaults to `480p` for free tier and `720p` for paid. Google Omni supports 720p only; LTX-2.3 supports 480p, 720p, and 1080p.
*/
export type V1AiVideoEditorCreateBodyResolutionEnum = "1080p" | "480p" | "720p";
18 changes: 18 additions & 0 deletions src/types/v1-ai-video-editor-create-body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,18 @@ export type V1AiVideoEditorCreateBody = {
* End time of your clip in seconds. Must be greater than `start_seconds`. Duration must be between 3 and 10 seconds.
*/
endSeconds: number;
/**
* Editing model. Defaults to `ltx-2.3` for free tier and `gemini-omni` for paid. Use `ltx-2.3` for LTX video edit.
*/
model?: ("gemini-omni" | "ltx-2.3") | undefined;
/**
* Give your video a custom name for easy identification.
*/
name?: string | undefined;
/**
* Output resolution. Defaults to `480p` for free tier and `720p` for paid. Google Omni supports 720p only; LTX-2.3 supports 480p, 720p, and 1080p.
*/
resolution?: ("1080p" | "480p" | "720p") | undefined;
/**
* Start time of your clip (seconds). Must be ≥ 0.
*/
Expand All @@ -43,7 +51,9 @@ export type V1AiVideoEditorCreateBody = {
export type External$V1AiVideoEditorCreateBody = {
assets: External$V1AiVideoEditorCreateBodyAssets;
end_seconds: number;
model?: ("gemini-omni" | "ltx-2.3") | undefined;
name?: string | undefined;
resolution?: ("1080p" | "480p" | "720p") | undefined;
start_seconds?: number | undefined;
style: External$V1AiVideoEditorCreateBodyStyle;
};
Expand All @@ -59,15 +69,19 @@ const SchemaIn$V1AiVideoEditorCreateBody: z.ZodType<
.object({
assets: Schemas$V1AiVideoEditorCreateBodyAssets.in,
end_seconds: z.number(),
model: z.enum(["gemini-omni", "ltx-2.3"]).optional(),
name: z.string().optional(),
resolution: z.enum(["1080p", "480p", "720p"]).optional(),
start_seconds: z.number().optional(),
style: Schemas$V1AiVideoEditorCreateBodyStyle.in,
})
.transform((obj) => {
return zodTransform(obj, {
assets: "assets",
end_seconds: "endSeconds",
model: "model",
name: "name",
resolution: "resolution",
start_seconds: "startSeconds",
style: "style",
});
Expand All @@ -85,15 +99,19 @@ const SchemaOut$V1AiVideoEditorCreateBody: z.ZodType<
.object({
assets: Schemas$V1AiVideoEditorCreateBodyAssets.out,
endSeconds: z.number(),
model: z.enum(["gemini-omni", "ltx-2.3"]).optional(),
name: z.string().optional(),
resolution: z.enum(["1080p", "480p", "720p"]).optional(),
startSeconds: z.number().optional(),
style: Schemas$V1AiVideoEditorCreateBodyStyle.out,
})
.transform((obj) => {
return zodTransform(obj, {
assets: "assets",
endSeconds: "end_seconds",
model: "model",
name: "name",
resolution: "resolution",
startSeconds: "start_seconds",
style: "style",
});
Expand Down
4 changes: 4 additions & 0 deletions test/v1-ai-video-editor.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,19 @@ describe("tests client.v1.aiVideoEditor.create", () => {
.create({
assets: { videoFilePath: "api-assets/id/1234.mp4" },
endSeconds: 5.0,
model: "gemini-omni",
name: "My Video Editor video",
resolution: "720p",
startSeconds: 0.0,
style: { prompt: "Change the car color to blue" },
})
.asResponse(),
client.v1.aiVideoEditor.create({
assets: { videoFilePath: "api-assets/id/1234.mp4" },
endSeconds: 5.0,
model: "gemini-omni",
name: "My Video Editor video",
resolution: "720p",
startSeconds: 0.0,
style: { prompt: "Change the car color to blue" },
}),
Expand Down
Loading