From 5a6200be57cbf3d71645b0edfce027a819f83878 Mon Sep 17 00:00:00 2001 From: "sdk-github-actions[bot]" Date: Thu, 17 Sep 2026 22:14:06 +0000 Subject: [PATCH] chore(release): auto --- .sdk.json | 30 ++- README.md | 4 + magic_hour/README.md | 1 + magic_hour/environment.py | 2 +- magic_hour/resources/v1/README.md | 1 + magic_hour/resources/v1/client.py | 3 + .../resources/v1/image_to_video/README.md | 32 +-- .../resources/v1/image_to_video/client.py | 14 +- magic_hour/resources/v1/saved_items/README.md | 49 +++++ .../resources/v1/saved_items/__init__.py | 4 + magic_hour/resources/v1/saved_items/client.py | 190 ++++++++++++++++++ .../resources/v1/text_to_video/README.md | 24 +-- .../resources/v1/text_to_video/client.py | 16 +- magic_hour/types/models/__init__.py | 8 + .../models/v1_audio_projects_get_response.py | 2 +- .../models/v1_image_projects_get_response.py | 2 +- .../models/v1_saved_items_list_response.py | 25 +++ ...v1_saved_items_list_response_items_item.py | 42 ++++ ...ms_list_response_items_item_assets_item.py | 44 ++++ .../params/v1_image_to_video_create_body.py | 8 +- .../v1_image_to_video_create_body_assets.py | 3 +- .../params/v1_text_to_video_create_body.py | 9 +- pyproject.toml | 2 +- tests/test_v1_saved_items_client.py | 126 ++++++++++++ 24 files changed, 601 insertions(+), 40 deletions(-) create mode 100644 magic_hour/resources/v1/saved_items/README.md create mode 100644 magic_hour/resources/v1/saved_items/__init__.py create mode 100644 magic_hour/resources/v1/saved_items/client.py create mode 100644 magic_hour/types/models/v1_saved_items_list_response.py create mode 100644 magic_hour/types/models/v1_saved_items_list_response_items_item.py create mode 100644 magic_hour/types/models/v1_saved_items_list_response_items_item_assets_item.py create mode 100644 tests/test_v1_saved_items_client.py diff --git a/.sdk.json b/.sdk.json index 0ff6418..5657b85 100644 --- a/.sdk.json +++ b/.sdk.json @@ -1,5 +1,5 @@ { - "id": "ed10f111-a01b-4244-a7c0-268b7e83ba90", + "id": "4cb2c833-ef6d-45d1-949f-40dea5e812de", "tracked_paths": [ { "editable": true, @@ -405,6 +405,18 @@ "editable": true, "path": "magic_hour/resources/v1/photo_colorizer/client.py" }, + { + "editable": true, + "path": "magic_hour/resources/v1/saved_items/README.md" + }, + { + "editable": true, + "path": "magic_hour/resources/v1/saved_items/__init__.py" + }, + { + "editable": true, + "path": "magic_hour/resources/v1/saved_items/client.py" + }, { "editable": true, "path": "magic_hour/resources/v1/text_to_video/README.md" @@ -605,6 +617,18 @@ "editable": false, "path": "magic_hour/types/models/v1_photo_colorizer_create_response.py" }, + { + "editable": false, + "path": "magic_hour/types/models/v1_saved_items_list_response.py" + }, + { + "editable": false, + "path": "magic_hour/types/models/v1_saved_items_list_response_items_item.py" + }, + { + "editable": false, + "path": "magic_hour/types/models/v1_saved_items_list_response_items_item_assets_item.py" + }, { "editable": false, "path": "magic_hour/types/models/v1_text_to_video_create_response.py" @@ -1065,6 +1089,10 @@ "editable": false, "path": "tests/test_v1_photo_colorizer_client.py" }, + { + "editable": false, + "path": "tests/test_v1_saved_items_client.py" + }, { "editable": false, "path": "tests/test_v1_text_to_video_client.py" diff --git a/README.md b/README.md index 9886aac..fb02f07 100644 --- a/README.md +++ b/README.md @@ -317,6 +317,10 @@ download_urls = result.downloads - [create](magic_hour/resources/v1/photo_colorizer/README.md#create) - Photo Colorizer - [generate](magic_hour/resources/v1/photo_colorizer/README.md#generate) - Photo Colorizer Generate Workflow +### [v1.saved_items](magic_hour/resources/v1/saved_items/README.md) + +- [list](magic_hour/resources/v1/saved_items/README.md#list) - List saved items + ### [v1.text_to_video](magic_hour/resources/v1/text_to_video/README.md) - [create](magic_hour/resources/v1/text_to_video/README.md#create) - Text-to-Video diff --git a/magic_hour/README.md b/magic_hour/README.md index 27941d8..b1f62bb 100644 --- a/magic_hour/README.md +++ b/magic_hour/README.md @@ -33,6 +33,7 @@ - [image_to_video](resources/v1/image_to_video/README.md) - image_to_video - [lip_sync](resources/v1/lip_sync/README.md) - lip_sync - [photo_colorizer](resources/v1/photo_colorizer/README.md) - photo_colorizer +- [saved_items](resources/v1/saved_items/README.md) - saved_items - [text_to_video](resources/v1/text_to_video/README.md) - text_to_video - [video_projects](resources/v1/video_projects/README.md) - video_projects - [video_to_video](resources/v1/video_to_video/README.md) - video_to_video diff --git a/magic_hour/environment.py b/magic_hour/environment.py index 78a532f..a7b4692 100644 --- a/magic_hour/environment.py +++ b/magic_hour/environment.py @@ -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.81.0" + MOCK_SERVER = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.82.0" def _get_base_url( diff --git a/magic_hour/resources/v1/README.md b/magic_hour/resources/v1/README.md index 1e5e471..5b08e31 100644 --- a/magic_hour/resources/v1/README.md +++ b/magic_hour/resources/v1/README.md @@ -32,6 +32,7 @@ - [image_to_video](image_to_video/README.md) - image_to_video - [lip_sync](lip_sync/README.md) - lip_sync - [photo_colorizer](photo_colorizer/README.md) - photo_colorizer +- [saved_items](saved_items/README.md) - saved_items - [text_to_video](text_to_video/README.md) - text_to_video - [video_projects](video_projects/README.md) - video_projects - [video_to_video](video_to_video/README.md) - video_to_video diff --git a/magic_hour/resources/v1/client.py b/magic_hour/resources/v1/client.py index 4e06147..1ea7167 100644 --- a/magic_hour/resources/v1/client.py +++ b/magic_hour/resources/v1/client.py @@ -97,6 +97,7 @@ AsyncPhotoColorizerClient, PhotoColorizerClient, ) +from magic_hour.resources.v1.saved_items import AsyncSavedItemsClient, SavedItemsClient from magic_hour.resources.v1.text_to_video import ( AsyncTextToVideoClient, TextToVideoClient, @@ -157,6 +158,7 @@ def __init__(self, *, base_client: SyncBaseClient): self.ai_video_editor = AiVideoEditorClient(base_client=self._base_client) self.character_replace = CharacterReplaceClient(base_client=self._base_client) self.account = AccountClient(base_client=self._base_client) + self.saved_items = SavedItemsClient(base_client=self._base_client) class AsyncV1Client: @@ -216,3 +218,4 @@ def __init__(self, *, base_client: AsyncBaseClient): base_client=self._base_client ) self.account = AsyncAccountClient(base_client=self._base_client) + self.saved_items = AsyncSavedItemsClient(base_client=self._base_client) diff --git a/magic_hour/resources/v1/image_to_video/README.md b/magic_hour/resources/v1/image_to_video/README.md index 306df42..8164876 100644 --- a/magic_hour/resources/v1/image_to_video/README.md +++ b/magic_hour/resources/v1/image_to_video/README.md @@ -94,22 +94,22 @@ For detailed examples, see the [product page](https://magichour.ai/products/imag #### Parameters -| Parameter | Required | Deprecated | Description | Example | -| ------------------------ | :------: | :--------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | -| `assets` | ✓ | ✗ | Provide the assets for image-to-video. Sora 2 only supports images with an aspect ratio of `9:16` or `16:9`. | `{"end_image_file_path": "api-assets/id/1234.png", "image_file_path": "api-assets/id/1234.png"}` | -| `└─ end_image_file_path` | ✗ | — | The image to use as the last frame of the video. * **`gemini-omni-1.1`**: Supports 360p, 720p, 1080p, 4k. * **`kling-2.6`**: Supports 1080p. * **`kling-3.0`**: Supports 720p, 1080p, 4k. * **`ltx-2.3`**: Supports 480p, 720p, 1080p. * **`ltx-2.5`**: Supports 480p, 720p, 1080p. * **`minimax-h3`**: Not supported * **`seedance-1.5`**: Supports 480p, 720p, 1080p. * **`seedance-2.0`**: Supports 480p, 720p. * **`seedance-2.0-mini`**: Supports 480p, 720p. * **`seedance-2.5`**: Supports 480p, 720p. * **`sora-2`**: Not supported * **`veo3.1`**: Supports 720p, 1080p. Requires a duration of 8 seconds or less. * **`veo3.1-lite`**: Supports 720p, 1080p. Requires a duration of 8 seconds or less. * **`wan-2.2`**: Not supported | `"api-assets/id/1234.png"` | -| `└─ image_file_path` | ✓ | — | The path of the image file. 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.png"` | -| `end_seconds` | ✓ | ✗ | The total duration of the output video in seconds. Supported durations depend on the chosen model: * **`gemini-omni-1.1`**: 3, 4, 5, 6, 7, 8, 9, 10 * **`kling-2.6`**: 5, 10 * **`kling-3.0`**: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * **`ltx-2.3`**: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30 * **`ltx-2.5`**: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60 * **`minimax-h3`**: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30 * **`seedance-1.5`**: 4, 5, 6, 7, 8, 9, 10, 11, 12 * **`seedance-2.0`**: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * **`seedance-2.0-mini`**: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * **`seedance-2.5`**: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 * **`sora-2`**: 4, 8, 12, 24, 36, 48, 60 * **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`veo3.1-lite`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`wan-2.2`**: 3, 4, 5, 6, 7, 8, 9, 10, 15 | `5.0` | -| `audio` | ✗ | ✗ | Whether to include audio in the video. Defaults to `false` if not specified. Audio support varies by model: * **`gemini-omni-1.1`**: Not supported * **`kling-2.6`**: Not supported * **`kling-3.0`**: Toggle-able: audio adds extra credits when enabled * **`ltx-2.3`**: Toggle-able: no additional credits for audio * **`ltx-2.5`**: Toggle-able: no additional credits for audio * **`minimax-h3`**: Toggle-able: no additional credits for audio * **`seedance-1.5`**: Toggle-able: audio adds extra credits when enabled * **`seedance-2.0`**: Toggle-able: no additional credits for audio * **`seedance-2.0-mini`**: Toggle-able: no additional credits for audio * **`seedance-2.5`**: Toggle-able: no additional credits for audio * **`sora-2`**: Toggle-able: no additional credits for audio * **`veo3.1`**: Toggle-able: audio adds extra credits when enabled * **`veo3.1-lite`**: Toggle-able: audio adds extra credits when enabled * **`wan-2.2`**: Not supported | `True` | -| `height` | ✗ | ✓ | `height` is deprecated and no longer influences the output video's resolution. This field is retained only for backward compatibility and will be removed in a future release. | `123` | -| `model` | ✗ | ✗ | The AI model to use for video generation. * `default`: uses our currently recommended model for general use. For paid tiers, defaults to `kling-3.0`. For free tiers, it defaults to `ltx-2.5`. * `gemini-omni-1.1`: Best for precise short clips, first/last frames, and high-resolution output. * `kling-2.6`: Best for action, motion blur, and controlled camera moves. * `kling-3.0`: Best for cinematic stories, references, and optional audio. * `ltx-2.3`: Fastest for general scenes, long clips, audio, and rapid iteration. * `ltx-2.5`: Fastest for general scenes, long clips, audio, and rapid iteration. * `minimax-h3`: Great for reference-driven clips with native audio and longer durations. * `seedance-1.5`: Best for smooth, consistent motion with an end frame. * `seedance-2.0`: Best for reference-led clips with precise subject control. * `seedance-2.0-mini`: Faster reference-led clips with consistent motion and audio. * `seedance-2.5`: Best for premium realism, detail, and natural motion. * `sora-2`: Best for creative concepts and longer clips with audio. * `veo3.1`: Best for romantic interactions and expressive action, with realistic detail. * `veo3.1-lite`: Balanced realism and audio at a lower cost than Veo 3.1. * `wan-2.2`: Best for physical motion, action, and camera movement. If you specify the deprecated model value that includes the `-audio` suffix, this will be the same as included `audio` as `true`. | `"kling-3.0"` | -| `name` | ✗ | ✗ | Give your video a custom name for easy identification. | `"My Image To Video video"` | -| `resolution` | ✗ | ✗ | Controls the output video resolution. Defaults to `720p` on paid tiers and `480p` on free tiers. * **`gemini-omni-1.1`**: Supports 360p, 720p, 1080p, 4k. * **`kling-2.6`**: Supports 720p, 1080p. * **`kling-3.0`**: Supports 720p, 1080p, 4k. * **`ltx-2.3`**: Supports 480p, 720p, 1080p. * **`ltx-2.5`**: Supports 480p, 720p, 1080p. * **`minimax-h3`**: Supports 480p, 720p, 1080p. * **`seedance-1.5`**: Supports 480p, 720p, 1080p. * **`seedance-2.0`**: Supports 480p, 720p. * **`seedance-2.0-mini`**: Supports 480p, 720p. * **`seedance-2.5`**: Supports 480p, 720p. * **`sora-2`**: Supports 720p. * **`veo3.1`**: Supports 720p, 1080p. * **`veo3.1-lite`**: Supports 720p, 1080p. * **`wan-2.2`**: Supports 480p, 720p, 1080p. | `"720p"` | -| `style` | ✗ | ✗ | Attributed used to dictate the style of the output | `{"prompt": "a dog running"}` | -| `└─ high_quality` | ✗ | ✓ | Deprecated: Please use `resolution` instead. For backward compatibility, * `false` maps to 720p resolution * `true` maps to 1080p resolution This field will be removed in a future version. Use the `resolution` field to directly specify the resolution. | `True` | -| `└─ prompt` | ✗ | — | The prompt used for the video. | `"a dog running"` | -| `└─ quality_mode` | ✗ | ✓ | DEPRECATED: Please use `resolution` field instead. For backward compatibility: * `quick` maps to 720p resolution * `studio` maps to 1080p resolution This field will be removed in a future version. Use the `resolution` field to directly to specify the resolution. | `"quick"` | -| `width` | ✗ | ✓ | `width` is deprecated and no longer influences the output video's resolution. This field is retained only for backward compatibility and will be removed in a future release. | `123` | +| Parameter | Required | Deprecated | Description | Example | +| ------------------------ | :------: | :--------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ | +| `assets` | ✓ | ✗ | Provide the assets for image-to-video. Sora 2 only supports images with an aspect ratio of `9:16` or `16:9`. | `{"end_image_file_path": "api-assets/id/1234.png", "image_file_path": "api-assets/id/1234.png"}` | +| `└─ end_image_file_path` | ✗ | — | The image to use as the last frame of the video. * **`gemini-omni-1.1`**: Supports 360p, 720p, 1080p, 4k. * **`kling-2.6`**: Supports 1080p. * **`kling-3.0`**: Supports 720p, 1080p, 4k. * **`ltx-2.3`**: Supports 480p, 720p, 1080p. * **`ltx-2.5`**: Supports 480p, 720p, 1080p. * **`minimax-h3`**: Not supported * **`seedance-1.5`**: Supports 480p, 720p, 1080p. * **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k. * **`seedance-2.0-mini`**: Supports 480p, 720p. * **`seedance-2.5`**: Supports 480p, 720p. * **`sora-2`**: Not supported * **`veo3.1`**: Supports 720p, 1080p. Requires a duration of 8 seconds or less. * **`veo3.1-lite`**: Supports 720p, 1080p. Requires a duration of 8 seconds or less. * **`wan-2.2`**: Not supported * **`wan-3.0`**: Supports 480p, 720p, 1080p. | `"api-assets/id/1234.png"` | +| `└─ image_file_path` | ✓ | — | The path of the image file. 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.png"` | +| `end_seconds` | ✓ | ✗ | The total duration of the output video in seconds. Supported durations depend on the chosen model: * **`gemini-omni-1.1`**: 3, 4, 5, 6, 7, 8, 9, 10 * **`kling-2.6`**: 5, 10 * **`kling-3.0`**: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * **`ltx-2.3`**: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30 * **`ltx-2.5`**: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60 * **`minimax-h3`**: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30 * **`seedance-1.5`**: 4, 5, 6, 7, 8, 9, 10, 11, 12 * **`seedance-2.0`**: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * **`seedance-2.0-mini`**: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * **`seedance-2.5`**: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 * **`sora-2`**: 4, 8, 12, 24, 36, 48, 60 * **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`veo3.1-lite`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`wan-2.2`**: 3, 4, 5, 6, 7, 8, 9, 10, 15 * **`wan-3.0`**: 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30 | `5.0` | +| `audio` | ✗ | ✗ | Whether to include audio in the video. Defaults to `false` if not specified. Audio support varies by model: * **`gemini-omni-1.1`**: Not supported * **`kling-2.6`**: Not supported * **`kling-3.0`**: Toggle-able: audio adds extra credits when enabled * **`ltx-2.3`**: Toggle-able: no additional credits for audio * **`ltx-2.5`**: Toggle-able: no additional credits for audio * **`minimax-h3`**: Toggle-able: no additional credits for audio * **`seedance-1.5`**: Toggle-able: audio adds extra credits when enabled * **`seedance-2.0`**: Toggle-able: no additional credits for audio * **`seedance-2.0-mini`**: Toggle-able: no additional credits for audio * **`seedance-2.5`**: Toggle-able: no additional credits for audio * **`sora-2`**: Toggle-able: no additional credits for audio * **`veo3.1`**: Toggle-able: audio adds extra credits when enabled * **`veo3.1-lite`**: Toggle-able: audio adds extra credits when enabled * **`wan-2.2`**: Not supported * **`wan-3.0`**: Toggle-able: no additional credits for audio | `True` | +| `height` | ✗ | ✓ | `height` is deprecated and no longer influences the output video's resolution. This field is retained only for backward compatibility and will be removed in a future release. | `123` | +| `model` | ✗ | ✗ | The AI model to use for video generation. * `default`: uses our currently recommended model for general use. For paid tiers, defaults to `kling-3.0`. For free tiers, it defaults to `ltx-2.5`. * `gemini-omni-1.1`: Best for precise short clips, first/last frames, and high-resolution output. * `kling-2.6`: Best for action, motion blur, and controlled camera moves. * `kling-3.0`: Best for cinematic stories, references, and optional audio. * `ltx-2.3`: Fastest for general scenes, long clips, audio, and rapid iteration. * `ltx-2.5`: Fastest for general scenes, long clips, audio, and rapid iteration. * `minimax-h3`: Great for reference-driven clips with native audio and longer durations. * `seedance-1.5`: Best for smooth, consistent motion with an end frame. * `seedance-2.0`: Best for reference-led clips with precise subject control. * `seedance-2.0-mini`: Faster reference-led clips with consistent motion and audio. * `seedance-2.5`: Best for premium realism, detail, and natural motion. * `sora-2`: Best for creative concepts and longer clips with audio. * `veo3.1`: Best for romantic interactions and expressive action, with realistic detail. * `veo3.1-lite`: Balanced realism and audio at a lower cost than Veo 3.1. * `wan-2.2`: Best for physical motion, action, and camera movement. * `wan-3.0`: High-quality video with native audio, long clips, and end-frame control. If you specify the deprecated model value that includes the `-audio` suffix, this will be the same as included `audio` as `true`. | `"kling-3.0"` | +| `name` | ✗ | ✗ | Give your video a custom name for easy identification. | `"My Image To Video video"` | +| `resolution` | ✗ | ✗ | Controls the output video resolution. Defaults to `720p` on paid tiers and `480p` on free tiers. * **`gemini-omni-1.1`**: Supports 360p, 720p, 1080p, 4k. * **`kling-2.6`**: Supports 720p, 1080p. * **`kling-3.0`**: Supports 720p, 1080p, 4k. * **`ltx-2.3`**: Supports 480p, 720p, 1080p. * **`ltx-2.5`**: Supports 480p, 720p, 1080p. * **`minimax-h3`**: Supports 480p, 720p, 1080p. * **`seedance-1.5`**: Supports 480p, 720p, 1080p. * **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k. * **`seedance-2.0-mini`**: Supports 480p, 720p. * **`seedance-2.5`**: Supports 480p, 720p. * **`sora-2`**: Supports 720p. * **`veo3.1`**: Supports 720p, 1080p. * **`veo3.1-lite`**: Supports 720p, 1080p. * **`wan-2.2`**: Supports 480p, 720p, 1080p. * **`wan-3.0`**: Supports 480p, 720p, 1080p. | `"720p"` | +| `style` | ✗ | ✗ | Attributed used to dictate the style of the output | `{"prompt": "a dog running"}` | +| `└─ high_quality` | ✗ | ✓ | Deprecated: Please use `resolution` instead. For backward compatibility, * `false` maps to 720p resolution * `true` maps to 1080p resolution This field will be removed in a future version. Use the `resolution` field to directly specify the resolution. | `True` | +| `└─ prompt` | ✗ | — | The prompt used for the video. | `"a dog running"` | +| `└─ quality_mode` | ✗ | ✓ | DEPRECATED: Please use `resolution` field instead. For backward compatibility: * `quick` maps to 720p resolution * `studio` maps to 1080p resolution This field will be removed in a future version. Use the `resolution` field to directly to specify the resolution. | `"quick"` | +| `width` | ✗ | ✓ | `width` is deprecated and no longer influences the output video's resolution. This field is retained only for backward compatibility and will be removed in a future release. | `123` | #### Synchronous Client diff --git a/magic_hour/resources/v1/image_to_video/client.py b/magic_hour/resources/v1/image_to_video/client.py index 1f67405..2d2a16e 100644 --- a/magic_hour/resources/v1/image_to_video/client.py +++ b/magic_hour/resources/v1/image_to_video/client.py @@ -167,6 +167,7 @@ def create( "veo3.1-audio", "veo3.1-lite", "wan-2.2", + "wan-3.0", ] ], type_utils.NotGiven, @@ -234,6 +235,7 @@ def create( * **`veo3.1`**: Toggle-able: audio adds extra credits when enabled * **`veo3.1-lite`**: Toggle-able: audio adds extra credits when enabled * **`wan-2.2`**: Not supported + * **`wan-3.0`**: Toggle-able: no additional credits for audio height: `height` is deprecated and no longer influences the output video's resolution. @@ -255,6 +257,7 @@ def create( * `veo3.1`: Best for romantic interactions and expressive action, with realistic detail. * `veo3.1-lite`: Balanced realism and audio at a lower cost than Veo 3.1. * `wan-2.2`: Best for physical motion, action, and camera movement. + * `wan-3.0`: High-quality video with native audio, long clips, and end-frame control. If you specify the deprecated model value that includes the `-audio` suffix, this will be the same as included `audio` as `true`. name: Give your video a custom name for easy identification. @@ -267,13 +270,14 @@ def create( * **`ltx-2.5`**: Supports 480p, 720p, 1080p. * **`minimax-h3`**: Supports 480p, 720p, 1080p. * **`seedance-1.5`**: Supports 480p, 720p, 1080p. - * **`seedance-2.0`**: Supports 480p, 720p. + * **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k. * **`seedance-2.0-mini`**: Supports 480p, 720p. * **`seedance-2.5`**: Supports 480p, 720p. * **`sora-2`**: Supports 720p. * **`veo3.1`**: Supports 720p, 1080p. * **`veo3.1-lite`**: Supports 720p, 1080p. * **`wan-2.2`**: Supports 480p, 720p, 1080p. + * **`wan-3.0`**: Supports 480p, 720p, 1080p. style: Attributed used to dictate the style of the output width: `width` is deprecated and no longer influences the output video's resolution. @@ -296,6 +300,7 @@ def create( * **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`veo3.1-lite`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`wan-2.2`**: 3, 4, 5, 6, 7, 8, 9, 10, 15 + * **`wan-3.0`**: 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30 request_options: Additional options to customize the HTTP request @@ -491,6 +496,7 @@ async def create( "veo3.1-audio", "veo3.1-lite", "wan-2.2", + "wan-3.0", ] ], type_utils.NotGiven, @@ -558,6 +564,7 @@ async def create( * **`veo3.1`**: Toggle-able: audio adds extra credits when enabled * **`veo3.1-lite`**: Toggle-able: audio adds extra credits when enabled * **`wan-2.2`**: Not supported + * **`wan-3.0`**: Toggle-able: no additional credits for audio height: `height` is deprecated and no longer influences the output video's resolution. @@ -579,6 +586,7 @@ async def create( * `veo3.1`: Best for romantic interactions and expressive action, with realistic detail. * `veo3.1-lite`: Balanced realism and audio at a lower cost than Veo 3.1. * `wan-2.2`: Best for physical motion, action, and camera movement. + * `wan-3.0`: High-quality video with native audio, long clips, and end-frame control. If you specify the deprecated model value that includes the `-audio` suffix, this will be the same as included `audio` as `true`. name: Give your video a custom name for easy identification. @@ -591,13 +599,14 @@ async def create( * **`ltx-2.5`**: Supports 480p, 720p, 1080p. * **`minimax-h3`**: Supports 480p, 720p, 1080p. * **`seedance-1.5`**: Supports 480p, 720p, 1080p. - * **`seedance-2.0`**: Supports 480p, 720p. + * **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k. * **`seedance-2.0-mini`**: Supports 480p, 720p. * **`seedance-2.5`**: Supports 480p, 720p. * **`sora-2`**: Supports 720p. * **`veo3.1`**: Supports 720p, 1080p. * **`veo3.1-lite`**: Supports 720p, 1080p. * **`wan-2.2`**: Supports 480p, 720p, 1080p. + * **`wan-3.0`**: Supports 480p, 720p, 1080p. style: Attributed used to dictate the style of the output width: `width` is deprecated and no longer influences the output video's resolution. @@ -620,6 +629,7 @@ async def create( * **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`veo3.1-lite`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`wan-2.2`**: 3, 4, 5, 6, 7, 8, 9, 10, 15 + * **`wan-3.0`**: 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30 request_options: Additional options to customize the HTTP request diff --git a/magic_hour/resources/v1/saved_items/README.md b/magic_hour/resources/v1/saved_items/README.md new file mode 100644 index 0000000..1f71912 --- /dev/null +++ b/magic_hour/resources/v1/saved_items/README.md @@ -0,0 +1,49 @@ +# v1.saved_items + +## Module Functions + +### List saved items + +Returns active saved items owned by the authenticated account, newest first. Each item includes every saved asset with a durable file_path for reuse in compatible generation APIs and a temporary signed URL for previewing or downloading. Filter by type to find characters, references, voices, moodboards, or brand kits. To fetch the next page, pass the response's next_cursor as cursor. + +**API Endpoint**: `GET /v1/saved-items` + +#### Parameters + +| Parameter | Required | Description | Example | +| --------- | :------: | ------------------------------------------------------------------ | ------------- | +| `cursor` | ✗ | Opaque pagination cursor from the previous response's next_cursor. | `"string"` | +| `limit` | ✗ | Maximum number of saved items to return. Defaults to 20. | `20` | +| `type_` | ✗ | Only return saved items of this type. | `"character"` | + +#### Synchronous Client + +```python +from magic_hour import Client +from os import getenv + +client = Client(token=getenv("API_TOKEN")) +res = client.v1.saved_items.list(limit=20, type_="character") +``` + +#### Asynchronous Client + +```python +from magic_hour import AsyncClient +from os import getenv + +client = AsyncClient(token=getenv("API_TOKEN")) +res = await client.v1.saved_items.list(limit=20, type_="character") +``` + +#### Response + +##### Type + +[V1SavedItemsListResponse](/magic_hour/types/models/v1_saved_items_list_response.py) + +##### Example + +```python +{"items": [{"assets": [{"file_path": "saved-items/user-id/item-id/image.png", "is_primary": True, "media_kind": "IMAGE", "url": "http://www.example.com", "url_expires_at": "2026-09-17T00:00:00.000Z"}], "id": "cuid-example", "name": "Alex", "type_": "character"}], "next_cursor": "string"} +``` diff --git a/magic_hour/resources/v1/saved_items/__init__.py b/magic_hour/resources/v1/saved_items/__init__.py new file mode 100644 index 0000000..2523960 --- /dev/null +++ b/magic_hour/resources/v1/saved_items/__init__.py @@ -0,0 +1,4 @@ +from .client import AsyncSavedItemsClient, SavedItemsClient + + +__all__ = ["AsyncSavedItemsClient", "SavedItemsClient"] diff --git a/magic_hour/resources/v1/saved_items/client.py b/magic_hour/resources/v1/saved_items/client.py new file mode 100644 index 0000000..e9caf15 --- /dev/null +++ b/magic_hour/resources/v1/saved_items/client.py @@ -0,0 +1,190 @@ +import typing +import typing_extensions + +from magic_hour.types import models +from make_api_request import ( + AsyncBaseClient, + QueryParams, + RequestOptions, + SyncBaseClient, + default_request_options, + encode_query_param, + to_encodable, + type_utils, +) + + +class SavedItemsClient: + def __init__(self, *, base_client: SyncBaseClient): + self._base_client = base_client + + def list( + self, + *, + cursor: typing.Union[ + typing.Optional[str], type_utils.NotGiven + ] = type_utils.NOT_GIVEN, + limit: typing.Union[ + typing.Optional[int], type_utils.NotGiven + ] = type_utils.NOT_GIVEN, + type_: typing.Union[ + typing.Optional[ + typing_extensions.Literal[ + "brand_kit", "character", "moodboard", "reference", "voice" + ] + ], + type_utils.NotGiven, + ] = type_utils.NOT_GIVEN, + request_options: typing.Optional[RequestOptions] = None, + ) -> models.V1SavedItemsListResponse: + """ + List saved items + + Returns active saved items owned by the authenticated account, newest first. Each item includes every saved asset with a durable file_path for reuse in compatible generation APIs and a temporary signed URL for previewing or downloading. Filter by type to find characters, references, voices, moodboards, or brand kits. To fetch the next page, pass the response's next_cursor as cursor. + + GET /v1/saved-items + + Args: + cursor: Opaque pagination cursor from the previous response's next_cursor. + limit: Maximum number of saved items to return. Defaults to 20. + type_: Only return saved items of this type. + request_options: Additional options to customize the HTTP request + + Returns: + 200 + + Raises: + ApiError: A custom exception class that provides additional context + for API errors, including the HTTP status code and response body. + + Examples: + ```py + client.v1.saved_items.list(limit=20, type_="character") + ``` + """ + _query: QueryParams = {} + if not isinstance(cursor, type_utils.NotGiven): + encode_query_param( + _query, + "cursor", + to_encodable(item=cursor, dump_with=str), + style="form", + explode=True, + ) + if not isinstance(limit, type_utils.NotGiven): + encode_query_param( + _query, + "limit", + to_encodable(item=limit, dump_with=int), + style="form", + explode=True, + ) + if not isinstance(type_, type_utils.NotGiven): + encode_query_param( + _query, + "type", + to_encodable( + item=type_, + dump_with=typing_extensions.Literal[ + "brand_kit", "character", "moodboard", "reference", "voice" + ], + ), + style="form", + explode=True, + ) + return self._base_client.request( + method="GET", + path="/v1/saved-items", + auth_names=["bearerAuth"], + query_params=_query, + cast_to=models.V1SavedItemsListResponse, + request_options=request_options or default_request_options(), + ) + + +class AsyncSavedItemsClient: + def __init__(self, *, base_client: AsyncBaseClient): + self._base_client = base_client + + async def list( + self, + *, + cursor: typing.Union[ + typing.Optional[str], type_utils.NotGiven + ] = type_utils.NOT_GIVEN, + limit: typing.Union[ + typing.Optional[int], type_utils.NotGiven + ] = type_utils.NOT_GIVEN, + type_: typing.Union[ + typing.Optional[ + typing_extensions.Literal[ + "brand_kit", "character", "moodboard", "reference", "voice" + ] + ], + type_utils.NotGiven, + ] = type_utils.NOT_GIVEN, + request_options: typing.Optional[RequestOptions] = None, + ) -> models.V1SavedItemsListResponse: + """ + List saved items + + Returns active saved items owned by the authenticated account, newest first. Each item includes every saved asset with a durable file_path for reuse in compatible generation APIs and a temporary signed URL for previewing or downloading. Filter by type to find characters, references, voices, moodboards, or brand kits. To fetch the next page, pass the response's next_cursor as cursor. + + GET /v1/saved-items + + Args: + cursor: Opaque pagination cursor from the previous response's next_cursor. + limit: Maximum number of saved items to return. Defaults to 20. + type_: Only return saved items of this type. + request_options: Additional options to customize the HTTP request + + Returns: + 200 + + Raises: + ApiError: A custom exception class that provides additional context + for API errors, including the HTTP status code and response body. + + Examples: + ```py + await client.v1.saved_items.list(limit=20, type_="character") + ``` + """ + _query: QueryParams = {} + if not isinstance(cursor, type_utils.NotGiven): + encode_query_param( + _query, + "cursor", + to_encodable(item=cursor, dump_with=str), + style="form", + explode=True, + ) + if not isinstance(limit, type_utils.NotGiven): + encode_query_param( + _query, + "limit", + to_encodable(item=limit, dump_with=int), + style="form", + explode=True, + ) + if not isinstance(type_, type_utils.NotGiven): + encode_query_param( + _query, + "type", + to_encodable( + item=type_, + dump_with=typing_extensions.Literal[ + "brand_kit", "character", "moodboard", "reference", "voice" + ], + ), + style="form", + explode=True, + ) + return await self._base_client.request( + method="GET", + path="/v1/saved-items", + auth_names=["bearerAuth"], + query_params=_query, + cast_to=models.V1SavedItemsListResponse, + request_options=request_options or default_request_options(), + ) diff --git a/magic_hour/resources/v1/text_to_video/README.md b/magic_hour/resources/v1/text_to_video/README.md index 254f2e2..5ad8a20 100644 --- a/magic_hour/resources/v1/text_to_video/README.md +++ b/magic_hour/resources/v1/text_to_video/README.md @@ -96,18 +96,18 @@ For detailed examples, see the [product page](https://magichour.ai/products/text #### Parameters -| Parameter | Required | Deprecated | Description | Example | -| ----------------- | :------: | :--------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- | -| `end_seconds` | ✓ | ✗ | The total duration of the output video in seconds. Supported durations depend on the chosen model: * **`gemini-omni-1.1`**: 3, 4, 5, 6, 7, 8, 9, 10 * **`kling-2.6`**: 5, 10 * **`kling-3.0`**: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * **`ltx-2.3`**: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30 * **`ltx-2.5`**: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60 * **`minimax-h3`**: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30 * **`seedance-1.5`**: 4, 5, 6, 7, 8, 9, 10, 11, 12 * **`seedance-2.0`**: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * **`seedance-2.0-mini`**: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * **`seedance-2.5`**: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 * **`sora-2`**: 4, 8, 12, 24, 36, 48, 60 * **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`veo3.1-lite`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`wan-2.2`**: 3, 4, 5, 6, 7, 8, 9, 10, 15 | `5.0` | -| `style` | ✓ | ✗ | | `{"prompt": "a dog running"}` | -| `└─ prompt` | ✓ | — | The prompt used for the video. | `"a dog running"` | -| `└─ quality_mode` | ✗ | ✓ | DEPRECATED: Please use `resolution` field instead. For backward compatibility: * `quick` maps to 720p resolution * `studio` maps to 1080p resolution This field will be removed in a future version. Use the `resolution` field to directly to specify the resolution. | `"quick"` | -| `aspect_ratio` | ✗ | ✗ | Determines the aspect ratio of the output video. * **`gemini-omni-1.1`**: Supports 16:9, 9:16. * **`kling-2.6`**: Supports 9:16, 16:9, 1:1. * **`kling-3.0`**: Supports 9:16, 16:9, 1:1. * **`ltx-2.3`**: Supports 9:16, 16:9, 1:1. * **`ltx-2.5`**: Supports 9:16, 16:9, 1:1. * **`minimax-h3`**: Supports 16:9, 9:16, 1:1. * **`seedance-1.5`**: Supports 9:16, 16:9, 1:1. * **`seedance-2.0`**: Supports 9:16, 16:9, 1:1. * **`seedance-2.0-mini`**: Supports 9:16, 16:9, 1:1. * **`seedance-2.5`**: Supports 9:16, 16:9, 1:1. * **`sora-2`**: Supports 9:16, 16:9. * **`veo3.1`**: Supports 9:16, 16:9. * **`veo3.1-lite`**: Supports 9:16, 16:9. * **`wan-2.2`**: Supports 9:16, 16:9, 1:1. | `"16:9"` | -| `audio` | ✗ | ✗ | Whether to include audio in the video. Defaults to `false` if not specified. Audio support varies by model: * **`gemini-omni-1.1`**: Not supported * **`kling-2.6`**: Not supported * **`kling-3.0`**: Toggle-able: audio adds extra credits when enabled * **`ltx-2.3`**: Toggle-able: no additional credits for audio * **`ltx-2.5`**: Toggle-able: no additional credits for audio * **`minimax-h3`**: Toggle-able: no additional credits for audio * **`seedance-1.5`**: Toggle-able: audio adds extra credits when enabled * **`seedance-2.0`**: Toggle-able: no additional credits for audio * **`seedance-2.0-mini`**: Toggle-able: no additional credits for audio * **`seedance-2.5`**: Toggle-able: no additional credits for audio * **`sora-2`**: Toggle-able: no additional credits for audio * **`veo3.1`**: Toggle-able: audio adds extra credits when enabled * **`veo3.1-lite`**: Toggle-able: audio adds extra credits when enabled * **`wan-2.2`**: Not supported | `True` | -| `model` | ✗ | ✗ | The AI model to use for video generation. * `default`: uses our currently recommended model for general use. For paid tiers, defaults to `kling-3.0`. For free tiers, it defaults to `ltx-2.5`. * `gemini-omni-1.1`: Best for precise short clips, first/last frames, and high-resolution output. * `kling-2.6`: Best for action, motion blur, and controlled camera moves. * `kling-3.0`: Best for cinematic stories, references, and optional audio. * `ltx-2.3`: Fastest for general scenes, long clips, audio, and rapid iteration. * `ltx-2.5`: Fastest for general scenes, long clips, audio, and rapid iteration. * `minimax-h3`: Great for reference-driven clips with native audio and longer durations. * `seedance-1.5`: Best for smooth, consistent motion with an end frame. * `seedance-2.0`: Best for reference-led clips with precise subject control. * `seedance-2.0-mini`: Faster reference-led clips with consistent motion and audio. * `seedance-2.5`: Best for premium realism, detail, and natural motion. * `sora-2`: Best for creative concepts and longer clips with audio. * `veo3.1`: Best for romantic interactions and expressive action, with realistic detail. * `veo3.1-lite`: Balanced realism and audio at a lower cost than Veo 3.1. * `wan-2.2`: Best for physical motion, action, and camera movement. If you specify the deprecated model value that includes the `-audio` suffix, this will be the same as included `audio` as `true`. | `"kling-3.0"` | -| `name` | ✗ | ✗ | Give your video a custom name for easy identification. | `"My Text To Video video"` | -| `orientation` | ✗ | ✓ | Deprecated. Use `aspect_ratio` instead. | `"landscape"` | -| `resolution` | ✗ | ✗ | Controls the output video resolution. Defaults to `720p` on paid tiers and `480p` on free tiers. * **`gemini-omni-1.1`**: Supports 360p, 720p, 1080p, 4k. * **`kling-2.6`**: Supports 720p, 1080p. * **`kling-3.0`**: Supports 720p, 1080p, 4k. * **`ltx-2.3`**: Supports 480p, 720p, 1080p. * **`ltx-2.5`**: Supports 480p, 720p, 1080p. * **`minimax-h3`**: Supports 480p, 720p, 1080p. * **`seedance-1.5`**: Supports 480p, 720p, 1080p. * **`seedance-2.0`**: Supports 480p, 720p. * **`seedance-2.0-mini`**: Supports 480p, 720p. * **`seedance-2.5`**: Supports 480p, 720p. * **`sora-2`**: Supports 720p. * **`veo3.1`**: Supports 720p, 1080p. * **`veo3.1-lite`**: Supports 720p, 1080p. * **`wan-2.2`**: Supports 480p, 720p, 1080p. | `"720p"` | +| Parameter | Required | Deprecated | Description | Example | +| ----------------- | :------: | :--------: | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- | +| `end_seconds` | ✓ | ✗ | The total duration of the output video in seconds. Supported durations depend on the chosen model: * **`gemini-omni-1.1`**: 3, 4, 5, 6, 7, 8, 9, 10 * **`kling-2.6`**: 5, 10 * **`kling-3.0`**: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * **`ltx-2.3`**: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30 * **`ltx-2.5`**: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60 * **`minimax-h3`**: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30 * **`seedance-1.5`**: 4, 5, 6, 7, 8, 9, 10, 11, 12 * **`seedance-2.0`**: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * **`seedance-2.0-mini`**: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 * **`seedance-2.5`**: 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 * **`sora-2`**: 4, 8, 12, 24, 36, 48, 60 * **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`veo3.1-lite`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`wan-2.2`**: 3, 4, 5, 6, 7, 8, 9, 10, 15 * **`wan-3.0`**: 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30 | `5.0` | +| `style` | ✓ | ✗ | | `{"prompt": "a dog running"}` | +| `└─ prompt` | ✓ | — | The prompt used for the video. | `"a dog running"` | +| `└─ quality_mode` | ✗ | ✓ | DEPRECATED: Please use `resolution` field instead. For backward compatibility: * `quick` maps to 720p resolution * `studio` maps to 1080p resolution This field will be removed in a future version. Use the `resolution` field to directly to specify the resolution. | `"quick"` | +| `aspect_ratio` | ✗ | ✗ | Determines the aspect ratio of the output video. * **`gemini-omni-1.1`**: Supports 16:9, 9:16. * **`kling-2.6`**: Supports 9:16, 16:9, 1:1. * **`kling-3.0`**: Supports 9:16, 16:9, 1:1. * **`ltx-2.3`**: Supports 9:16, 16:9, 1:1. * **`ltx-2.5`**: Supports 9:16, 16:9, 1:1. * **`minimax-h3`**: Supports 16:9, 9:16, 1:1. * **`seedance-1.5`**: Supports 9:16, 16:9, 1:1. * **`seedance-2.0`**: Supports 9:16, 16:9, 1:1. * **`seedance-2.0-mini`**: Supports 9:16, 16:9, 1:1. * **`seedance-2.5`**: Supports 9:16, 16:9, 1:1. * **`sora-2`**: Supports 9:16, 16:9. * **`veo3.1`**: Supports 9:16, 16:9. * **`veo3.1-lite`**: Supports 9:16, 16:9. * **`wan-2.2`**: Supports 9:16, 16:9, 1:1. * **`wan-3.0`**: Supports 16:9, 9:16, 1:1. | `"16:9"` | +| `audio` | ✗ | ✗ | Whether to include audio in the video. Defaults to `false` if not specified. Audio support varies by model: * **`gemini-omni-1.1`**: Not supported * **`kling-2.6`**: Not supported * **`kling-3.0`**: Toggle-able: audio adds extra credits when enabled * **`ltx-2.3`**: Toggle-able: no additional credits for audio * **`ltx-2.5`**: Toggle-able: no additional credits for audio * **`minimax-h3`**: Toggle-able: no additional credits for audio * **`seedance-1.5`**: Toggle-able: audio adds extra credits when enabled * **`seedance-2.0`**: Toggle-able: no additional credits for audio * **`seedance-2.0-mini`**: Toggle-able: no additional credits for audio * **`seedance-2.5`**: Toggle-able: no additional credits for audio * **`sora-2`**: Toggle-able: no additional credits for audio * **`veo3.1`**: Toggle-able: audio adds extra credits when enabled * **`veo3.1-lite`**: Toggle-able: audio adds extra credits when enabled * **`wan-2.2`**: Not supported * **`wan-3.0`**: Toggle-able: no additional credits for audio | `True` | +| `model` | ✗ | ✗ | The AI model to use for video generation. * `default`: uses our currently recommended model for general use. For paid tiers, defaults to `kling-3.0`. For free tiers, it defaults to `ltx-2.5`. * `gemini-omni-1.1`: Best for precise short clips, first/last frames, and high-resolution output. * `kling-2.6`: Best for action, motion blur, and controlled camera moves. * `kling-3.0`: Best for cinematic stories, references, and optional audio. * `ltx-2.3`: Fastest for general scenes, long clips, audio, and rapid iteration. * `ltx-2.5`: Fastest for general scenes, long clips, audio, and rapid iteration. * `minimax-h3`: Great for reference-driven clips with native audio and longer durations. * `seedance-1.5`: Best for smooth, consistent motion with an end frame. * `seedance-2.0`: Best for reference-led clips with precise subject control. * `seedance-2.0-mini`: Faster reference-led clips with consistent motion and audio. * `seedance-2.5`: Best for premium realism, detail, and natural motion. * `sora-2`: Best for creative concepts and longer clips with audio. * `veo3.1`: Best for romantic interactions and expressive action, with realistic detail. * `veo3.1-lite`: Balanced realism and audio at a lower cost than Veo 3.1. * `wan-2.2`: Best for physical motion, action, and camera movement. * `wan-3.0`: High-quality video with native audio, long clips, and end-frame control. If you specify the deprecated model value that includes the `-audio` suffix, this will be the same as included `audio` as `true`. | `"kling-3.0"` | +| `name` | ✗ | ✗ | Give your video a custom name for easy identification. | `"My Text To Video video"` | +| `orientation` | ✗ | ✓ | Deprecated. Use `aspect_ratio` instead. | `"landscape"` | +| `resolution` | ✗ | ✗ | Controls the output video resolution. Defaults to `720p` on paid tiers and `480p` on free tiers. * **`gemini-omni-1.1`**: Supports 360p, 720p, 1080p, 4k. * **`kling-2.6`**: Supports 720p, 1080p. * **`kling-3.0`**: Supports 720p, 1080p, 4k. * **`ltx-2.3`**: Supports 480p, 720p, 1080p. * **`ltx-2.5`**: Supports 480p, 720p, 1080p. * **`minimax-h3`**: Supports 480p, 720p, 1080p. * **`seedance-1.5`**: Supports 480p, 720p, 1080p. * **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k. * **`seedance-2.0-mini`**: Supports 480p, 720p. * **`seedance-2.5`**: Supports 480p, 720p. * **`sora-2`**: Supports 720p. * **`veo3.1`**: Supports 720p, 1080p. * **`veo3.1-lite`**: Supports 720p, 1080p. * **`wan-2.2`**: Supports 480p, 720p, 1080p. * **`wan-3.0`**: Supports 480p, 720p, 1080p. | `"720p"` | #### Synchronous Client diff --git a/magic_hour/resources/v1/text_to_video/client.py b/magic_hour/resources/v1/text_to_video/client.py index 8f97d34..a6c5a81 100644 --- a/magic_hour/resources/v1/text_to_video/client.py +++ b/magic_hour/resources/v1/text_to_video/client.py @@ -160,6 +160,7 @@ def create( "veo3.1-audio", "veo3.1-lite", "wan-2.2", + "wan-3.0", ] ], type_utils.NotGiven, @@ -226,6 +227,7 @@ def create( * **`veo3.1`**: Supports 9:16, 16:9. * **`veo3.1-lite`**: Supports 9:16, 16:9. * **`wan-2.2`**: Supports 9:16, 16:9, 1:1. + * **`wan-3.0`**: Supports 16:9, 9:16, 1:1. audio: Whether to include audio in the video. Defaults to `false` if not specified. @@ -244,6 +246,7 @@ def create( * **`veo3.1`**: Toggle-able: audio adds extra credits when enabled * **`veo3.1-lite`**: Toggle-able: audio adds extra credits when enabled * **`wan-2.2`**: Not supported + * **`wan-3.0`**: Toggle-able: no additional credits for audio model: The AI model to use for video generation. @@ -262,6 +265,7 @@ def create( * `veo3.1`: Best for romantic interactions and expressive action, with realistic detail. * `veo3.1-lite`: Balanced realism and audio at a lower cost than Veo 3.1. * `wan-2.2`: Best for physical motion, action, and camera movement. + * `wan-3.0`: High-quality video with native audio, long clips, and end-frame control. If you specify the deprecated model value that includes the `-audio` suffix, this will be the same as included `audio` as `true`. name: Give your video a custom name for easy identification. @@ -275,13 +279,14 @@ def create( * **`ltx-2.5`**: Supports 480p, 720p, 1080p. * **`minimax-h3`**: Supports 480p, 720p, 1080p. * **`seedance-1.5`**: Supports 480p, 720p, 1080p. - * **`seedance-2.0`**: Supports 480p, 720p. + * **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k. * **`seedance-2.0-mini`**: Supports 480p, 720p. * **`seedance-2.5`**: Supports 480p, 720p. * **`sora-2`**: Supports 720p. * **`veo3.1`**: Supports 720p, 1080p. * **`veo3.1-lite`**: Supports 720p, 1080p. * **`wan-2.2`**: Supports 480p, 720p, 1080p. + * **`wan-3.0`**: Supports 480p, 720p, 1080p. end_seconds: The total duration of the output video in seconds. Supported durations depend on the chosen model: @@ -299,6 +304,7 @@ def create( * **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`veo3.1-lite`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`wan-2.2`**: 3, 4, 5, 6, 7, 8, 9, 10, 15 + * **`wan-3.0`**: 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30 style: V1TextToVideoCreateBodyStyle request_options: Additional options to customize the HTTP request @@ -481,6 +487,7 @@ async def create( "veo3.1-audio", "veo3.1-lite", "wan-2.2", + "wan-3.0", ] ], type_utils.NotGiven, @@ -547,6 +554,7 @@ async def create( * **`veo3.1`**: Supports 9:16, 16:9. * **`veo3.1-lite`**: Supports 9:16, 16:9. * **`wan-2.2`**: Supports 9:16, 16:9, 1:1. + * **`wan-3.0`**: Supports 16:9, 9:16, 1:1. audio: Whether to include audio in the video. Defaults to `false` if not specified. @@ -565,6 +573,7 @@ async def create( * **`veo3.1`**: Toggle-able: audio adds extra credits when enabled * **`veo3.1-lite`**: Toggle-able: audio adds extra credits when enabled * **`wan-2.2`**: Not supported + * **`wan-3.0`**: Toggle-able: no additional credits for audio model: The AI model to use for video generation. @@ -583,6 +592,7 @@ async def create( * `veo3.1`: Best for romantic interactions and expressive action, with realistic detail. * `veo3.1-lite`: Balanced realism and audio at a lower cost than Veo 3.1. * `wan-2.2`: Best for physical motion, action, and camera movement. + * `wan-3.0`: High-quality video with native audio, long clips, and end-frame control. If you specify the deprecated model value that includes the `-audio` suffix, this will be the same as included `audio` as `true`. name: Give your video a custom name for easy identification. @@ -596,13 +606,14 @@ async def create( * **`ltx-2.5`**: Supports 480p, 720p, 1080p. * **`minimax-h3`**: Supports 480p, 720p, 1080p. * **`seedance-1.5`**: Supports 480p, 720p, 1080p. - * **`seedance-2.0`**: Supports 480p, 720p. + * **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k. * **`seedance-2.0-mini`**: Supports 480p, 720p. * **`seedance-2.5`**: Supports 480p, 720p. * **`sora-2`**: Supports 720p. * **`veo3.1`**: Supports 720p, 1080p. * **`veo3.1-lite`**: Supports 720p, 1080p. * **`wan-2.2`**: Supports 480p, 720p, 1080p. + * **`wan-3.0`**: Supports 480p, 720p, 1080p. end_seconds: The total duration of the output video in seconds. Supported durations depend on the chosen model: @@ -620,6 +631,7 @@ async def create( * **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`veo3.1-lite`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`wan-2.2`**: 3, 4, 5, 6, 7, 8, 9, 10, 15 + * **`wan-3.0`**: 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30 style: V1TextToVideoCreateBodyStyle request_options: Additional options to customize the HTTP request diff --git a/magic_hour/types/models/__init__.py b/magic_hour/types/models/__init__.py index 990fa72..9370384 100644 --- a/magic_hour/types/models/__init__.py +++ b/magic_hour/types/models/__init__.py @@ -56,6 +56,11 @@ from .v1_image_to_video_create_response import V1ImageToVideoCreateResponse from .v1_lip_sync_create_response import V1LipSyncCreateResponse from .v1_photo_colorizer_create_response import V1PhotoColorizerCreateResponse +from .v1_saved_items_list_response import V1SavedItemsListResponse +from .v1_saved_items_list_response_items_item import V1SavedItemsListResponseItemsItem +from .v1_saved_items_list_response_items_item_assets_item import ( + V1SavedItemsListResponseItemsItemAssetsItem, +) from .v1_text_to_video_create_response import V1TextToVideoCreateResponse from .v1_video_projects_get_response import V1VideoProjectsGetResponse from .v1_video_projects_get_response_download import V1VideoProjectsGetResponseDownload @@ -107,6 +112,9 @@ "V1ImageToVideoCreateResponse", "V1LipSyncCreateResponse", "V1PhotoColorizerCreateResponse", + "V1SavedItemsListResponse", + "V1SavedItemsListResponseItemsItem", + "V1SavedItemsListResponseItemsItemAssetsItem", "V1TextToVideoCreateResponse", "V1VideoProjectsGetResponse", "V1VideoProjectsGetResponseDownload", diff --git a/magic_hour/types/models/v1_audio_projects_get_response.py b/magic_hour/types/models/v1_audio_projects_get_response.py index 9691cb6..0ac6559 100644 --- a/magic_hour/types/models/v1_audio_projects_get_response.py +++ b/magic_hour/types/models/v1_audio_projects_get_response.py @@ -77,5 +77,5 @@ class V1AudioProjectsGetResponse(pydantic.BaseModel): alias="type", ) """ - The type of the audio project. Possible values are AUDIO_TRANSLATOR, VOICE_GENERATOR, VOICE_CHANGER, VOICE_CLONER, VIDEO_TO_AUDIO, MUSIC_GENERATOR + The type of the audio project. Possible values are AUDIO_TRANSLATOR, VOICE_GENERATOR, VOICE_CHANGER, VOICE_CLONER, VIDEO_TO_AUDIO, MUSIC_GENERATOR, SOUND_EFFECT_GENERATOR """ diff --git a/magic_hour/types/models/v1_image_projects_get_response.py b/magic_hour/types/models/v1_image_projects_get_response.py index 6d92c51..ce29476 100644 --- a/magic_hour/types/models/v1_image_projects_get_response.py +++ b/magic_hour/types/models/v1_image_projects_get_response.py @@ -89,5 +89,5 @@ class V1ImageProjectsGetResponse(pydantic.BaseModel): alias="type", ) """ - The type of the image project. Possible values are FACE_EDITOR, AI_IMAGE_EDITOR, AI_SELFIE, AI_HEADSHOT, AI_INFLUENCER, AI_IMAGE, AI_MEME, CLOTHES_CHANGER, BACKGROUND_REMOVER, FACE_SWAP, IMAGE_UPSCALER, IMAGE_ENHANCER, AI_GIF, QR_CODE, PHOTO_EDITOR, PHOTO_COLORIZER, IMAGE_COLOR_GRADER, HEAD_SWAP, BODY_SWAP, STORYBOARD, IMAGE_EXPANDER + The type of the image project. Possible values are FACE_EDITOR, AI_IMAGE_EDITOR, GENERATIVE_FILL, AI_SELFIE, AI_HEADSHOT, AI_INFLUENCER, AI_IMAGE, AI_MEME, CLOTHES_CHANGER, BACKGROUND_REMOVER, FACE_SWAP, IMAGE_UPSCALER, IMAGE_ENHANCER, AI_GIF, QR_CODE, PHOTO_EDITOR, PHOTO_COLORIZER, IMAGE_COLOR_GRADER, HEAD_SWAP, BODY_SWAP, STORYBOARD, IMAGE_EXPANDER """ diff --git a/magic_hour/types/models/v1_saved_items_list_response.py b/magic_hour/types/models/v1_saved_items_list_response.py new file mode 100644 index 0000000..232da0f --- /dev/null +++ b/magic_hour/types/models/v1_saved_items_list_response.py @@ -0,0 +1,25 @@ +import pydantic +import typing + +from .v1_saved_items_list_response_items_item import V1SavedItemsListResponseItemsItem + + +class V1SavedItemsListResponse(pydantic.BaseModel): + """ + V1SavedItemsListResponse + """ + + model_config = pydantic.ConfigDict( + arbitrary_types_allowed=True, + populate_by_name=True, + ) + + items: typing.List[V1SavedItemsListResponseItemsItem] = pydantic.Field( + alias="items", + ) + next_cursor: typing.Optional[str] = pydantic.Field( + alias="next_cursor", + ) + """ + Cursor for the next page, or null when there are no more saved items. + """ diff --git a/magic_hour/types/models/v1_saved_items_list_response_items_item.py b/magic_hour/types/models/v1_saved_items_list_response_items_item.py new file mode 100644 index 0000000..9a56f34 --- /dev/null +++ b/magic_hour/types/models/v1_saved_items_list_response_items_item.py @@ -0,0 +1,42 @@ +import pydantic +import typing +import typing_extensions + +from .v1_saved_items_list_response_items_item_assets_item import ( + V1SavedItemsListResponseItemsItemAssetsItem, +) + + +class V1SavedItemsListResponseItemsItem(pydantic.BaseModel): + """ + V1SavedItemsListResponseItemsItem + """ + + model_config = pydantic.ConfigDict( + arbitrary_types_allowed=True, + populate_by_name=True, + ) + + assets: typing.List[V1SavedItemsListResponseItemsItemAssetsItem] = pydantic.Field( + alias="assets", + ) + id: str = pydantic.Field( + alias="id", + ) + """ + Unique ID of the saved item. + """ + name: typing.Optional[str] = pydantic.Field( + alias="name", + ) + """ + User-provided name of the saved item. + """ + type_: typing_extensions.Literal[ + "brand_kit", "character", "moodboard", "reference", "voice" + ] = pydantic.Field( + alias="type", + ) + """ + Saved item type. + """ diff --git a/magic_hour/types/models/v1_saved_items_list_response_items_item_assets_item.py b/magic_hour/types/models/v1_saved_items_list_response_items_item_assets_item.py new file mode 100644 index 0000000..837b073 --- /dev/null +++ b/magic_hour/types/models/v1_saved_items_list_response_items_item_assets_item.py @@ -0,0 +1,44 @@ +import pydantic +import typing_extensions + + +class V1SavedItemsListResponseItemsItemAssetsItem(pydantic.BaseModel): + """ + V1SavedItemsListResponseItemsItemAssetsItem + """ + + model_config = pydantic.ConfigDict( + arbitrary_types_allowed=True, + populate_by_name=True, + ) + + file_path: str = pydantic.Field( + alias="file_path", + ) + """ + Durable asset path. Pass it to a compatible API asset field without uploading it again. + """ + is_primary: bool = pydantic.Field( + alias="is_primary", + ) + """ + Whether this asset is the saved item's primary asset. + """ + media_kind: typing_extensions.Literal["AUDIO", "IMAGE", "VIDEO"] = pydantic.Field( + alias="media_kind", + ) + """ + Media type of the asset. + """ + url: str = pydantic.Field( + alias="url", + ) + """ + Signed URL for previewing or downloading the asset. Expires after 24 hours. + """ + url_expires_at: str = pydantic.Field( + alias="url_expires_at", + ) + """ + When the signed URL expires. The saved asset and file_path do not expire. + """ diff --git a/magic_hour/types/params/v1_image_to_video_create_body.py b/magic_hour/types/params/v1_image_to_video_create_body.py index 32b26be..459e21a 100644 --- a/magic_hour/types/params/v1_image_to_video_create_body.py +++ b/magic_hour/types/params/v1_image_to_video_create_body.py @@ -41,6 +41,7 @@ class V1ImageToVideoCreateBody(typing_extensions.TypedDict): * **`veo3.1`**: Toggle-able: audio adds extra credits when enabled * **`veo3.1-lite`**: Toggle-able: audio adds extra credits when enabled * **`wan-2.2`**: Not supported + * **`wan-3.0`**: Toggle-able: no additional credits for audio """ @@ -62,6 +63,7 @@ class V1ImageToVideoCreateBody(typing_extensions.TypedDict): * **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`veo3.1-lite`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`wan-2.2`**: 3, 4, 5, 6, 7, 8, 9, 10, 15 + * **`wan-3.0`**: 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30 """ @@ -95,6 +97,7 @@ class V1ImageToVideoCreateBody(typing_extensions.TypedDict): "veo3.1-audio", "veo3.1-lite", "wan-2.2", + "wan-3.0", ] ] """ @@ -115,6 +118,7 @@ class V1ImageToVideoCreateBody(typing_extensions.TypedDict): * `veo3.1`: Best for romantic interactions and expressive action, with realistic detail. * `veo3.1-lite`: Balanced realism and audio at a lower cost than Veo 3.1. * `wan-2.2`: Best for physical motion, action, and camera movement. + * `wan-3.0`: High-quality video with native audio, long clips, and end-frame control. If you specify the deprecated model value that includes the `-audio` suffix, this will be the same as included `audio` as `true`. """ @@ -137,13 +141,14 @@ class V1ImageToVideoCreateBody(typing_extensions.TypedDict): * **`ltx-2.5`**: Supports 480p, 720p, 1080p. * **`minimax-h3`**: Supports 480p, 720p, 1080p. * **`seedance-1.5`**: Supports 480p, 720p, 1080p. - * **`seedance-2.0`**: Supports 480p, 720p. + * **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k. * **`seedance-2.0-mini`**: Supports 480p, 720p. * **`seedance-2.5`**: Supports 480p, 720p. * **`sora-2`**: Supports 720p. * **`veo3.1`**: Supports 720p, 1080p. * **`veo3.1-lite`**: Supports 720p, 1080p. * **`wan-2.2`**: Supports 480p, 720p, 1080p. + * **`wan-3.0`**: Supports 480p, 720p, 1080p. """ @@ -201,6 +206,7 @@ class _SerializerV1ImageToVideoCreateBody(pydantic.BaseModel): "veo3.1-audio", "veo3.1-lite", "wan-2.2", + "wan-3.0", ] ] = pydantic.Field(alias="model", default=None) name: typing.Optional[str] = pydantic.Field(alias="name", default=None) diff --git a/magic_hour/types/params/v1_image_to_video_create_body_assets.py b/magic_hour/types/params/v1_image_to_video_create_body_assets.py index 60f544e..f839082 100644 --- a/magic_hour/types/params/v1_image_to_video_create_body_assets.py +++ b/magic_hour/types/params/v1_image_to_video_create_body_assets.py @@ -19,13 +19,14 @@ class V1ImageToVideoCreateBodyAssets(typing_extensions.TypedDict): * **`ltx-2.5`**: Supports 480p, 720p, 1080p. * **`minimax-h3`**: Not supported * **`seedance-1.5`**: Supports 480p, 720p, 1080p. - * **`seedance-2.0`**: Supports 480p, 720p. + * **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k. * **`seedance-2.0-mini`**: Supports 480p, 720p. * **`seedance-2.5`**: Supports 480p, 720p. * **`sora-2`**: Not supported * **`veo3.1`**: Supports 720p, 1080p. Requires a duration of 8 seconds or less. * **`veo3.1-lite`**: Supports 720p, 1080p. Requires a duration of 8 seconds or less. * **`wan-2.2`**: Not supported + * **`wan-3.0`**: Supports 480p, 720p, 1080p. """ diff --git a/magic_hour/types/params/v1_text_to_video_create_body.py b/magic_hour/types/params/v1_text_to_video_create_body.py index 64c3c13..c937dc7 100644 --- a/magic_hour/types/params/v1_text_to_video_create_body.py +++ b/magic_hour/types/params/v1_text_to_video_create_body.py @@ -33,6 +33,7 @@ class V1TextToVideoCreateBody(typing_extensions.TypedDict): * **`veo3.1`**: Supports 9:16, 16:9. * **`veo3.1-lite`**: Supports 9:16, 16:9. * **`wan-2.2`**: Supports 9:16, 16:9, 1:1. + * **`wan-3.0`**: Supports 16:9, 9:16, 1:1. """ @@ -55,6 +56,7 @@ class V1TextToVideoCreateBody(typing_extensions.TypedDict): * **`veo3.1`**: Toggle-able: audio adds extra credits when enabled * **`veo3.1-lite`**: Toggle-able: audio adds extra credits when enabled * **`wan-2.2`**: Not supported + * **`wan-3.0`**: Toggle-able: no additional credits for audio """ @@ -76,6 +78,7 @@ class V1TextToVideoCreateBody(typing_extensions.TypedDict): * **`veo3.1`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`veo3.1-lite`**: 4, 6, 8, 16, 24, 32, 40, 48, 56 * **`wan-2.2`**: 3, 4, 5, 6, 7, 8, 9, 10, 15 + * **`wan-3.0`**: 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 25, 30 """ @@ -102,6 +105,7 @@ class V1TextToVideoCreateBody(typing_extensions.TypedDict): "veo3.1-audio", "veo3.1-lite", "wan-2.2", + "wan-3.0", ] ] """ @@ -122,6 +126,7 @@ class V1TextToVideoCreateBody(typing_extensions.TypedDict): * `veo3.1`: Best for romantic interactions and expressive action, with realistic detail. * `veo3.1-lite`: Balanced realism and audio at a lower cost than Veo 3.1. * `wan-2.2`: Best for physical motion, action, and camera movement. + * `wan-3.0`: High-quality video with native audio, long clips, and end-frame control. If you specify the deprecated model value that includes the `-audio` suffix, this will be the same as included `audio` as `true`. """ @@ -151,13 +156,14 @@ class V1TextToVideoCreateBody(typing_extensions.TypedDict): * **`ltx-2.5`**: Supports 480p, 720p, 1080p. * **`minimax-h3`**: Supports 480p, 720p, 1080p. * **`seedance-1.5`**: Supports 480p, 720p, 1080p. - * **`seedance-2.0`**: Supports 480p, 720p. + * **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k. * **`seedance-2.0-mini`**: Supports 480p, 720p. * **`seedance-2.5`**: Supports 480p, 720p. * **`sora-2`**: Supports 720p. * **`veo3.1`**: Supports 720p, 1080p. * **`veo3.1-lite`**: Supports 720p, 1080p. * **`wan-2.2`**: Supports 480p, 720p, 1080p. + * **`wan-3.0`**: Supports 480p, 720p, 1080p. """ @@ -204,6 +210,7 @@ class _SerializerV1TextToVideoCreateBody(pydantic.BaseModel): "veo3.1-audio", "veo3.1-lite", "wan-2.2", + "wan-3.0", ] ] = pydantic.Field(alias="model", default=None) name: typing.Optional[str] = pydantic.Field(alias="name", default=None) diff --git a/pyproject.toml b/pyproject.toml index ae4d0db..91c5fc5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "magic_hour" -version = "0.81.0" +version = "0.82.0" description = "Python SDK for Magic Hour API" readme = "README.md" authors = [] diff --git a/tests/test_v1_saved_items_client.py b/tests/test_v1_saved_items_client.py new file mode 100644 index 0000000..4de0ce4 --- /dev/null +++ b/tests/test_v1_saved_items_client.py @@ -0,0 +1,126 @@ +import pydantic +import pytest + +from magic_hour import AsyncClient, Client +from magic_hour.environment import Environment +from magic_hour.types import models + + +def test_list_200_success_required_only() -> None: + """Tests a GET request to the /v1/saved-items endpoint. + + Operation: list + Test Case ID: success_required_only + Expected Status: 200 + Mode: Synchronous execution + + Response : models.V1SavedItemsListResponse + + Validates: + - Authentication requirements are satisfied + - All required input parameters are properly handled + - Response status code is correct + - Response data matches expected schema + + This test uses example data to verify the endpoint behavior. + """ + # tests calling sync method with example data + client = Client(token="API_TOKEN", environment=Environment.MOCK_SERVER) + response = client.v1.saved_items.list(limit=20, type_="character") + try: + pydantic.TypeAdapter(models.V1SavedItemsListResponse).validate_python(response) + is_valid_response_schema = True + except pydantic.ValidationError: + is_valid_response_schema = False + assert is_valid_response_schema, "failed response type check" + + +@pytest.mark.asyncio +async def test_await_list_200_success_required_only() -> None: + """Tests a GET request to the /v1/saved-items endpoint. + + Operation: list + Test Case ID: success_required_only + Expected Status: 200 + Mode: Asynchronous execution + + Response : models.V1SavedItemsListResponse + + Validates: + - Authentication requirements are satisfied + - All required input parameters are properly handled + - Response status code is correct + - Response data matches expected schema + + This test uses example data to verify the endpoint behavior. + """ + # tests calling async method with example data + client = AsyncClient(token="API_TOKEN", environment=Environment.MOCK_SERVER) + response = await client.v1.saved_items.list(limit=20, type_="character") + try: + pydantic.TypeAdapter(models.V1SavedItemsListResponse).validate_python(response) + is_valid_response_schema = True + except pydantic.ValidationError: + is_valid_response_schema = False + assert is_valid_response_schema, "failed response type check" + + +def test_list_200_success_all_params() -> None: + """Tests a GET request to the /v1/saved-items endpoint. + + Operation: list + Test Case ID: success_all_params + Expected Status: 200 + Mode: Synchronous execution + + Response : models.V1SavedItemsListResponse + + Validates: + - Authentication requirements are satisfied + - All required input parameters are properly handled + - Response status code is correct + - Response data matches expected schema + + This test uses example data to verify the endpoint behavior. + """ + # tests calling sync method with example data + client = Client(token="API_TOKEN", environment=Environment.MOCK_SERVER) + response = client.v1.saved_items.list(cursor="string", limit=20, type_="character") + try: + pydantic.TypeAdapter(models.V1SavedItemsListResponse).validate_python(response) + is_valid_response_schema = True + except pydantic.ValidationError: + is_valid_response_schema = False + assert is_valid_response_schema, "failed response type check" + + +@pytest.mark.asyncio +async def test_await_list_200_success_all_params() -> None: + """Tests a GET request to the /v1/saved-items endpoint. + + Operation: list + Test Case ID: success_all_params + Expected Status: 200 + Mode: Asynchronous execution + + Response : models.V1SavedItemsListResponse + + Validates: + - Authentication requirements are satisfied + - All required input parameters are properly handled + - Response status code is correct + - Response data matches expected schema + + This test uses example data to verify the endpoint behavior. + """ + # tests calling async method with example data + client = AsyncClient(token="API_TOKEN", environment=Environment.MOCK_SERVER) + response = await client.v1.saved_items.list( + cursor="string", limit=20, type_="character" + ) + try: + pydantic.TypeAdapter(models.V1SavedItemsListResponse).validate_python(response) + is_valid_response_schema = True + except pydantic.ValidationError: + is_valid_response_schema = False + assert is_valid_response_schema, "failed response type check"