diff --git a/.sdk.json b/.sdk.json
index 346e846..346bd23 100644
--- a/.sdk.json
+++ b/.sdk.json
@@ -1,5 +1,5 @@
{
- "id": "de9029f9-c66c-4ce9-b593-ff39bda797e9",
+ "id": "824c8e76-3377-4969-99f1-7054db429172",
"tracked_paths": [
{
"editable": true,
@@ -173,6 +173,18 @@
"editable": true,
"path": "magic_hour/resources/v1/ai_video_editor/client.py"
},
+ {
+ "editable": true,
+ "path": "magic_hour/resources/v1/ai_video_translator/README.md"
+ },
+ {
+ "editable": true,
+ "path": "magic_hour/resources/v1/ai_video_translator/__init__.py"
+ },
+ {
+ "editable": true,
+ "path": "magic_hour/resources/v1/ai_video_translator/client.py"
+ },
{
"editable": true,
"path": "magic_hour/resources/v1/ai_voice_cloner/README.md"
@@ -517,6 +529,10 @@
"editable": false,
"path": "magic_hour/types/models/v1_ai_video_editor_create_response.py"
},
+ {
+ "editable": false,
+ "path": "magic_hour/types/models/v1_ai_video_translator_create_response.py"
+ },
{
"editable": false,
"path": "magic_hour/types/models/v1_ai_voice_cloner_create_response.py"
@@ -769,6 +785,14 @@
"editable": false,
"path": "magic_hour/types/params/v1_ai_video_editor_create_body_style.py"
},
+ {
+ "editable": false,
+ "path": "magic_hour/types/params/v1_ai_video_translator_create_body.py"
+ },
+ {
+ "editable": false,
+ "path": "magic_hour/types/params/v1_ai_video_translator_create_body_assets.py"
+ },
{
"editable": false,
"path": "magic_hour/types/params/v1_ai_voice_cloner_create_body.py"
@@ -1021,6 +1045,10 @@
"editable": false,
"path": "tests/test_v1_ai_video_editor_client.py"
},
+ {
+ "editable": false,
+ "path": "tests/test_v1_ai_video_translator_client.py"
+ },
{
"editable": false,
"path": "tests/test_v1_ai_voice_cloner_client.py"
diff --git a/README.md b/README.md
index fb02f07..db078b3 100644
--- a/README.md
+++ b/README.md
@@ -222,6 +222,10 @@ download_urls = result.downloads
- [create](magic_hour/resources/v1/ai_video_editor/README.md#create) - AI Video Editor
- [generate](magic_hour/resources/v1/ai_video_editor/README.md#generate) - AI Video Editor Generate Workflow
+### [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
+
### [v1.ai_voice_cloner](magic_hour/resources/v1/ai_voice_cloner/README.md)
- [create](magic_hour/resources/v1/ai_voice_cloner/README.md#create) - AI Voice Cloner
diff --git a/magic_hour/README.md b/magic_hour/README.md
index b1f62bb..b838b76 100644
--- a/magic_hour/README.md
+++ b/magic_hour/README.md
@@ -14,6 +14,7 @@
- [ai_qr_code_generator](resources/v1/ai_qr_code_generator/README.md) - ai_qr_code_generator
- [ai_talking_photo](resources/v1/ai_talking_photo/README.md) - ai_talking_photo
- [ai_video_editor](resources/v1/ai_video_editor/README.md) - ai_video_editor
+- [ai_video_translator](resources/v1/ai_video_translator/README.md) - ai_video_translator
- [ai_voice_cloner](resources/v1/ai_voice_cloner/README.md) - ai_voice_cloner
- [ai_voice_generator](resources/v1/ai_voice_generator/README.md) - ai_voice_generator
- [animation](resources/v1/animation/README.md) - animation
diff --git a/magic_hour/environment.py b/magic_hour/environment.py
index 370ca11..a67aac0 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.83.0"
+ MOCK_SERVER = "https://api.sideko.dev/v1/mock/magichour/magic-hour/0.84.0"
def _get_base_url(
diff --git a/magic_hour/resources/v1/README.md b/magic_hour/resources/v1/README.md
index 5b08e31..dbd4948 100644
--- a/magic_hour/resources/v1/README.md
+++ b/magic_hour/resources/v1/README.md
@@ -14,6 +14,7 @@
- [ai_qr_code_generator](ai_qr_code_generator/README.md) - ai_qr_code_generator
- [ai_talking_photo](ai_talking_photo/README.md) - ai_talking_photo
- [ai_video_editor](ai_video_editor/README.md) - ai_video_editor
+- [ai_video_translator](ai_video_translator/README.md) - ai_video_translator
- [ai_voice_cloner](ai_voice_cloner/README.md) - ai_voice_cloner
- [ai_voice_generator](ai_voice_generator/README.md) - ai_voice_generator
- [animation](animation/README.md) - animation
diff --git a/magic_hour/resources/v1/ai_image_generator/README.md b/magic_hour/resources/v1/ai_image_generator/README.md
index f9574bd..108e0de 100644
--- a/magic_hour/resources/v1/ai_image_generator/README.md
+++ b/magic_hour/resources/v1/ai_image_generator/README.md
@@ -86,7 +86,7 @@ Create an AI image with advanced model selection and quality controls.
| `model` | ✗ | ✗ | The AI model to use for image generation. Each model has different capabilities and costs. **Models:** - `default` - Use the model we recommend, which will change over time. This is recommended unless you need a specific model. This is the default behavior. - `flux-2-klein` - from 5 credits/image - Supported resolutions: 640px, 1k, 2k - Available for tiers: free, creator, pro, business - Image count allowed: 1 - `flux-schnell` - from 5 credits/image - Supported resolutions: 640px, 1k, 2k - Available for tiers: free, creator, pro, business - Image count allowed: 1, 2, 3, 4 - `gpt-image-2` - from 50 credits/image - Supported resolutions: 640px, 1k, 2k, 4k - Available for tiers: creator, pro, business - Image count allowed: 1, 2, 3, 4 - `gpt-image-2.5-flare` - from 100 credits/image - Supported resolutions: 640px, 1k, 2k, 4k - Available for tiers: creator, pro, business - Image count allowed: 1, 2, 3, 4 - `krea-2` - from 10 credits/image - Supported resolutions: 640px, 1k - Available for tiers: free, creator, pro, business - Image count allowed: 1 - `nano-banana` - from 50 credits/image - Supported resolutions: 640px, 1k - Available for tiers: creator, pro, business - Image count allowed: 1, 2, 3, 4 - `nano-banana-2` - from 100 credits/image - Supported resolutions: 640px, 1k, 2k, 4k - Available for tiers: creator, pro, business - Image count allowed: 1, 4, 9, 16 - `nano-banana-2-lite` - from 50 credits/image - Supported resolutions: 640px, 1k - Available for tiers: creator, pro, business - Image count allowed: 1, 2, 3, 4 - `nano-banana-pro` - from 150 credits/image - Supported resolutions: 1k, 2k, 4k - Available for tiers: creator, pro, business - Image count allowed: 1, 4, 9, 16 - `seedream-v4` - from 40 credits/image - Supported resolutions: 640px, 1k, 2k, 4k - Available for tiers: creator, pro, business - Image count allowed: 1, 2, 3, 4 - `seedream-v5-pro` - from 75 credits/image - Supported resolutions: 640px, 1k, 2k - Available for tiers: creator, pro, business - Image count allowed: 1, 2, 3, 4 - `z-image-turbo` - from 5 credits/image - Supported resolutions: 640px, 1k, 2k - Available for tiers: free, creator, pro, business - Image count allowed: 1, 2, 3, 4 **Deprecated Enum Values:** - `seedream` - Use `seedream-v4` instead. | `"default"` |
| `name` | ✗ | ✗ | Give your image a custom name for easy identification. | `"My Ai Image image"` |
| `orientation` | ✗ | ✓ | DEPRECATED: Use `aspect_ratio` instead. The orientation of the output image(s). `aspect_ratio` takes precedence when `orientation` if both are provided. | `"landscape"` |
-| `resolution` | ✗ | ✗ | Maximum resolution (longest edge) for the output image. **Options:** - `640px` — up to 640px - `1k` — up to 1024px - `2k` — up to 2048px - `4k` — up to 4096px - `auto` — **Deprecated.** Mapped server-side from your subscription tier to the best matching resolution the model supports **Per-model support:** - `flux-2-klein` - 640px, 1k, 2k - `flux-schnell` - 640px, 1k, 2k - `gpt-image-2` - 640px, 1k, 2k, 4k - `gpt-image-2.5-flare` - 640px, 1k, 2k, 4k - `krea-2` - 640px, 1k - `nano-banana` - 640px, 1k - `nano-banana-2` - 640px, 1k, 2k, 4k - `nano-banana-2-lite` - 640px, 1k - `nano-banana-pro` - 1k, 2k, 4k - `seedream-v4` - 640px, 1k, 2k, 4k - `seedream-v5-pro` - 640px, 1k, 2k - `z-image-turbo` - 640px, 1k, 2k Note: Resolution availability depends on the model and your subscription tier. | `"auto"` |
+| `resolution` | ✗ | ✗ | Maximum resolution (longest edge) for the output image. **Options:** - `640px` — up to 640px - `1k` — up to 1024px - `2k` — up to 2048px - `4k` — up to 4096px - `auto` — **Deprecated.** Mapped server-side from your subscription tier to the best matching resolution the model supports **Per-model support:** - `flux-2-klein` - 640px, 1k, 2k - `flux-schnell` - 640px, 1k, 2k - `gpt-image-2` - 640px, 1k, 2k, 4k - `gpt-image-2.5-flare` - 640px, 1k, 2k, 4k - `krea-2` - 640px, 1k - `nano-banana` - 640px, 1k - `nano-banana-2` - 640px, 1k, 2k, 4k - `nano-banana-2-lite` - 640px, 1k - `nano-banana-pro` - 1k, 2k, 4k - `seedream-v4` - 640px, 1k, 2k, 4k - `seedream-v5-pro` - 640px, 1k, 2k - `z-image-turbo` - 640px, 1k, 2k Note: Resolution availability depends on the model and your subscription tier. | `"1k"` |
#### Synchronous Client
@@ -101,7 +101,7 @@ res = client.v1.ai_image_generator.create(
aspect_ratio="1:1",
model="default",
name="My Ai Image image",
- resolution="auto",
+ resolution="1k",
)
```
@@ -118,7 +118,7 @@ res = await client.v1.ai_image_generator.create(
aspect_ratio="1:1",
model="default",
name="My Ai Image image",
- resolution="auto",
+ resolution="1k",
)
```
diff --git a/magic_hour/resources/v1/ai_image_generator/client.py b/magic_hour/resources/v1/ai_image_generator/client.py
index d1138f5..fe7b1a6 100644
--- a/magic_hour/resources/v1/ai_image_generator/client.py
+++ b/magic_hour/resources/v1/ai_image_generator/client.py
@@ -288,7 +288,7 @@ def create(
aspect_ratio="1:1",
model="default",
name="My Ai Image image",
- resolution="auto",
+ resolution="1k",
)
```
"""
@@ -581,7 +581,7 @@ async def create(
aspect_ratio="1:1",
model="default",
name="My Ai Image image",
- resolution="auto",
+ resolution="1k",
)
```
"""
diff --git a/magic_hour/resources/v1/ai_video_translator/README.md b/magic_hour/resources/v1/ai_video_translator/README.md
new file mode 100644
index 0000000..5413cdd
--- /dev/null
+++ b/magic_hour/resources/v1/ai_video_translator/README.md
@@ -0,0 +1,113 @@
+# v1.ai_video_translator
+
+## Module Functions
+
+
+
+### Generate video translation
+
+`generate` uploads a local video, creates a translation job, waits for completion, and downloads the output. `assets.video_file_path` also accepts a URL or previously uploaded `api-assets` path. Set `wait_for_completion=False` or `download_outputs=False` to skip either step.
+
+```python
+from magic_hour import Client
+
+client = Client(token="YOUR_API_TOKEN")
+res = client.v1.ai_video_translator.generate(
+ assets={"video_file_path": "/path/to/video.mp4"},
+ end_seconds=15.0,
+ target_language="Spanish",
+ start_seconds=0.0,
+)
+```
+
+Async clients support the same arguments with `await client.v1.ai_video_translator.generate(...)`.
+
+
+
+### AI Video Translator
+
+**What this API does**
+
+Create the same Video Translator you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to your own app or workflow.
+
+**Good for**
+
+- Automation and batch processing
+- Adding video translator into apps, pipelines, or tools
+
+**How it works (3 steps)**
+
+1. Upload your inputs (video, image, or audio) with [Generate Upload URLs](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls) and copy the `file_path`.
+2. Send a request to create a video translator job with the basic fields.
+3. Check the job status until it's `complete`, then download the result from `downloads`.
+
+**Key options**
+
+- Inputs: usually a file, sometimes a YouTube link, depending on project type
+- Resolution: free users are limited to 576px; higher plans unlock HD and larger sizes
+- Extra fields: e.g. `face_swap_mode`, `start_seconds`/`end_seconds`, or a text prompt
+
+**Cost**\
+Credits are only charged for the frames that actually render. You'll see an estimate when the job is queued, and the final total after it's done.
+
+For detailed examples, see the [product page](https://magichour.ai/products/ai-video-translator).
+
+**API Endpoint**: `POST /v1/ai-video-translator`
+
+#### Parameters
+
+| Parameter | Required | Description | Example |
+| -------------------- | :------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------- |
+| `assets` | ✓ | Source video for the translation job. | `{"video_file_path": "api-assets/id/1234.mp4"}` |
+| `└─ video_file_path` | ✓ | Source video containing the speech to translate. 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. The clip must be 1-30 seconds long. | `15.0` |
+| `target_language` | ✓ | Language to translate the video's speech into. | `"Spanish"` |
+| `name` | ✗ | Give your video a custom name for easy identification. | `"My Video Translator video"` |
+| `resolution` | ✗ | Output video resolution. Defaults to 480p. 720p and 1080p require a paid plan. | `"720p"` |
+| `start_seconds` | ✗ | Start time of your clip (seconds). Must be ≥ 0. | `0.0` |
+
+#### Synchronous Client
+
+```python
+from magic_hour import Client
+from os import getenv
+
+client = Client(token=getenv("API_TOKEN"))
+res = client.v1.ai_video_translator.create(
+ assets={"video_file_path": "api-assets/id/1234.mp4"},
+ end_seconds=15.0,
+ target_language="Spanish",
+ name="My Video Translator video",
+ resolution="720p",
+ start_seconds=0.0,
+)
+```
+
+#### Asynchronous Client
+
+```python
+from magic_hour import AsyncClient
+from os import getenv
+
+client = AsyncClient(token=getenv("API_TOKEN"))
+res = await client.v1.ai_video_translator.create(
+ assets={"video_file_path": "api-assets/id/1234.mp4"},
+ end_seconds=15.0,
+ target_language="Spanish",
+ name="My Video Translator video",
+ resolution="720p",
+ start_seconds=0.0,
+)
+```
+
+#### Response
+
+##### Type
+
+[V1AiVideoTranslatorCreateResponse](/magic_hour/types/models/v1_ai_video_translator_create_response.py)
+
+##### Example
+
+```python
+{"credits_charged": 450, "estimated_frame_cost": 123, "id": "cuid-example"}
+```
diff --git a/magic_hour/resources/v1/ai_video_translator/__init__.py b/magic_hour/resources/v1/ai_video_translator/__init__.py
new file mode 100644
index 0000000..eab990e
--- /dev/null
+++ b/magic_hour/resources/v1/ai_video_translator/__init__.py
@@ -0,0 +1,4 @@
+from .client import AiVideoTranslatorClient, AsyncAiVideoTranslatorClient
+
+
+__all__ = ["AiVideoTranslatorClient", "AsyncAiVideoTranslatorClient"]
diff --git a/magic_hour/resources/v1/ai_video_translator/client.py b/magic_hour/resources/v1/ai_video_translator/client.py
new file mode 100644
index 0000000..b2f53f1
--- /dev/null
+++ b/magic_hour/resources/v1/ai_video_translator/client.py
@@ -0,0 +1,531 @@
+import typing
+import typing_extensions
+
+from magic_hour.helpers.logger import get_sdk_logger
+from magic_hour.resources.v1.files.client import AsyncFilesClient, FilesClient
+from magic_hour.resources.v1.video_projects.client import (
+ AsyncVideoProjectsClient,
+ VideoProjectsClient,
+)
+from magic_hour.types import models, params
+from make_api_request import (
+ AsyncBaseClient,
+ RequestOptions,
+ SyncBaseClient,
+ default_request_options,
+ to_encodable,
+ type_utils,
+)
+
+
+logger = get_sdk_logger(__name__)
+
+
+class AiVideoTranslatorClient:
+ def __init__(self, *, base_client: SyncBaseClient):
+ self._base_client = base_client
+
+ def generate(
+ self,
+ *,
+ assets: params.V1AiVideoTranslatorGenerateBodyAssets,
+ end_seconds: float,
+ target_language: typing_extensions.Literal[
+ "Afrikaans",
+ "Arabic",
+ "Bengali",
+ "Bulgarian",
+ "Catalan",
+ "Chinese (Simplified)",
+ "Chinese (Traditional)",
+ "Croatian",
+ "Czech",
+ "Danish",
+ "Dutch",
+ "English",
+ "Estonian",
+ "Finnish",
+ "French",
+ "German",
+ "Greek",
+ "Gujarati",
+ "Hebrew",
+ "Hindi",
+ "Hungarian",
+ "Indonesian",
+ "Italian",
+ "Japanese",
+ "Kannada",
+ "Kazakh",
+ "Korean",
+ "Latvian",
+ "Lithuanian",
+ "Malay",
+ "Malayalam",
+ "Marathi",
+ "Norwegian",
+ "Persian",
+ "Polish",
+ "Portuguese",
+ "Punjabi",
+ "Romanian",
+ "Russian",
+ "Serbian",
+ "Slovak",
+ "Slovenian",
+ "Spanish",
+ "Swahili",
+ "Swedish",
+ "Tamil",
+ "Telugu",
+ "Thai",
+ "Turkish",
+ "Ukrainian",
+ "Urdu",
+ "Vietnamese",
+ "Welsh",
+ ],
+ name: typing.Union[
+ typing.Optional[str], type_utils.NotGiven
+ ] = type_utils.NOT_GIVEN,
+ resolution: typing.Union[
+ typing.Optional[typing_extensions.Literal["1080p", "480p", "720p"]],
+ type_utils.NotGiven,
+ ] = type_utils.NOT_GIVEN,
+ start_seconds: typing.Union[
+ typing.Optional[float], type_utils.NotGiven
+ ] = type_utils.NOT_GIVEN,
+ wait_for_completion: bool = True,
+ download_outputs: bool = True,
+ download_directory: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ):
+ """Upload a video, create a translation job, and optionally wait and download.
+
+ ``assets["video_file_path"]`` accepts a local path, URL, or uploaded asset path.
+ """
+ uploaded_assets: params.V1AiVideoTranslatorCreateBodyAssets = {
+ "video_file_path": FilesClient(base_client=self._base_client).upload_file(
+ file=assets["video_file_path"]
+ ),
+ }
+ create_response = self.create(
+ assets=uploaded_assets,
+ end_seconds=end_seconds,
+ target_language=target_language,
+ name=name,
+ resolution=resolution,
+ start_seconds=start_seconds,
+ request_options=request_options,
+ )
+ logger.info(f"AI Video Translator response: {create_response}")
+ return VideoProjectsClient(base_client=self._base_client).check_result(
+ id=create_response.id,
+ wait_for_completion=wait_for_completion,
+ download_outputs=download_outputs,
+ download_directory=download_directory,
+ )
+
+ def create(
+ self,
+ *,
+ assets: params.V1AiVideoTranslatorCreateBodyAssets,
+ end_seconds: float,
+ target_language: typing_extensions.Literal[
+ "Afrikaans",
+ "Arabic",
+ "Bengali",
+ "Bulgarian",
+ "Catalan",
+ "Chinese (Simplified)",
+ "Chinese (Traditional)",
+ "Croatian",
+ "Czech",
+ "Danish",
+ "Dutch",
+ "English",
+ "Estonian",
+ "Finnish",
+ "French",
+ "German",
+ "Greek",
+ "Gujarati",
+ "Hebrew",
+ "Hindi",
+ "Hungarian",
+ "Indonesian",
+ "Italian",
+ "Japanese",
+ "Kannada",
+ "Kazakh",
+ "Korean",
+ "Latvian",
+ "Lithuanian",
+ "Malay",
+ "Malayalam",
+ "Marathi",
+ "Norwegian",
+ "Persian",
+ "Polish",
+ "Portuguese",
+ "Punjabi",
+ "Romanian",
+ "Russian",
+ "Serbian",
+ "Slovak",
+ "Slovenian",
+ "Spanish",
+ "Swahili",
+ "Swedish",
+ "Tamil",
+ "Telugu",
+ "Thai",
+ "Turkish",
+ "Ukrainian",
+ "Urdu",
+ "Vietnamese",
+ "Welsh",
+ ],
+ name: typing.Union[
+ typing.Optional[str], type_utils.NotGiven
+ ] = type_utils.NOT_GIVEN,
+ resolution: typing.Union[
+ typing.Optional[typing_extensions.Literal["1080p", "480p", "720p"]],
+ type_utils.NotGiven,
+ ] = type_utils.NOT_GIVEN,
+ start_seconds: typing.Union[
+ typing.Optional[float], type_utils.NotGiven
+ ] = type_utils.NOT_GIVEN,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> models.V1AiVideoTranslatorCreateResponse:
+ """
+ AI Video Translator
+
+ **What this API does**
+
+ Create the same Video Translator you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to your own app or workflow.
+
+ **Good for**
+ - Automation and batch processing
+ - Adding video translator into apps, pipelines, or tools
+
+ **How it works (3 steps)**
+ 1) Upload your inputs (video, image, or audio) with [Generate Upload URLs](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls) and copy the `file_path`.
+ 2) Send a request to create a video translator job with the basic fields.
+ 3) Check the job status until it's `complete`, then download the result from `downloads`.
+
+ **Key options**
+ - Inputs: usually a file, sometimes a YouTube link, depending on project type
+ - Resolution: free users are limited to 576px; higher plans unlock HD and larger sizes
+ - Extra fields: e.g. `face_swap_mode`, `start_seconds`/`end_seconds`, or a text prompt
+
+ **Cost**
+ Credits are only charged for the frames that actually render. You'll see an estimate when the job is queued, and the final total after it's done.
+
+ For detailed examples, see the [product page](https://magichour.ai/products/ai-video-translator).
+
+ POST /v1/ai-video-translator
+
+ Args:
+ name: Give your video a custom name for easy identification.
+ resolution: Output video resolution. Defaults to 480p. 720p and 1080p require a paid plan.
+ start_seconds: Start time of your clip (seconds). Must be ≥ 0.
+ assets: Source video for the translation job.
+ end_seconds: End time of your clip (seconds). Must be greater than start_seconds. The clip must be 1-30 seconds long.
+ target_language: Language to translate the video's speech into.
+ request_options: Additional options to customize the HTTP request
+
+ Returns:
+ Success
+
+ 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.ai_video_translator.create(
+ assets={"video_file_path": "api-assets/id/1234.mp4"},
+ end_seconds=15.0,
+ target_language="Spanish",
+ name="My Video Translator video",
+ resolution="720p",
+ start_seconds=0.0,
+ )
+ ```
+ """
+ _json = to_encodable(
+ item={
+ "name": name,
+ "resolution": resolution,
+ "start_seconds": start_seconds,
+ "assets": assets,
+ "end_seconds": end_seconds,
+ "target_language": target_language,
+ },
+ dump_with=params._SerializerV1AiVideoTranslatorCreateBody,
+ )
+ return self._base_client.request(
+ method="POST",
+ path="/v1/ai-video-translator",
+ auth_names=["bearerAuth"],
+ json=_json,
+ cast_to=models.V1AiVideoTranslatorCreateResponse,
+ request_options=request_options or default_request_options(),
+ )
+
+
+class AsyncAiVideoTranslatorClient:
+ def __init__(self, *, base_client: AsyncBaseClient):
+ self._base_client = base_client
+
+ async def generate(
+ self,
+ *,
+ assets: params.V1AiVideoTranslatorGenerateBodyAssets,
+ end_seconds: float,
+ target_language: typing_extensions.Literal[
+ "Afrikaans",
+ "Arabic",
+ "Bengali",
+ "Bulgarian",
+ "Catalan",
+ "Chinese (Simplified)",
+ "Chinese (Traditional)",
+ "Croatian",
+ "Czech",
+ "Danish",
+ "Dutch",
+ "English",
+ "Estonian",
+ "Finnish",
+ "French",
+ "German",
+ "Greek",
+ "Gujarati",
+ "Hebrew",
+ "Hindi",
+ "Hungarian",
+ "Indonesian",
+ "Italian",
+ "Japanese",
+ "Kannada",
+ "Kazakh",
+ "Korean",
+ "Latvian",
+ "Lithuanian",
+ "Malay",
+ "Malayalam",
+ "Marathi",
+ "Norwegian",
+ "Persian",
+ "Polish",
+ "Portuguese",
+ "Punjabi",
+ "Romanian",
+ "Russian",
+ "Serbian",
+ "Slovak",
+ "Slovenian",
+ "Spanish",
+ "Swahili",
+ "Swedish",
+ "Tamil",
+ "Telugu",
+ "Thai",
+ "Turkish",
+ "Ukrainian",
+ "Urdu",
+ "Vietnamese",
+ "Welsh",
+ ],
+ name: typing.Union[
+ typing.Optional[str], type_utils.NotGiven
+ ] = type_utils.NOT_GIVEN,
+ resolution: typing.Union[
+ typing.Optional[typing_extensions.Literal["1080p", "480p", "720p"]],
+ type_utils.NotGiven,
+ ] = type_utils.NOT_GIVEN,
+ start_seconds: typing.Union[
+ typing.Optional[float], type_utils.NotGiven
+ ] = type_utils.NOT_GIVEN,
+ wait_for_completion: bool = True,
+ download_outputs: bool = True,
+ download_directory: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
+ ):
+ """Upload a video, create a translation job, and optionally wait and download.
+
+ ``assets["video_file_path"]`` accepts a local path, URL, or uploaded asset path.
+ """
+ uploaded_assets: params.V1AiVideoTranslatorCreateBodyAssets = {
+ "video_file_path": await AsyncFilesClient(
+ base_client=self._base_client
+ ).upload_file(file=assets["video_file_path"]),
+ }
+ create_response = await self.create(
+ assets=uploaded_assets,
+ end_seconds=end_seconds,
+ target_language=target_language,
+ name=name,
+ resolution=resolution,
+ start_seconds=start_seconds,
+ request_options=request_options,
+ )
+ logger.info(f"AI Video Translator response: {create_response}")
+ return await AsyncVideoProjectsClient(
+ base_client=self._base_client
+ ).check_result(
+ id=create_response.id,
+ wait_for_completion=wait_for_completion,
+ download_outputs=download_outputs,
+ download_directory=download_directory,
+ )
+
+ async def create(
+ self,
+ *,
+ assets: params.V1AiVideoTranslatorCreateBodyAssets,
+ end_seconds: float,
+ target_language: typing_extensions.Literal[
+ "Afrikaans",
+ "Arabic",
+ "Bengali",
+ "Bulgarian",
+ "Catalan",
+ "Chinese (Simplified)",
+ "Chinese (Traditional)",
+ "Croatian",
+ "Czech",
+ "Danish",
+ "Dutch",
+ "English",
+ "Estonian",
+ "Finnish",
+ "French",
+ "German",
+ "Greek",
+ "Gujarati",
+ "Hebrew",
+ "Hindi",
+ "Hungarian",
+ "Indonesian",
+ "Italian",
+ "Japanese",
+ "Kannada",
+ "Kazakh",
+ "Korean",
+ "Latvian",
+ "Lithuanian",
+ "Malay",
+ "Malayalam",
+ "Marathi",
+ "Norwegian",
+ "Persian",
+ "Polish",
+ "Portuguese",
+ "Punjabi",
+ "Romanian",
+ "Russian",
+ "Serbian",
+ "Slovak",
+ "Slovenian",
+ "Spanish",
+ "Swahili",
+ "Swedish",
+ "Tamil",
+ "Telugu",
+ "Thai",
+ "Turkish",
+ "Ukrainian",
+ "Urdu",
+ "Vietnamese",
+ "Welsh",
+ ],
+ name: typing.Union[
+ typing.Optional[str], type_utils.NotGiven
+ ] = type_utils.NOT_GIVEN,
+ resolution: typing.Union[
+ typing.Optional[typing_extensions.Literal["1080p", "480p", "720p"]],
+ type_utils.NotGiven,
+ ] = type_utils.NOT_GIVEN,
+ start_seconds: typing.Union[
+ typing.Optional[float], type_utils.NotGiven
+ ] = type_utils.NOT_GIVEN,
+ request_options: typing.Optional[RequestOptions] = None,
+ ) -> models.V1AiVideoTranslatorCreateResponse:
+ """
+ AI Video Translator
+
+ **What this API does**
+
+ Create the same Video Translator you can make in the browser, but programmatically, so you can automate it, run it at scale, or connect it to your own app or workflow.
+
+ **Good for**
+ - Automation and batch processing
+ - Adding video translator into apps, pipelines, or tools
+
+ **How it works (3 steps)**
+ 1) Upload your inputs (video, image, or audio) with [Generate Upload URLs](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls) and copy the `file_path`.
+ 2) Send a request to create a video translator job with the basic fields.
+ 3) Check the job status until it's `complete`, then download the result from `downloads`.
+
+ **Key options**
+ - Inputs: usually a file, sometimes a YouTube link, depending on project type
+ - Resolution: free users are limited to 576px; higher plans unlock HD and larger sizes
+ - Extra fields: e.g. `face_swap_mode`, `start_seconds`/`end_seconds`, or a text prompt
+
+ **Cost**
+ Credits are only charged for the frames that actually render. You'll see an estimate when the job is queued, and the final total after it's done.
+
+ For detailed examples, see the [product page](https://magichour.ai/products/ai-video-translator).
+
+ POST /v1/ai-video-translator
+
+ Args:
+ name: Give your video a custom name for easy identification.
+ resolution: Output video resolution. Defaults to 480p. 720p and 1080p require a paid plan.
+ start_seconds: Start time of your clip (seconds). Must be ≥ 0.
+ assets: Source video for the translation job.
+ end_seconds: End time of your clip (seconds). Must be greater than start_seconds. The clip must be 1-30 seconds long.
+ target_language: Language to translate the video's speech into.
+ request_options: Additional options to customize the HTTP request
+
+ Returns:
+ Success
+
+ 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.ai_video_translator.create(
+ assets={"video_file_path": "api-assets/id/1234.mp4"},
+ end_seconds=15.0,
+ target_language="Spanish",
+ name="My Video Translator video",
+ resolution="720p",
+ start_seconds=0.0,
+ )
+ ```
+ """
+ _json = to_encodable(
+ item={
+ "name": name,
+ "resolution": resolution,
+ "start_seconds": start_seconds,
+ "assets": assets,
+ "end_seconds": end_seconds,
+ "target_language": target_language,
+ },
+ dump_with=params._SerializerV1AiVideoTranslatorCreateBody,
+ )
+ return await self._base_client.request(
+ method="POST",
+ path="/v1/ai-video-translator",
+ auth_names=["bearerAuth"],
+ json=_json,
+ cast_to=models.V1AiVideoTranslatorCreateResponse,
+ request_options=request_options or default_request_options(),
+ )
diff --git a/magic_hour/resources/v1/client.py b/magic_hour/resources/v1/client.py
index 1ea7167..2a469b9 100644
--- a/magic_hour/resources/v1/client.py
+++ b/magic_hour/resources/v1/client.py
@@ -43,6 +43,10 @@
AiVideoEditorClient,
AsyncAiVideoEditorClient,
)
+from magic_hour.resources.v1.ai_video_translator import (
+ AiVideoTranslatorClient,
+ AsyncAiVideoTranslatorClient,
+)
from magic_hour.resources.v1.ai_voice_cloner import (
AiVoiceClonerClient,
AsyncAiVoiceClonerClient,
@@ -159,6 +163,9 @@ def __init__(self, *, base_client: SyncBaseClient):
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)
+ self.ai_video_translator = AiVideoTranslatorClient(
+ base_client=self._base_client
+ )
class AsyncV1Client:
@@ -219,3 +226,6 @@ def __init__(self, *, base_client: AsyncBaseClient):
)
self.account = AsyncAccountClient(base_client=self._base_client)
self.saved_items = AsyncSavedItemsClient(base_client=self._base_client)
+ self.ai_video_translator = AsyncAiVideoTranslatorClient(
+ base_client=self._base_client
+ )
diff --git a/magic_hour/resources/v1/face_swap/README.md b/magic_hour/resources/v1/face_swap/README.md
index 4885053..3745193 100644
--- a/magic_hour/resources/v1/face_swap/README.md
+++ b/magic_hour/resources/v1/face_swap/README.md
@@ -110,7 +110,7 @@ For detailed examples, see the [product page](https://magichour.ai/products/face
| -------------------- | :------: | :--------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `assets` | ✓ | ✗ | Provide the assets for face swap. For video, The `video_source` field determines whether `video_file_path` or `youtube_url` field is used | `{"face_mappings": [{"new_face": "api-assets/id/1234.png", "original_face": "api-assets/id/0-0.png"}], "face_swap_mode": "all-faces", "image_file_path": "image/id/1234.png", "video_file_path": "api-assets/id/1234.mp4", "video_source": "file"}` |
| `└─ face_mappings` | ✗ | — | This is the array of face mappings used for multiple face swap. The value is required if `face_swap_mode` is `individual-faces`. | `[{"new_face": "api-assets/id/1234.png", "original_face": "api-assets/id/0-0.png"}]` |
-| `└─ face_swap_mode` | ✗ | — | Choose how to swap faces: **all-faces** (recommended) — swap all detected faces using one source image (`source_file_path` required) +- **individual-faces** — specify exact mappings using `face_mappings` | `"all-faces"` |
+| `└─ face_swap_mode` | ✗ | — | Choose how to swap faces: - **all-faces** (recommended) — swap all detected faces using one source image (`source_file_path` required) - **individual-faces** — specify exact mappings using `face_mappings` | `"all-faces"` |
| `└─ image_file_path` | ✗ | — | The path of the input image with the face to be swapped. The value is required if `face_swap_mode` is `all-faces`. 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. | `"image/id/1234.png"` |
| `└─ video_file_path` | ✗ | — | Your video file. Required if `video_source` is `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.mp4"` |
| `└─ video_source` | ✓ | — | Choose your video source. | `"file"` |
diff --git a/magic_hour/resources/v1/face_swap_photo/README.md b/magic_hour/resources/v1/face_swap_photo/README.md
index 9c5c3b8..5c345b3 100644
--- a/magic_hour/resources/v1/face_swap_photo/README.md
+++ b/magic_hour/resources/v1/face_swap_photo/README.md
@@ -78,7 +78,7 @@ Create a face swap photo. Each photo costs 10 credits. The height/width of the o
| --------------------- | :------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `assets` | ✓ | Provide the assets for face swap photo | `{"face_mappings": [{"new_face": "api-assets/id/1234.png", "original_face": "api-assets/id/0-0.png"}], "face_swap_mode": "all-faces", "source_file_path": "api-assets/id/1234.png", "target_file_path": "api-assets/id/1234.png"}` |
| `└─ face_mappings` | ✗ | This is the array of face mappings used for multiple face swap. The value is required if `face_swap_mode` is `individual-faces`. | `[{"new_face": "api-assets/id/1234.png", "original_face": "api-assets/id/0-0.png"}]` |
-| `└─ face_swap_mode` | ✗ | Choose how to swap faces: **all-faces** (recommended) — swap all detected faces using one source image (`source_file_path` required) +- **individual-faces** — specify exact mappings using `face_mappings` | `"all-faces"` |
+| `└─ face_swap_mode` | ✗ | Choose how to swap faces: - **all-faces** (recommended) — swap all detected faces using one source image (`source_file_path` required) - **individual-faces** — specify exact mappings using `face_mappings` | `"all-faces"` |
| `└─ source_file_path` | ✗ | This is the image from which the face is extracted. The value is required if `face_swap_mode` is `all-faces`. 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"` |
| `└─ target_file_path` | ✓ | This is the image where the face from the source image will be placed. 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"` |
| `name` | ✗ | Give your image a custom name for easy identification. | `"My Face Swap image"` |
diff --git a/magic_hour/resources/v1/image_to_video/README.md b/magic_hour/resources/v1/image_to_video/README.md
index c26a766..aa621b9 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.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, 1080p. * **`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`**: any integer from 3 to 10 * **`kling-2.6`**: 5, 10 * **`kling-3.0`**: any integer from 3 to 15 * **`ltx-2.5`**: any integer from 1 to 60 * **`minimax-h3`**: any integer from 1 to 30 * **`seedance-1.5`**: any integer from 4 to 12 * **`seedance-2.0`**: any integer from 4 to 15 * **`seedance-2.0-mini`**: any integer from 4 to 15 * **`seedance-2.5`**: any integer from 4 to 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.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.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.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, 1080p. * **`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` |
+| Parameter | Required | Deprecated | Description | Example |
+| ------------------------ | :------: | :--------: | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------ |
+| `assets` | ✓ | ✗ | Provide the assets for image-to-video. | `{"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.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, 1080p. * **`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`**: any integer from 3 to 10 * **`kling-2.6`**: 5, 10 * **`kling-3.0`**: any integer from 3 to 15 * **`ltx-2.5`**: any integer from 1 to 60 * **`minimax-h3`**: any integer from 1 to 30 * **`seedance-1.5`**: any integer from 4 to 12 * **`seedance-2.0`**: any integer from 4 to 15 * **`seedance-2.0-mini`**: any integer from 4 to 15 * **`seedance-2.5`**: any integer from 4 to 30 * **`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.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 * **`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.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. * `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.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, 1080p. * **`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 03c5d71..bedabef 100644
--- a/magic_hour/resources/v1/image_to_video/client.py
+++ b/magic_hour/resources/v1/image_to_video/client.py
@@ -247,7 +247,6 @@ def create(
* **`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
@@ -268,7 +267,6 @@ def create(
* `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.
@@ -287,7 +285,6 @@ def create(
* **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k.
* **`seedance-2.0-mini`**: Supports 480p, 720p.
* **`seedance-2.5`**: Supports 480p, 720p, 1080p.
- * **`sora-2`**: Supports 720p.
* **`veo3.1`**: Supports 720p, 1080p.
* **`veo3.1-lite`**: Supports 720p, 1080p.
* **`wan-2.2`**: Supports 480p, 720p, 1080p.
@@ -297,7 +294,7 @@ def create(
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.
- assets: Provide the assets for image-to-video. Sora 2 only supports images with an aspect ratio of `9:16` or `16:9`.
+ assets: Provide the assets for image-to-video.
end_seconds: The total duration of the output video in seconds. Supported durations depend on the chosen model:
* **`gemini-omni-1.1`**: any integer from 3 to 10
@@ -309,7 +306,6 @@ def create(
* **`seedance-2.0`**: any integer from 4 to 15
* **`seedance-2.0-mini`**: any integer from 4 to 15
* **`seedance-2.5`**: any integer from 4 to 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
@@ -589,7 +585,6 @@ async def create(
* **`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
@@ -610,7 +605,6 @@ async def create(
* `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.
@@ -629,7 +623,6 @@ async def create(
* **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k.
* **`seedance-2.0-mini`**: Supports 480p, 720p.
* **`seedance-2.5`**: Supports 480p, 720p, 1080p.
- * **`sora-2`**: Supports 720p.
* **`veo3.1`**: Supports 720p, 1080p.
* **`veo3.1-lite`**: Supports 720p, 1080p.
* **`wan-2.2`**: Supports 480p, 720p, 1080p.
@@ -639,7 +632,7 @@ async def create(
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.
- assets: Provide the assets for image-to-video. Sora 2 only supports images with an aspect ratio of `9:16` or `16:9`.
+ assets: Provide the assets for image-to-video.
end_seconds: The total duration of the output video in seconds. Supported durations depend on the chosen model:
* **`gemini-omni-1.1`**: any integer from 3 to 10
@@ -651,7 +644,6 @@ async def create(
* **`seedance-2.0`**: any integer from 4 to 15
* **`seedance-2.0-mini`**: any integer from 4 to 15
* **`seedance-2.5`**: any integer from 4 to 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
diff --git a/magic_hour/resources/v1/text_to_video/README.md b/magic_hour/resources/v1/text_to_video/README.md
index d61e6ca..e8efcff 100644
--- a/magic_hour/resources/v1/text_to_video/README.md
+++ b/magic_hour/resources/v1/text_to_video/README.md
@@ -96,19 +96,19 @@ 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`**: any integer from 3 to 10 * **`kling-2.6`**: 5, 10 * **`kling-3.0`**: any integer from 3 to 15 * **`ltx-2.5`**: any integer from 1 to 60 * **`minimax-h3`**: any integer from 1 to 30 * **`seedance-1.5`**: any integer from 4 to 12 * **`seedance-2.0`**: any integer from 4 to 15 * **`seedance-2.0-mini`**: any integer from 4 to 15 * **`seedance-2.5`**: any integer from 4 to 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.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.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.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"` |
-| `references` | ✗ | ✗ | | `[{"file_path": "string", "name": "string"}]` |
-| `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.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, 1080p. * **`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"` |
+| 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`**: any integer from 3 to 10 * **`kling-2.6`**: 5, 10 * **`kling-3.0`**: any integer from 3 to 15 * **`ltx-2.5`**: any integer from 1 to 60 * **`minimax-h3`**: any integer from 1 to 30 * **`seedance-1.5`**: any integer from 4 to 12 * **`seedance-2.0`**: any integer from 4 to 15 * **`seedance-2.0-mini`**: any integer from 4 to 15 * **`seedance-2.5`**: any integer from 4 to 30 * **`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.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. * **`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.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 * **`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.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. * `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"` |
+| `references` | ✗ | ✗ | | `[{"file_path": "string", "name": "string"}]` |
+| `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.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, 1080p. * **`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 ee7480b..ad20cf3 100644
--- a/magic_hour/resources/v1/text_to_video/client.py
+++ b/magic_hour/resources/v1/text_to_video/client.py
@@ -248,7 +248,6 @@ def create(
* **`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.
@@ -266,7 +265,6 @@ def create(
* **`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
@@ -284,7 +282,6 @@ def create(
* `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.
@@ -305,7 +302,6 @@ def create(
* **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k.
* **`seedance-2.0-mini`**: Supports 480p, 720p.
* **`seedance-2.5`**: Supports 480p, 720p, 1080p.
- * **`sora-2`**: Supports 720p.
* **`veo3.1`**: Supports 720p, 1080p.
* **`veo3.1-lite`**: Supports 720p, 1080p.
* **`wan-2.2`**: Supports 480p, 720p, 1080p.
@@ -322,7 +318,6 @@ def create(
* **`seedance-2.0`**: any integer from 4 to 15
* **`seedance-2.0-mini`**: any integer from 4 to 15
* **`seedance-2.5`**: any integer from 4 to 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
@@ -603,7 +598,6 @@ async def create(
* **`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.
@@ -621,7 +615,6 @@ async def create(
* **`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
@@ -639,7 +632,6 @@ async def create(
* `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.
@@ -660,7 +652,6 @@ async def create(
* **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k.
* **`seedance-2.0-mini`**: Supports 480p, 720p.
* **`seedance-2.5`**: Supports 480p, 720p, 1080p.
- * **`sora-2`**: Supports 720p.
* **`veo3.1`**: Supports 720p, 1080p.
* **`veo3.1-lite`**: Supports 720p, 1080p.
* **`wan-2.2`**: Supports 480p, 720p, 1080p.
@@ -677,7 +668,6 @@ async def create(
* **`seedance-2.0`**: any integer from 4 to 15
* **`seedance-2.0-mini`**: any integer from 4 to 15
* **`seedance-2.5`**: any integer from 4 to 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
diff --git a/magic_hour/types/models/__init__.py b/magic_hour/types/models/__init__.py
index 9370384..cbda749 100644
--- a/magic_hour/types/models/__init__.py
+++ b/magic_hour/types/models/__init__.py
@@ -19,6 +19,7 @@
from .v1_ai_qr_code_generator_create_response import V1AiQrCodeGeneratorCreateResponse
from .v1_ai_talking_photo_create_response import V1AiTalkingPhotoCreateResponse
from .v1_ai_video_editor_create_response import V1AiVideoEditorCreateResponse
+from .v1_ai_video_translator_create_response import V1AiVideoTranslatorCreateResponse
from .v1_ai_voice_cloner_create_response import V1AiVoiceClonerCreateResponse
from .v1_ai_voice_generator_create_response import V1AiVoiceGeneratorCreateResponse
from .v1_animation_create_response import V1AnimationCreateResponse
@@ -87,6 +88,7 @@
"V1AiQrCodeGeneratorCreateResponse",
"V1AiTalkingPhotoCreateResponse",
"V1AiVideoEditorCreateResponse",
+ "V1AiVideoTranslatorCreateResponse",
"V1AiVoiceClonerCreateResponse",
"V1AiVoiceGeneratorCreateResponse",
"V1AnimationCreateResponse",
diff --git a/magic_hour/types/models/v1_ai_video_translator_create_response.py b/magic_hour/types/models/v1_ai_video_translator_create_response.py
new file mode 100644
index 0000000..91bccdf
--- /dev/null
+++ b/magic_hour/types/models/v1_ai_video_translator_create_response.py
@@ -0,0 +1,35 @@
+import pydantic
+
+
+class V1AiVideoTranslatorCreateResponse(pydantic.BaseModel):
+ """
+ Success
+ """
+
+ model_config = pydantic.ConfigDict(
+ arbitrary_types_allowed=True,
+ populate_by_name=True,
+ )
+
+ credits_charged: int = pydantic.Field(
+ alias="credits_charged",
+ )
+ """
+ The amount of credits deducted from your account to generate the video. If the status is not 'complete', this value is an estimate and may be adjusted upon completion based on the actual FPS of the output video.
+
+ If video generation fails, credits will be refunded, and this field will be updated to include the refund.
+ """
+ estimated_frame_cost: int = pydantic.Field(
+ alias="estimated_frame_cost",
+ )
+ """
+ Deprecated: Previously represented the number of frames (original name of our credit system) used for video generation. Use 'credits_charged' instead.
+
+ The amount of frames used to generate the video. If the status is not 'complete', the cost is an estimate and will be adjusted when the video completes.
+ """
+ id: str = pydantic.Field(
+ alias="id",
+ )
+ """
+ Unique ID of the video. Use it with the [Get video Project API](https://docs.magichour.ai/api-reference/video-projects/get-video-details) to fetch status and downloads.
+ """
diff --git a/magic_hour/types/params/__init__.py b/magic_hour/types/params/__init__.py
index 0cd48c1..4301a8b 100644
--- a/magic_hour/types/params/__init__.py
+++ b/magic_hour/types/params/__init__.py
@@ -124,6 +124,15 @@
_SerializerV1AiVideoEditorCreateBodyStyle,
)
from .v1_ai_video_editor_generate_body_assets import V1AiVideoEditorGenerateBodyAssets
+from .v1_ai_video_translator_create_body import (
+ V1AiVideoTranslatorCreateBody,
+ _SerializerV1AiVideoTranslatorCreateBody,
+)
+from .v1_ai_video_translator_create_body_assets import (
+ V1AiVideoTranslatorCreateBodyAssets,
+ _SerializerV1AiVideoTranslatorCreateBodyAssets,
+)
+from .v1_ai_video_translator_generate_body_assets import V1AiVideoTranslatorGenerateBodyAssets
from .v1_ai_voice_cloner_create_body import (
V1AiVoiceClonerCreateBody,
_SerializerV1AiVoiceClonerCreateBody,
@@ -386,6 +395,9 @@
"V1AiVideoEditorCreateBodyAssets",
"V1AiVideoEditorCreateBodyStyle",
"V1AiVideoEditorGenerateBodyAssets",
+ "V1AiVideoTranslatorCreateBody",
+ "V1AiVideoTranslatorCreateBodyAssets",
+ "V1AiVideoTranslatorGenerateBodyAssets",
"V1AiVoiceClonerCreateBody",
"V1AiVoiceClonerCreateBodyAssets",
"V1AiVoiceClonerCreateBodyStyle",
@@ -480,6 +492,8 @@
"_SerializerV1AiVideoEditorCreateBody",
"_SerializerV1AiVideoEditorCreateBodyAssets",
"_SerializerV1AiVideoEditorCreateBodyStyle",
+ "_SerializerV1AiVideoTranslatorCreateBody",
+ "_SerializerV1AiVideoTranslatorCreateBodyAssets",
"_SerializerV1AiVoiceClonerCreateBody",
"_SerializerV1AiVoiceClonerCreateBodyAssets",
"_SerializerV1AiVoiceClonerCreateBodyStyle",
diff --git a/magic_hour/types/params/v1_ai_video_translator_create_body.py b/magic_hour/types/params/v1_ai_video_translator_create_body.py
new file mode 100644
index 0000000..83bd79f
--- /dev/null
+++ b/magic_hour/types/params/v1_ai_video_translator_create_body.py
@@ -0,0 +1,184 @@
+import pydantic
+import typing
+import typing_extensions
+
+from .v1_ai_video_translator_create_body_assets import (
+ V1AiVideoTranslatorCreateBodyAssets,
+ _SerializerV1AiVideoTranslatorCreateBodyAssets,
+)
+
+
+class V1AiVideoTranslatorCreateBody(typing_extensions.TypedDict):
+ """
+ V1AiVideoTranslatorCreateBody
+ """
+
+ assets: typing_extensions.Required[V1AiVideoTranslatorCreateBodyAssets]
+ """
+ Source video for the translation job.
+ """
+
+ end_seconds: typing_extensions.Required[float]
+ """
+ End time of your clip (seconds). Must be greater than start_seconds. The clip must be 1-30 seconds long.
+ """
+
+ name: typing_extensions.NotRequired[str]
+ """
+ Give your video a custom name for easy identification.
+ """
+
+ resolution: typing_extensions.NotRequired[
+ typing_extensions.Literal["1080p", "480p", "720p"]
+ ]
+ """
+ Output video resolution. Defaults to 480p. 720p and 1080p require a paid plan.
+ """
+
+ start_seconds: typing_extensions.NotRequired[float]
+ """
+ Start time of your clip (seconds). Must be ≥ 0.
+ """
+
+ target_language: typing_extensions.Required[
+ typing_extensions.Literal[
+ "Afrikaans",
+ "Arabic",
+ "Bengali",
+ "Bulgarian",
+ "Catalan",
+ "Chinese (Simplified)",
+ "Chinese (Traditional)",
+ "Croatian",
+ "Czech",
+ "Danish",
+ "Dutch",
+ "English",
+ "Estonian",
+ "Finnish",
+ "French",
+ "German",
+ "Greek",
+ "Gujarati",
+ "Hebrew",
+ "Hindi",
+ "Hungarian",
+ "Indonesian",
+ "Italian",
+ "Japanese",
+ "Kannada",
+ "Kazakh",
+ "Korean",
+ "Latvian",
+ "Lithuanian",
+ "Malay",
+ "Malayalam",
+ "Marathi",
+ "Norwegian",
+ "Persian",
+ "Polish",
+ "Portuguese",
+ "Punjabi",
+ "Romanian",
+ "Russian",
+ "Serbian",
+ "Slovak",
+ "Slovenian",
+ "Spanish",
+ "Swahili",
+ "Swedish",
+ "Tamil",
+ "Telugu",
+ "Thai",
+ "Turkish",
+ "Ukrainian",
+ "Urdu",
+ "Vietnamese",
+ "Welsh",
+ ]
+ ]
+ """
+ Language to translate the video's speech into.
+ """
+
+
+class _SerializerV1AiVideoTranslatorCreateBody(pydantic.BaseModel):
+ """
+ Serializer for V1AiVideoTranslatorCreateBody handling case conversions
+ and file omissions as dictated by the API
+ """
+
+ model_config = pydantic.ConfigDict(
+ populate_by_name=True,
+ )
+
+ assets: _SerializerV1AiVideoTranslatorCreateBodyAssets = pydantic.Field(
+ alias="assets",
+ )
+ end_seconds: float = pydantic.Field(
+ alias="end_seconds",
+ )
+ name: typing.Optional[str] = pydantic.Field(alias="name", default=None)
+ resolution: typing.Optional[typing_extensions.Literal["1080p", "480p", "720p"]] = (
+ pydantic.Field(alias="resolution", default=None)
+ )
+ start_seconds: typing.Optional[float] = pydantic.Field(
+ alias="start_seconds", default=None
+ )
+ target_language: typing_extensions.Literal[
+ "Afrikaans",
+ "Arabic",
+ "Bengali",
+ "Bulgarian",
+ "Catalan",
+ "Chinese (Simplified)",
+ "Chinese (Traditional)",
+ "Croatian",
+ "Czech",
+ "Danish",
+ "Dutch",
+ "English",
+ "Estonian",
+ "Finnish",
+ "French",
+ "German",
+ "Greek",
+ "Gujarati",
+ "Hebrew",
+ "Hindi",
+ "Hungarian",
+ "Indonesian",
+ "Italian",
+ "Japanese",
+ "Kannada",
+ "Kazakh",
+ "Korean",
+ "Latvian",
+ "Lithuanian",
+ "Malay",
+ "Malayalam",
+ "Marathi",
+ "Norwegian",
+ "Persian",
+ "Polish",
+ "Portuguese",
+ "Punjabi",
+ "Romanian",
+ "Russian",
+ "Serbian",
+ "Slovak",
+ "Slovenian",
+ "Spanish",
+ "Swahili",
+ "Swedish",
+ "Tamil",
+ "Telugu",
+ "Thai",
+ "Turkish",
+ "Ukrainian",
+ "Urdu",
+ "Vietnamese",
+ "Welsh",
+ ] = pydantic.Field(
+ alias="target_language",
+ )
diff --git a/magic_hour/types/params/v1_ai_video_translator_create_body_assets.py b/magic_hour/types/params/v1_ai_video_translator_create_body_assets.py
new file mode 100644
index 0000000..02d0799
--- /dev/null
+++ b/magic_hour/types/params/v1_ai_video_translator_create_body_assets.py
@@ -0,0 +1,33 @@
+import pydantic
+import typing_extensions
+
+
+class V1AiVideoTranslatorCreateBodyAssets(typing_extensions.TypedDict):
+ """
+ Source video for the translation job.
+ """
+
+ video_file_path: typing_extensions.Required[str]
+ """
+ Source video containing the speech to translate. 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.
+
+ """
+
+
+class _SerializerV1AiVideoTranslatorCreateBodyAssets(pydantic.BaseModel):
+ """
+ Serializer for V1AiVideoTranslatorCreateBodyAssets handling case conversions
+ and file omissions as dictated by the API
+ """
+
+ model_config = pydantic.ConfigDict(
+ populate_by_name=True,
+ )
+
+ video_file_path: str = pydantic.Field(
+ alias="video_file_path",
+ )
diff --git a/magic_hour/types/params/v1_ai_video_translator_generate_body_assets.py b/magic_hour/types/params/v1_ai_video_translator_generate_body_assets.py
new file mode 100644
index 0000000..9686389
--- /dev/null
+++ b/magic_hour/types/params/v1_ai_video_translator_generate_body_assets.py
@@ -0,0 +1,8 @@
+import typing_extensions
+
+
+class V1AiVideoTranslatorGenerateBodyAssets(typing_extensions.TypedDict):
+ """Source video for the translation job."""
+
+ video_file_path: typing_extensions.Required[str]
+ """Local file path, direct URL, or previously uploaded ``api-assets`` path."""
diff --git a/magic_hour/types/params/v1_face_swap_create_body_assets.py b/magic_hour/types/params/v1_face_swap_create_body_assets.py
index 5f4b78f..93db6ee 100644
--- a/magic_hour/types/params/v1_face_swap_create_body_assets.py
+++ b/magic_hour/types/params/v1_face_swap_create_body_assets.py
@@ -25,8 +25,8 @@ class V1FaceSwapCreateBodyAssets(typing_extensions.TypedDict):
]
"""
Choose how to swap faces:
- **all-faces** (recommended) — swap all detected faces using one source image (`source_file_path` required)
- +- **individual-faces** — specify exact mappings using `face_mappings`
+ - **all-faces** (recommended) — swap all detected faces using one source image (`source_file_path` required)
+ - **individual-faces** — specify exact mappings using `face_mappings`
"""
image_file_path: typing_extensions.NotRequired[str]
diff --git a/magic_hour/types/params/v1_face_swap_photo_create_body_assets.py b/magic_hour/types/params/v1_face_swap_photo_create_body_assets.py
index c7fcfa7..259c06b 100644
--- a/magic_hour/types/params/v1_face_swap_photo_create_body_assets.py
+++ b/magic_hour/types/params/v1_face_swap_photo_create_body_assets.py
@@ -25,8 +25,8 @@ class V1FaceSwapPhotoCreateBodyAssets(typing_extensions.TypedDict):
]
"""
Choose how to swap faces:
- **all-faces** (recommended) — swap all detected faces using one source image (`source_file_path` required)
- +- **individual-faces** — specify exact mappings using `face_mappings`
+ - **all-faces** (recommended) — swap all detected faces using one source image (`source_file_path` required)
+ - **individual-faces** — specify exact mappings using `face_mappings`
"""
source_file_path: typing_extensions.NotRequired[str]
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 97e28ff..2c58db6 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
@@ -19,7 +19,7 @@ class V1ImageToVideoCreateBody(typing_extensions.TypedDict):
assets: typing_extensions.Required[V1ImageToVideoCreateBodyAssets]
"""
- Provide the assets for image-to-video. Sora 2 only supports images with an aspect ratio of `9:16` or `16:9`.
+ Provide the assets for image-to-video.
"""
audio: typing_extensions.NotRequired[bool]
@@ -36,7 +36,6 @@ class V1ImageToVideoCreateBody(typing_extensions.TypedDict):
* **`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
@@ -57,7 +56,6 @@ class V1ImageToVideoCreateBody(typing_extensions.TypedDict):
* **`seedance-2.0`**: any integer from 4 to 15
* **`seedance-2.0-mini`**: any integer from 4 to 15
* **`seedance-2.5`**: any integer from 4 to 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
@@ -111,7 +109,6 @@ class V1ImageToVideoCreateBody(typing_extensions.TypedDict):
* `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.
@@ -140,7 +137,6 @@ class V1ImageToVideoCreateBody(typing_extensions.TypedDict):
* **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k.
* **`seedance-2.0-mini`**: Supports 480p, 720p.
* **`seedance-2.5`**: Supports 480p, 720p, 1080p.
- * **`sora-2`**: Supports 720p.
* **`veo3.1`**: Supports 720p, 1080p.
* **`veo3.1-lite`**: Supports 720p, 1080p.
* **`wan-2.2`**: Supports 480p, 720p, 1080p.
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 fae52cc..14b1bfc 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
@@ -5,7 +5,7 @@
class V1ImageToVideoCreateBodyAssets(typing_extensions.TypedDict):
"""
- Provide the assets for image-to-video. Sora 2 only supports images with an aspect ratio of `9:16` or `16:9`.
+ Provide the assets for image-to-video.
"""
end_image_file_path: typing_extensions.NotRequired[str]
@@ -21,7 +21,6 @@ class V1ImageToVideoCreateBodyAssets(typing_extensions.TypedDict):
* **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k.
* **`seedance-2.0-mini`**: Supports 480p, 720p.
* **`seedance-2.5`**: Supports 480p, 720p, 1080p.
- * **`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
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 879dbdb..bd84200 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
@@ -32,7 +32,6 @@ class V1TextToVideoCreateBody(typing_extensions.TypedDict):
* **`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.
@@ -54,7 +53,6 @@ class V1TextToVideoCreateBody(typing_extensions.TypedDict):
* **`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
@@ -75,7 +73,6 @@ class V1TextToVideoCreateBody(typing_extensions.TypedDict):
* **`seedance-2.0`**: any integer from 4 to 15
* **`seedance-2.0-mini`**: any integer from 4 to 15
* **`seedance-2.5`**: any integer from 4 to 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
@@ -122,7 +119,6 @@ class V1TextToVideoCreateBody(typing_extensions.TypedDict):
* `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.
@@ -162,7 +158,6 @@ class V1TextToVideoCreateBody(typing_extensions.TypedDict):
* **`seedance-2.0`**: Supports 480p, 720p, 1080p, 4k.
* **`seedance-2.0-mini`**: Supports 480p, 720p.
* **`seedance-2.5`**: Supports 480p, 720p, 1080p.
- * **`sora-2`**: Supports 720p.
* **`veo3.1`**: Supports 720p, 1080p.
* **`veo3.1-lite`**: Supports 720p, 1080p.
* **`wan-2.2`**: Supports 480p, 720p, 1080p.
diff --git a/pyproject.toml b/pyproject.toml
index 7099a1b..1c0702c 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "magic_hour"
-version = "0.83.0"
+version = "0.84.0"
description = "Python SDK for Magic Hour API"
readme = "README.md"
authors = []
diff --git a/tests/test_v1_ai_image_generator_client.py b/tests/test_v1_ai_image_generator_client.py
index 686a4ec..6b96d8f 100644
--- a/tests/test_v1_ai_image_generator_client.py
+++ b/tests/test_v1_ai_image_generator_client.py
@@ -37,7 +37,7 @@ def test_create_200_success_all_params() -> None:
model="default",
name="My Ai Image image",
orientation="landscape",
- resolution="auto",
+ resolution="1k",
)
try:
pydantic.TypeAdapter(models.V1AiImageGeneratorCreateResponse).validate_python(
@@ -81,7 +81,7 @@ async def test_await_create_200_success_all_params() -> None:
model="default",
name="My Ai Image image",
orientation="landscape",
- resolution="auto",
+ resolution="1k",
)
try:
pydantic.TypeAdapter(models.V1AiImageGeneratorCreateResponse).validate_python(
diff --git a/tests/test_v1_ai_video_translator_client.py b/tests/test_v1_ai_video_translator_client.py
new file mode 100644
index 0000000..b14d6e1
--- /dev/null
+++ b/tests/test_v1_ai_video_translator_client.py
@@ -0,0 +1,83 @@
+import pydantic
+import pytest
+
+from magic_hour import AsyncClient, Client
+from magic_hour.environment import Environment
+from magic_hour.types import models
+
+
+def test_create_200_success_all_params() -> None:
+ """Tests a POST request to the /v1/ai-video-translator endpoint.
+
+ Operation: create
+ Test Case ID: success_all_params
+ Expected Status: 200
+ Mode: Synchronous execution
+
+ Response : models.V1AiVideoTranslatorCreateResponse
+
+ 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.ai_video_translator.create(
+ assets={"video_file_path": "api-assets/id/1234.mp4"},
+ end_seconds=15.0,
+ target_language="Spanish",
+ name="My Video Translator video",
+ resolution="720p",
+ start_seconds=0.0,
+ )
+ try:
+ pydantic.TypeAdapter(models.V1AiVideoTranslatorCreateResponse).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_create_200_success_all_params() -> None:
+ """Tests a POST request to the /v1/ai-video-translator endpoint.
+
+ Operation: create
+ Test Case ID: success_all_params
+ Expected Status: 200
+ Mode: Asynchronous execution
+
+ Response : models.V1AiVideoTranslatorCreateResponse
+
+ 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.ai_video_translator.create(
+ assets={"video_file_path": "api-assets/id/1234.mp4"},
+ end_seconds=15.0,
+ target_language="Spanish",
+ name="My Video Translator video",
+ resolution="720p",
+ start_seconds=0.0,
+ )
+ try:
+ pydantic.TypeAdapter(models.V1AiVideoTranslatorCreateResponse).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"