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": "824c8e76-3377-4969-99f1-7054db429172",
"id": "90092907-f79c-4e34-9056-c96300cedb96",
"tracked_paths": [
{
"editable": true,
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ download_urls = result.downloads
### [v1.ai_video_translator](magic_hour/resources/v1/ai_video_translator/README.md)

- [create](magic_hour/resources/v1/ai_video_translator/README.md#create) - AI Video Translator
- [generate](magic_hour/resources/v1/ai_video_translator/README.md#generate) - Generate video translation

### [v1.ai_voice_cloner](magic_hour/resources/v1/ai_voice_cloner/README.md)

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.84.0"
MOCK_SERVER = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.85.0"


def _get_base_url(
Expand Down
2 changes: 1 addition & 1 deletion magic_hour/resources/v1/ai_video_editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ 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-1.1`: 3s, LTX 2.5: 0.5s. Maximum duration depends on model: `gemini-omni-1.1`: 10s, LTX 2.5: 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.5: 0.5s. Maximum duration depends on model: `gemini-omni-1.1`: 10s, LTX 2.5: 20s. | `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.5 for free tier and `gemini-omni-1.1` for paid. `gemini-omni` is deprecated; use `gemini-omni-1.1` instead. | `"gemini-omni-1.1"` |
Expand Down
4 changes: 2 additions & 2 deletions magic_hour/resources/v1/ai_video_editor/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def create(
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.5 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-1.1`: 3s, LTX 2.5: 0.5s. Maximum duration depends on model: `gemini-omni-1.1`: 10s, LTX 2.5: 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.5: 0.5s. Maximum duration depends on model: `gemini-omni-1.1`: 10s, LTX 2.5: 20s.
style: V1AiVideoEditorCreateBodyStyle
request_options: Additional options to customize the HTTP request

Expand Down Expand Up @@ -375,7 +375,7 @@ async def create(
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.5 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-1.1`: 3s, LTX 2.5: 0.5s. Maximum duration depends on model: `gemini-omni-1.1`: 10s, LTX 2.5: 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.5: 0.5s. Maximum duration depends on model: `gemini-omni-1.1`: 10s, LTX 2.5: 20s.
style: V1AiVideoEditorCreateBodyStyle
request_options: Additional options to customize the HTTP request

Expand Down
9 changes: 6 additions & 3 deletions magic_hour/resources/v1/character_replace/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,14 @@ For detailed examples, see the [product page](https://magichour.ai/products/char
| `└─ image_file_path` | ✓ | Reference character image used as the replacement or animation target. 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/5678.png"` |
| `└─ video_file_path` | ✓ | Source video containing the subject to replace or animate. 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 (seconds). Must be greater than start_seconds. | `15.0` |
| `model` | ✗ | Model to use. Defaults to `wan-animate`. * **`wan-animate`**: 480p, 720p. Supports `points` subject selection. * **`kling-3.0`**: 720p, 1080p. Clips of 3–10 seconds in `replace` mode or 3–30 seconds in `animate` mode. Picks the main person automatically, so `points` are rejected. | `"wan-animate"` |
| `name` | ✗ | Give your video a custom name for easy identification. | `"My Character Replace video"` |
| `resolution` | ✗ | Output video resolution. Defaults to 480p, the lowest resolution available on your plan. | `"720p"` |
| `resolution` | ✗ | Output video resolution. Must be supported by `model`. Defaults to the lowest resolution available on your plan for that model. | `"720p"` |
| `start_seconds` | ✗ | Start time of your clip (seconds). Must be ≥ 0. | `0.0` |
| `style` | ✗ | Optional style controls for replace vs animate mode and subject selection. | `{"mode": "replace", "selection_mode": "auto"}` |
| `└─ mode` | ✗ | Processing mode. `replace` swaps the detected subject with your reference character. `animate` transfers motion from the video onto your character image. | `"replace"` |
| `└─ points` | ✗ | On-frame markers for manual subject selection. Required when `selection_mode` is `point`. Ignored when `selection_mode` is `auto` or omitted. | `[{"position_x": 320, "position_y": 180, "time_seconds": 2.5}]` |
| `└─ selection_mode` | ✗ | How to locate the subject in the source video. `auto` detects a person automatically. `point` uses your `points` to mark the subject. Defaults to `auto`. | `"auto"` |
| `└─ points` | ✗ | On-frame markers for manual subject selection. Required when `selection_mode` is `point`. Ignored when `selection_mode` is `auto` or omitted. Rejected for models without subject selection (supported by `wan-animate`). | `[{"position_x": 320, "position_y": 180, "time_seconds": 2.5}]` |
| `└─ selection_mode` | ✗ | How to locate the subject in the source video. `auto` detects a person automatically. `point` uses your `points` to mark the subject and is supported by `wan-animate`. Defaults to `auto`. | `"auto"` |

#### Synchronous Client

Expand All @@ -131,6 +132,7 @@ res = client.v1.character_replace.create(
"video_file_path": "api-assets/id/1234.mp4",
},
end_seconds=15.0,
model="wan-animate",
name="My Character Replace video",
resolution="720p",
start_seconds=0.0,
Expand All @@ -151,6 +153,7 @@ res = await client.v1.character_replace.create(
"video_file_path": "api-assets/id/1234.mp4",
},
end_seconds=15.0,
model="wan-animate",
name="My Character Replace video",
resolution="720p",
start_seconds=0.0,
Expand Down
Loading
Loading