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
2 changes: 1 addition & 1 deletion .sdk.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "09808c10-8c6d-48b0-b2f3-cdf1462d8947",
"id": "c883db49-d93c-4306-b011-a179d9cfe5e5",
"tracked_paths": [
{
"editable": true,
Expand Down
2 changes: 1 addition & 1 deletion magic_hour/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ class Environment(enum.Enum):
"""Pre-defined base URLs for the API"""

ENVIRONMENT = "https://api.magichour.ai"
MOCK_SERVER = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.76.0"
MOCK_SERVER = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.77.0"


def _get_base_url(
Expand Down
10 changes: 5 additions & 5 deletions magic_hour/resources/v1/ai_video_editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ For detailed examples, see the [product page](https://magichour.ai/products/ai-v
| -------------------- | :------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------- |
| `assets` | ✓ | Provide the assets for video editing. | `{"video_file_path": "api-assets/id/1234.mp4"}` |
| `└─ video_file_path` | ✓ | The video to edit. This value is either - a direct URL to the video file - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details. | `"api-assets/id/1234.mp4"` |
| `end_seconds` | ✓ | End time of your clip in seconds. Must be greater than `start_seconds`. Minimum duration depends on model: `gemini-omni`: 3s, `ltx-2.3`: 0.5s. Maximum duration depends on model: `gemini-omni`: 10s, `ltx-2.3`: 45s. | `5.0` |
| `end_seconds` | ✓ | End time of your clip in seconds. Must be greater than `start_seconds`. Minimum duration depends on model: `gemini-omni-1.1`: 3s, `ltx-2.3`: 0.5s. Maximum duration depends on model: `gemini-omni-1.1`: 10s, `ltx-2.3`: 45s. | `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"` |
| `model` | ✗ | Editing model. Defaults to `ltx-2.3` for free tier and `gemini-omni-1.1` for paid. `gemini-omni` is deprecated; use `gemini-omni-1.1` instead. | `"gemini-omni-1.1"` |
| `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"` |
| `resolution` | ✗ | Output resolution. Defaults to `480p` for free tier and `720p` for paid. `gemini-omni-1.1` and deprecated `gemini-omni` support 720p and 1080p; LTX-2.3 supports 480p, 720p, and 1080p. | `"720p"` |
| `start_seconds` | ✗ | Start time of your clip (seconds). Must be ≥ 0. | `0.0` |

#### Synchronous Client
Expand All @@ -119,7 +119,7 @@ res = client.v1.ai_video_editor.create(
assets={"video_file_path": "api-assets/id/1234.mp4"},
end_seconds=5.0,
style={"prompt": "Change the car color to blue"},
model="gemini-omni",
model="gemini-omni-1.1",
name="My Video Editor video",
resolution="720p",
start_seconds=0.0,
Expand All @@ -137,7 +137,7 @@ res = await client.v1.ai_video_editor.create(
assets={"video_file_path": "api-assets/id/1234.mp4"},
end_seconds=5.0,
style={"prompt": "Change the car color to blue"},
model="gemini-omni",
model="gemini-omni-1.1",
name="My Video Editor video",
resolution="720p",
start_seconds=0.0,
Expand Down
24 changes: 14 additions & 10 deletions magic_hour/resources/v1/ai_video_editor/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ def create(
end_seconds: float,
style: params.V1AiVideoEditorCreateBodyStyle,
model: typing.Union[
typing.Optional[typing_extensions.Literal["gemini-omni", "ltx-2.3"]],
typing.Optional[
typing_extensions.Literal["gemini-omni", "gemini-omni-1.1", "ltx-2.3"]
],
type_utils.NotGiven,
] = type_utils.NOT_GIVEN,
name: typing.Union[
Expand Down Expand Up @@ -160,12 +162,12 @@ def create(
POST /v1/ai-video-editor

Args:
model: Editing model. Defaults to `ltx-2.3` for free tier and `gemini-omni` for paid. Use `ltx-2.3` for LTX video edit.
model: Editing model. Defaults to `ltx-2.3` for free tier and `gemini-omni-1.1` for paid. `gemini-omni` is deprecated; use `gemini-omni-1.1` instead.
name: Give your video a custom name for easy identification.
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.
resolution: Output resolution. Defaults to `480p` for free tier and `720p` for paid. `gemini-omni-1.1` and deprecated `gemini-omni` support 720p and 1080p; LTX-2.3 supports 480p, 720p, and 1080p.
start_seconds: Start time of your clip (seconds). Must be ≥ 0.
assets: Provide the assets for video editing.
end_seconds: End time of your clip in seconds. Must be greater than `start_seconds`. Minimum duration depends on model: `gemini-omni`: 3s, `ltx-2.3`: 0.5s. Maximum duration depends on model: `gemini-omni`: 10s, `ltx-2.3`: 45s.
end_seconds: End time of your clip in seconds. Must be greater than `start_seconds`. Minimum duration depends on model: `gemini-omni-1.1`: 3s, `ltx-2.3`: 0.5s. Maximum duration depends on model: `gemini-omni-1.1`: 10s, `ltx-2.3`: 45s.
style: V1AiVideoEditorCreateBodyStyle
request_options: Additional options to customize the HTTP request

Expand All @@ -182,7 +184,7 @@ def create(
assets={"video_file_path": "api-assets/id/1234.mp4"},
end_seconds=5.0,
style={"prompt": "Change the car color to blue"},
model="gemini-omni",
model="gemini-omni-1.1",
name="My Video Editor video",
resolution="720p",
start_seconds=0.0,
Expand Down Expand Up @@ -306,7 +308,9 @@ async def create(
end_seconds: float,
style: params.V1AiVideoEditorCreateBodyStyle,
model: typing.Union[
typing.Optional[typing_extensions.Literal["gemini-omni", "ltx-2.3"]],
typing.Optional[
typing_extensions.Literal["gemini-omni", "gemini-omni-1.1", "ltx-2.3"]
],
type_utils.NotGiven,
] = type_utils.NOT_GIVEN,
name: typing.Union[
Expand Down Expand Up @@ -350,12 +354,12 @@ async def create(
POST /v1/ai-video-editor

Args:
model: Editing model. Defaults to `ltx-2.3` for free tier and `gemini-omni` for paid. Use `ltx-2.3` for LTX video edit.
model: Editing model. Defaults to `ltx-2.3` for free tier and `gemini-omni-1.1` for paid. `gemini-omni` is deprecated; use `gemini-omni-1.1` instead.
name: Give your video a custom name for easy identification.
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.
resolution: Output resolution. Defaults to `480p` for free tier and `720p` for paid. `gemini-omni-1.1` and deprecated `gemini-omni` support 720p and 1080p; LTX-2.3 supports 480p, 720p, and 1080p.
start_seconds: Start time of your clip (seconds). Must be ≥ 0.
assets: Provide the assets for video editing.
end_seconds: End time of your clip in seconds. Must be greater than `start_seconds`. Minimum duration depends on model: `gemini-omni`: 3s, `ltx-2.3`: 0.5s. Maximum duration depends on model: `gemini-omni`: 10s, `ltx-2.3`: 45s.
end_seconds: End time of your clip in seconds. Must be greater than `start_seconds`. Minimum duration depends on model: `gemini-omni-1.1`: 3s, `ltx-2.3`: 0.5s. Maximum duration depends on model: `gemini-omni-1.1`: 10s, `ltx-2.3`: 45s.
style: V1AiVideoEditorCreateBodyStyle
request_options: Additional options to customize the HTTP request

Expand All @@ -372,7 +376,7 @@ async def create(
assets={"video_file_path": "api-assets/id/1234.mp4"},
end_seconds=5.0,
style={"prompt": "Change the car color to blue"},
model="gemini-omni",
model="gemini-omni-1.1",
name="My Video Editor video",
resolution="720p",
start_seconds=0.0,
Expand Down
Loading
Loading