HttpResponse<String> response = Unirest.post("https://api.magichour.ai/v1/video-to-video")
.header("accept", "application/json")
.header("content-type", "application/json")
.header("authorization", "Bearer <token>")
.body("{\"name\":\"My Video To Video video\",\"start_seconds\":0,\"end_seconds\":5,\"fps_resolution\":\"HALF\",\"style\":{\"art_style\":\"Minecraft\",\"version\":\"default\",\"prompt_type\":\"default\",\"prompt\":\"A cinematic scene with warm lighting\",\"model\":\"default\"},\"assets\":{\"video_source\":\"file\",\"video_file_path\":\"api-assets/id/1234.mp4\"}}")
.asString();
Create the same Video To Video 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 to video into apps, pipelines, or tools
How it works (3 steps)
Upload your inputs (video, image, or audio) with Generate Upload URLs and copy the file_path.
Send a request to create a video to video job with the basic fields.
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: output size and plan requirements vary by workflow and model. Some workflows derive output size from the input video.
Extra fields: e.g. face_swap_mode, start_seconds/end_seconds, or a text prompt
Cost
Credits are charged when the job is queued (credits_charged in the response). Tools billed per frame charge an estimate and settle to the frames that actually render once the job finishes; tools billed per second charge the final amount upfront. Failed jobs are refunded.
HttpResponse<String> response = Unirest.post("https://api.magichour.ai/v1/video-to-video")
.header("accept", "application/json")
.header("content-type", "application/json")
.header("authorization", "Bearer <token>")
.body("{\"name\":\"My Video To Video video\",\"start_seconds\":0,\"end_seconds\":5,\"fps_resolution\":\"HALF\",\"style\":{\"art_style\":\"Minecraft\",\"version\":\"default\",\"prompt_type\":\"default\",\"prompt\":\"A cinematic scene with warm lighting\",\"model\":\"default\"},\"assets\":{\"video_source\":\"file\",\"video_file_path\":\"api-assets/id/1234.mp4\"}}")
.asString();
Bearer authentication header of the form Bearer <api_key>, where <api_key> is your API key. To get your API key, go to Developer Hub and click "Create new API Key".
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.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Magic Hour API Docs","description":"Easily generate videos, images, and audio using Magic Hour's API. Follow our documentation to seamlessly integrate AI content creation into your applications.","colors":{"primary":"#3b82f6","light":"#0564ff","dark":"#3b82f6"},"logo":{"light":"https://mintcdn.com/magichour/5sgGJpuuipkw5s5v/icons/logo-light.svg?fit=max\u0026auto=format\u0026n=5sgGJpuuipkw5s5v\u0026q=85\u0026s=1f167e30baf11927bc2e0932411e455b","dark":"https://mintcdn.com/magichour/5sgGJpuuipkw5s5v/icons/logo-dark.svg?fit=max\u0026auto=format\u0026n=5sgGJpuuipkw5s5v\u0026q=85\u0026s=15c8bda28931ac4e1e2fab2c0ba6f0d5"},"favicon":"https://mintcdn.com/magichour/kbUwXh9ksnVyRSci/icons/favicon.png?fit=max\u0026auto=format\u0026n=kbUwXh9ksnVyRSci\u0026q=85\u0026s=c4fda903b24dd7067dadd1bb75508987","appearance":{"default":"dark","strict":false},"background":{"decoration":"gradient"},"navbar":{"links":[{"href":"mailto:support@magichour.ai","label":"Support"}],"primary":{"type":"button","label":"Get API key","href":"https://magichour.ai/developer?tab=api-keys\u0026ref=docs-navbar\u0026utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=navbar"}},"footer":{"socials":{"website":"https://magichour.ai/?utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=footer","x":"https://x.com/magichourai","github":"https://github.com/magichourhq","linkedin":"https://linkedin.com/company/magichour","instagram":"https://instagram.com/magichourai","youtube":"https://youtube.com/@magichourai"}},"seo":{"metatags":{"og:image":"https://d28dkohlqf5vwj.cloudfront.net/open-graph/logo-social-noisy-spectrum.jpg","twitter:image":"https://d28dkohlqf5vwj.cloudfront.net/open-graph/logo-social-noisy-spectrum.jpg"}},"integrations":{"ga4":{"measurementId":"G-CZ9Q9NBZB3"},"posthog":{"apiKey":"phc_EmzSy2RU0TOPhpouazMzxFedNdMyhze8HakyjffW2Wr","apiHost":"https://us.i.posthog.com"}},"contextual":{"options":["chatgpt","claude","perplexity","mcp","cursor","vscode","copy","view"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"API quickstart","icon":"forward-fast","href":"/get-started/quick-start"},{"anchor":"API pricing","icon":"credit-card","href":"/billing/overview"},{"anchor":"Community","icon":"discord","href":"https://discord.com/invite/JX5rgsZaJp"},{"anchor":"Status","icon":"wave-pulse","href":"https://status.magichour.ai"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"magichour","hasAudioNarration":false,"actualSubdomain":"magichour","customDomains":["docs.magichour.ai"],"gitSource":{"type":"github","owner":"magichourhq","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae9632bb788bf0e78a6217c","collectionId":"97da1623-d4a7-4619-99de-90bfb527ec50","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae9632bb788bf0e78a6217c"},"feedback":{"thumbs":true,"issues":true,"edits":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae9963236175fbf71247a24","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"default","tag":"Documentation","count":97},{"language":"default","tag":"Integration","count":56},{"language":"default","tag":"API Reference","count":45},{"language":"default","tag":"Tools","count":30},{"language":"default","tag":"Image Projects","count":16},{"language":"default","tag":"Video Projects","count":16},{"language":"default","tag":"Images","count":15},{"language":"default","tag":"Video","count":12},{"language":"default","tag":"Webhook Reference","count":10},{"language":"default","tag":"Get Started","count":7}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"#sidebar,#table-of-contents-content{scrollbar-width:thin;scrollbar-gutter:none;scrollbar-color:gray transparent}"}],"page":{"pagePath":"api-reference/video-projects/video-to-video","slug":"/api-reference/video-projects/video-to-video","pageMetadata":{"title":"Video-to-Video","description":"**What this API does**\n\nCreate the same Video To Video 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.\n \n**Good for**\n- Automation and batch processing \n- Adding video to video into apps, pipelines, or tools \n\n**How it works (3 steps)**\n1) 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`. \n2) Send a request to create a video to video job with the basic fields. \n3) Check the job status until it's `complete`, then download the result from `downloads`.\n\n**Key options**\n- Inputs: usually a file, sometimes a YouTube link, depending on project type \n- Resolution: output size and plan requirements vary by workflow and model. Some workflows derive output size from the input video.\n- Extra fields: e.g. `face_swap_mode`, `start_seconds`/`end_seconds`, or a text prompt \n\n**Cost** \nCredits are charged when the job is queued (`credits_charged` in the response). Tools billed per frame charge an estimate and settle to the frames that actually render once the job finishes; tools billed per second charge the final amount upfront. Failed jobs are refunded.\n\nFor detailed examples, see the [product page](https://magichour.ai/products/video-to-video).","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/video-to-video","href":"/api-reference/video-projects/video-to-video","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n a: \"a\",\n br: \"br\",\n code: \"code\",\n li: \"li\",\n ol: \"ol\",\n p: \"p\",\n strong: \"strong\",\n ul: \"ul\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"What this API does\"\n })\n }), \"\\n\", _jsx(_components.p, {\n children: \"Create the same Video To Video 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.\"\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"Good for\"\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsx(_components.li, {\n children: \"Automation and batch processing\"\n }), \"\\n\", _jsx(_components.li, {\n children: \"Adding video to video into apps, pipelines, or tools\"\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"How it works (3 steps)\"\n })\n }), \"\\n\", _jsxs(_components.ol, {\n children: [\"\\n\", _jsxs(_components.li, {\n children: [\"Upload your inputs (video, image, or audio) with \", _jsx(_components.a, {\n href: \"https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls\",\n children: \"Generate Upload URLs\"\n }), \" and copy the \", _jsx(_components.code, {\n children: \"file_path\"\n }), \".\"]\n }), \"\\n\", _jsx(_components.li, {\n children: \"Send a request to create a video to video job with the basic fields.\"\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Check the job status until it’s \", _jsx(_components.code, {\n children: \"complete\"\n }), \", then download the result from \", _jsx(_components.code, {\n children: \"downloads\"\n }), \".\"]\n }), \"\\n\"]\n }), \"\\n\", _jsx(_components.p, {\n children: _jsx(_components.strong, {\n children: \"Key options\"\n })\n }), \"\\n\", _jsxs(_components.ul, {\n children: [\"\\n\", _jsx(_components.li, {\n children: \"Inputs: usually a file, sometimes a YouTube link, depending on project type\"\n }), \"\\n\", _jsx(_components.li, {\n children: \"Resolution: output size and plan requirements vary by workflow and model. Some workflows derive output size from the input video.\"\n }), \"\\n\", _jsxs(_components.li, {\n children: [\"Extra fields: e.g. \", _jsx(_components.code, {\n children: \"face_swap_mode\"\n }), \", \", _jsx(_components.code, {\n children: \"start_seconds\"\n }), \"/\", _jsx(_components.code, {\n children: \"end_seconds\"\n }), \", or a text prompt\"]\n }), \"\\n\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Cost\"\n }), _jsx(_components.br, {}), \"\\n\", \"Credits are charged when the job is queued (\", _jsx(_components.code, {\n children: \"credits_charged\"\n }), \" in the response). Tools billed per frame charge an estimate and settle to the frames that actually render once the job finishes; tools billed per second charge the final amount upfront. Failed jobs are refunded.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"For detailed examples, see the \", _jsx(_components.a, {\n href: \"https://magichour.ai/products/video-to-video\",\n children: \"product page\"\n }), \".\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Video-to-Video","description":"**What this API does**\n\nCreate the same Video To Video 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.\n \n**Good for**\n- Automation and batch processing \n- Adding video to video into apps, pipelines, or tools \n\n**How it works (3 steps)**\n1) 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`. \n2) Send a request to create a video to video job with the basic fields. \n3) Check the job status until it's `complete`, then download the result from `downloads`.\n\n**Key options**\n- Inputs: usually a file, sometimes a YouTube link, depending on project type \n- Resolution: output size and plan requirements vary by workflow and model. Some workflows derive output size from the input video.\n- Extra fields: e.g. `face_swap_mode`, `start_seconds`/`end_seconds`, or a text prompt \n\n**Cost** \nCredits are charged when the job is queued (`credits_charged` in the response). Tools billed per frame charge an estimate and settle to the frames that actually render once the job finishes; tools billed per second charge the final amount upfront. Failed jobs are refunded.\n\nFor detailed examples, see the [product page](https://magichour.ai/products/video-to-video).","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/video-to-video","href":"/api-reference/video-projects/video-to-video","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"description":"**What this API does**\n\nCreate the same Video To Video 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.\n \n**Good for**\n- Automation and batch processing \n- Adding video to video into apps, pipelines, or tools \n\n**How it works (3 steps)**\n1) 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`. \n2) Send a request to create a video to video job with the basic fields. \n3) Check the job status until it's `complete`, then download the result from `downloads`.\n\n**Key options**\n- Inputs: usually a file, sometimes a YouTube link, depending on project type \n- Resolution: output size and plan requirements vary by workflow and model. Some workflows derive output size from the input video.\n- Extra fields: e.g. `face_swap_mode`, `start_seconds`/`end_seconds`, or a text prompt \n\n**Cost** \nCredits are charged when the job is queued (`credits_charged` in the response). Tools billed per frame charge an estimate and settle to the frames that actually render once the job finishes; tools billed per second charge the final amount upfront. Failed jobs are refunded.\n\nFor detailed examples, see the [product page](https://magichour.ai/products/video-to-video).","summary":"Video-to-Video","tags":["Video Projects"],"parameters":[],"operationId":"videoToVideo.createVideo","requestBody":"fb655617-2200-423e-bfc0-f34d27f8f669","responses":{"200":"7b36c9cc-1d7f-4e41-b2e6-baac3f3f0673","400":"89e8bdfa-82aa-45f3-bee5-5c6f33002e14","401":"2d15fd5a-fb0b-4923-90da-04aa19742504","402":"f9b1cbbd-ae61-4200-a346-f66c539fe58f","404":"b5ad871a-8b8b-4c92-9903-314a17748292","422":"6b54ccd7-e59c-4053-9c76-1c89c18a4fa7","500":"07b2cd2c-f3ce-41bb-bb7b-c68b4bb54a9c"},"security":["7a184c3f-6bb6-4f6d-ba29-13bca7fe59c2"],"x-codeSamples":[{"lang":"python","source":"from magic_hour import Client\nfrom os import getenv\n\nclient = Client(token=getenv(\"MAGIC_HOUR_API_KEY\"))\nres = client.v1.video_to_video.generate(\n assets={\"video_file_path\": \"/path/to/1234.mp4\", \"video_source\": \"file\"},\n end_seconds=15.0,\n start_seconds=0.0,\n style={\n \"art_style\": \"3D Render\",\n \"model\": \"default\",\n \"prompt\": \"string\",\n \"prompt_type\": \"default\",\n \"version\": \"default\",\n },\n fps_resolution=\"HALF\",\n name=\"Video To Video video\",\n wait_for_completion=True,\n download_outputs=True,\n download_directory=\".\"\n)"},{"lang":"javascript","source":"import { Client } from \"magic-hour\";\n\nconst client = new Client({ token: process.env[\"MAGIC_HOUR_API_KEY\"] });\nconst res = await client.v1.videoToVideo.generate(\n {\n assets: { videoFilePath: \"/path/to/1234.mp4\", videoSource: \"file\" },\n endSeconds: 15.0,\n fpsResolution: \"HALF\",\n name: \"Video To Video video\",\n startSeconds: 0.0,\n style: {\n artStyle: \"3D Render\",\n model: \"default\",\n prompt: \"string\",\n promptType: \"default\",\n version: \"default\",\n },\n },\n {\n waitForCompletion: true,\n downloadOutputs: true,\n downloadDirectory: \".\",\n },\n);"},{"lang":"go","source":"package main\n\nimport (\n\tos \"os\"\n\n\tsdk \"github.com/magichourhq/magic-hour-go/client\"\n\tnullable \"github.com/magichourhq/magic-hour-go/nullable\"\n\tvideo_to_video \"github.com/magichourhq/magic-hour-go/resources/v1/video_to_video\"\n\ttypes \"github.com/magichourhq/magic-hour-go/types\"\n)\n\nfunc main() {\n\tclient := sdk.NewClient(\n\t\tsdk.WithBearerAuth(os.Getenv(\"MAGIC_HOUR_API_KEY\")),\n\t)\n\tres, err := client.V1.VideoToVideo.Create(video_to_video.CreateRequest{\n\t\tAssets: types.V1VideoToVideoCreateBodyAssets{\n\t\t\tVideoFilePath: nullable.NewValue(\"api-assets/id/1234.mp4\"),\n\t\t\tVideoSource: types.V1VideoToVideoCreateBodyAssetsVideoSourceEnumFile,\n\t\t},\n\t\tEndSeconds: 5.0,\n\t\tFpsResolution: nullable.NewValue(types.V1VideoToVideoCreateBodyFpsResolutionEnumHalf),\n\t\tName: nullable.NewValue(\"My Video To Video video\"),\n\t\tStartSeconds: 0.0,\n\t\tStyle: types.V1VideoToVideoCreateBodyStyle{\n\t\t\tArtStyle: types.V1VideoToVideoCreateBodyStyleArtStyleEnumMinecraft,\n\t\t\tModel: nullable.NewValue(types.V1VideoToVideoCreateBodyStyleModelEnumDefault),\n\t\t\tPrompt: nullable.NewValue(\"A cinematic scene with warm lighting\"),\n\t\t\tPromptType: nullable.NewValue(types.V1VideoToVideoCreateBodyStylePromptTypeEnumDefault),\n\t\t\tVersion: nullable.NewValue(types.V1VideoToVideoCreateBodyStyleVersionEnumDefault),\n\t\t},\n\t})\n}"},{"lang":"rust","source":"let client = magic_hour::Client::default()\n .with_bearer_auth(\u0026std::env::var(\"MAGIC_HOUR_API_KEY\").unwrap());\nlet res = client\n .v1()\n .video_to_video()\n .create(magic_hour::resources::v1::video_to_video::CreateRequest {\n assets: magic_hour::models::V1VideoToVideoCreateBodyAssets {\n video_file_path: Some(\"api-assets/id/1234.mp4\".to_string()),\n video_source: magic_hour::models::V1VideoToVideoCreateBodyAssetsVideoSourceEnum::File,\n ..Default::default()\n },\n end_seconds: 5.0,\n fps_resolution: Some(\n magic_hour::models::V1VideoToVideoCreateBodyFpsResolutionEnum::Half,\n ),\n name: Some(\"My Video To Video video\".to_string()),\n start_seconds: 0.0,\n style: magic_hour::models::V1VideoToVideoCreateBodyStyle {\n art_style: magic_hour::models::V1VideoToVideoCreateBodyStyleArtStyleEnum::Minecraft,\n model: Some(\n magic_hour::models::V1VideoToVideoCreateBodyStyleModelEnum::Default,\n ),\n prompt: magic_hour::Patch::new(\n \"A cinematic scene with warm lighting\".to_string(),\n ),\n prompt_type: Some(\n magic_hour::models::V1VideoToVideoCreateBodyStylePromptTypeEnum::Default,\n ),\n version: Some(\n magic_hour::models::V1VideoToVideoCreateBodyStyleVersionEnum::Default,\n ),\n },\n ..Default::default()\n })\n .await;"},{"lang":"curl","source":"curl --request POST \\\n --url https://api.magichour.ai/v1/video-to-video \\\n --header 'accept: application/json' \\\n --header \"authorization: Bearer $MAGIC_HOUR_API_KEY\" \\\n --header 'content-type: application/json' \\\n --data '\n{\n \"name\": \"My Video To Video video\",\n \"start_seconds\": 0,\n \"end_seconds\": 5,\n \"fps_resolution\": \"HALF\",\n \"style\": {\n \"art_style\": \"Minecraft\",\n \"version\": \"default\",\n \"prompt_type\": \"default\",\n \"prompt\": \"A cinematic scene with warm lighting\",\n \"model\": \"default\"\n },\n \"assets\": {\n \"video_source\": \"file\",\n \"video_file_path\": \"api-assets/id/1234.mp4\"\n }\n}\n'"},{"lang":"php","source":"\u003c?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n CURLOPT_URL => \"https://api.magichour.ai/v1/video-to-video\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => json_encode([\n 'name' => 'My Video To Video video',\n 'start_seconds' => 0,\n 'end_seconds' => 5,\n 'fps_resolution' => 'HALF',\n 'style' => [\n 'art_style' => 'Minecraft',\n 'version' => 'default',\n 'prompt_type' => 'default',\n 'prompt' => 'A cinematic scene with warm lighting',\n 'model' => 'default'\n ],\n 'assets' => [\n 'video_source' => 'file',\n 'video_file_path' => 'api-assets/id/1234.mp4'\n ]\n ]),\n CURLOPT_HTTPHEADER => [\n \"accept: application/json\",\n \"authorization: Bearer \u003ctoken>\",\n \"content-type: application/json\"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"},{"lang":"java","source":"HttpResponse\u003cString> response = Unirest.post(\"https://api.magichour.ai/v1/video-to-video\")\n .header(\"accept\", \"application/json\")\n .header(\"content-type\", \"application/json\")\n .header(\"authorization\", \"Bearer \u003ctoken>\")\n .body(\"{\\\"name\\\":\\\"My Video To Video video\\\",\\\"start_seconds\\\":0,\\\"end_seconds\\\":5,\\\"fps_resolution\\\":\\\"HALF\\\",\\\"style\\\":{\\\"art_style\\\":\\\"Minecraft\\\",\\\"version\\\":\\\"default\\\",\\\"prompt_type\\\":\\\"default\\\",\\\"prompt\\\":\\\"A cinematic scene with warm lighting\\\",\\\"model\\\":\\\"default\\\"},\\\"assets\\\":{\\\"video_source\\\":\\\"file\\\",\\\"video_file_path\\\":\\\"api-assets/id/1234.mp4\\\"}}\")\n .asString();"}],"method":"post","type":"path","servers":["bff22ee6-56d2-4175-a168-cad9a2398d0a"],"path":"/v1/video-to-video","baseUrlOptions":["https://api.magichour.ai"],"title":"Video-to-Video","codeSamples":[{"lang":"python","source":"from magic_hour import Client\nfrom os import getenv\n\nclient = Client(token=getenv(\"MAGIC_HOUR_API_KEY\"))\nres = client.v1.video_to_video.generate(\n assets={\"video_file_path\": \"/path/to/1234.mp4\", \"video_source\": \"file\"},\n end_seconds=15.0,\n start_seconds=0.0,\n style={\n \"art_style\": \"3D Render\",\n \"model\": \"default\",\n \"prompt\": \"string\",\n \"prompt_type\": \"default\",\n \"version\": \"default\",\n },\n fps_resolution=\"HALF\",\n name=\"Video To Video video\",\n wait_for_completion=True,\n download_outputs=True,\n download_directory=\".\"\n)"},{"lang":"javascript","source":"import { Client } from \"magic-hour\";\n\nconst client = new Client({ token: process.env[\"MAGIC_HOUR_API_KEY\"] });\nconst res = await client.v1.videoToVideo.generate(\n {\n assets: { videoFilePath: \"/path/to/1234.mp4\", videoSource: \"file\" },\n endSeconds: 15.0,\n fpsResolution: \"HALF\",\n name: \"Video To Video video\",\n startSeconds: 0.0,\n style: {\n artStyle: \"3D Render\",\n model: \"default\",\n prompt: \"string\",\n promptType: \"default\",\n version: \"default\",\n },\n },\n {\n waitForCompletion: true,\n downloadOutputs: true,\n downloadDirectory: \".\",\n },\n);"},{"lang":"go","source":"package main\n\nimport (\n\tos \"os\"\n\n\tsdk \"github.com/magichourhq/magic-hour-go/client\"\n\tnullable \"github.com/magichourhq/magic-hour-go/nullable\"\n\tvideo_to_video \"github.com/magichourhq/magic-hour-go/resources/v1/video_to_video\"\n\ttypes \"github.com/magichourhq/magic-hour-go/types\"\n)\n\nfunc main() {\n\tclient := sdk.NewClient(\n\t\tsdk.WithBearerAuth(os.Getenv(\"MAGIC_HOUR_API_KEY\")),\n\t)\n\tres, err := client.V1.VideoToVideo.Create(video_to_video.CreateRequest{\n\t\tAssets: types.V1VideoToVideoCreateBodyAssets{\n\t\t\tVideoFilePath: nullable.NewValue(\"api-assets/id/1234.mp4\"),\n\t\t\tVideoSource: types.V1VideoToVideoCreateBodyAssetsVideoSourceEnumFile,\n\t\t},\n\t\tEndSeconds: 5.0,\n\t\tFpsResolution: nullable.NewValue(types.V1VideoToVideoCreateBodyFpsResolutionEnumHalf),\n\t\tName: nullable.NewValue(\"My Video To Video video\"),\n\t\tStartSeconds: 0.0,\n\t\tStyle: types.V1VideoToVideoCreateBodyStyle{\n\t\t\tArtStyle: types.V1VideoToVideoCreateBodyStyleArtStyleEnumMinecraft,\n\t\t\tModel: nullable.NewValue(types.V1VideoToVideoCreateBodyStyleModelEnumDefault),\n\t\t\tPrompt: nullable.NewValue(\"A cinematic scene with warm lighting\"),\n\t\t\tPromptType: nullable.NewValue(types.V1VideoToVideoCreateBodyStylePromptTypeEnumDefault),\n\t\t\tVersion: nullable.NewValue(types.V1VideoToVideoCreateBodyStyleVersionEnumDefault),\n\t\t},\n\t})\n}"},{"lang":"rust","source":"let client = magic_hour::Client::default()\n .with_bearer_auth(\u0026std::env::var(\"MAGIC_HOUR_API_KEY\").unwrap());\nlet res = client\n .v1()\n .video_to_video()\n .create(magic_hour::resources::v1::video_to_video::CreateRequest {\n assets: magic_hour::models::V1VideoToVideoCreateBodyAssets {\n video_file_path: Some(\"api-assets/id/1234.mp4\".to_string()),\n video_source: magic_hour::models::V1VideoToVideoCreateBodyAssetsVideoSourceEnum::File,\n ..Default::default()\n },\n end_seconds: 5.0,\n fps_resolution: Some(\n magic_hour::models::V1VideoToVideoCreateBodyFpsResolutionEnum::Half,\n ),\n name: Some(\"My Video To Video video\".to_string()),\n start_seconds: 0.0,\n style: magic_hour::models::V1VideoToVideoCreateBodyStyle {\n art_style: magic_hour::models::V1VideoToVideoCreateBodyStyleArtStyleEnum::Minecraft,\n model: Some(\n magic_hour::models::V1VideoToVideoCreateBodyStyleModelEnum::Default,\n ),\n prompt: magic_hour::Patch::new(\n \"A cinematic scene with warm lighting\".to_string(),\n ),\n prompt_type: Some(\n magic_hour::models::V1VideoToVideoCreateBodyStylePromptTypeEnum::Default,\n ),\n version: Some(\n magic_hour::models::V1VideoToVideoCreateBodyStyleVersionEnum::Default,\n ),\n },\n ..Default::default()\n })\n .await;"},{"lang":"curl","source":"curl --request POST \\\n --url https://api.magichour.ai/v1/video-to-video \\\n --header 'accept: application/json' \\\n --header \"authorization: Bearer $MAGIC_HOUR_API_KEY\" \\\n --header 'content-type: application/json' \\\n --data '\n{\n \"name\": \"My Video To Video video\",\n \"start_seconds\": 0,\n \"end_seconds\": 5,\n \"fps_resolution\": \"HALF\",\n \"style\": {\n \"art_style\": \"Minecraft\",\n \"version\": \"default\",\n \"prompt_type\": \"default\",\n \"prompt\": \"A cinematic scene with warm lighting\",\n \"model\": \"default\"\n },\n \"assets\": {\n \"video_source\": \"file\",\n \"video_file_path\": \"api-assets/id/1234.mp4\"\n }\n}\n'"},{"lang":"php","source":"\u003c?php\n\n$curl = curl_init();\n\ncurl_setopt_array($curl, [\n CURLOPT_URL => \"https://api.magichour.ai/v1/video-to-video\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => json_encode([\n 'name' => 'My Video To Video video',\n 'start_seconds' => 0,\n 'end_seconds' => 5,\n 'fps_resolution' => 'HALF',\n 'style' => [\n 'art_style' => 'Minecraft',\n 'version' => 'default',\n 'prompt_type' => 'default',\n 'prompt' => 'A cinematic scene with warm lighting',\n 'model' => 'default'\n ],\n 'assets' => [\n 'video_source' => 'file',\n 'video_file_path' => 'api-assets/id/1234.mp4'\n ]\n ]),\n CURLOPT_HTTPHEADER => [\n \"accept: application/json\",\n \"authorization: Bearer \u003ctoken>\",\n \"content-type: application/json\"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}"},{"lang":"java","source":"HttpResponse\u003cString> response = Unirest.post(\"https://api.magichour.ai/v1/video-to-video\")\n .header(\"accept\", \"application/json\")\n .header(\"content-type\", \"application/json\")\n .header(\"authorization\", \"Bearer \u003ctoken>\")\n .body(\"{\\\"name\\\":\\\"My Video To Video video\\\",\\\"start_seconds\\\":0,\\\"end_seconds\\\":5,\\\"fps_resolution\\\":\\\"HALF\\\",\\\"style\\\":{\\\"art_style\\\":\\\"Minecraft\\\",\\\"version\\\":\\\"default\\\",\\\"prompt_type\\\":\\\"default\\\",\\\"prompt\\\":\\\"A cinematic scene with warm lighting\\\",\\\"model\\\":\\\"default\\\"},\\\"assets\\\":{\\\"video_source\\\":\\\"file\\\",\\\"video_file_path\\\":\\\"api-assets/id/1234.mp4\\\"}}\")\n .asString();"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"description":"Body","content":{"application/json":{"schema":{"type":"object","properties":{"start_seconds":{"type":"number","minimum":0,"description":"Start time of your clip (seconds). Must be ≥ 0.","format":"float","example":0,"isRequired":true,"uniqueKey":"start_seconds","typeLabel":"number\u003cfloat>"},"end_seconds":{"type":"number","minimum":0.1,"description":"End time of your clip (seconds). Must be greater than start_seconds.","format":"float","example":5,"isRequired":true,"uniqueKey":"end_seconds","typeLabel":"number\u003cfloat>"},"style":{"type":"object","properties":{"art_style":{"type":"string","enum":["Minecraft","Watercolor","Pixel","Retro Sci-Fi","Lego","Origami","Ghost","Sub-Zero","Studio Ghibli","Comic","Impressionism","Master Chief","Solid Snake","Street Fighter","Hologram","GTA","Clay","Mystique","Dragonball Z","Mario","Samurai","Spartan","Boba Fett","3D Render","Airbender","Android","Anime Warrior","Armored Knight","Assassin's Creed","Avatar","Black Spiderman","Bold Anime","Celestial Skin","Chinese Swordsmen","Cyberpunk","Cypher","Dark Fantasy","Future Bot","Futuristic Fantasy","Ghibli Anime","Gundam","Illustration","Ink","Ink Poster","Jinx","Knight","Link","Marble","Mech","Naruto","Neon Dream","No Art Style","Oil Painting","On Fire","Painterly Anime","Pixar","Power Armor","Power Ranger","Radiant Anime","Realistic Anime","Realistic Pixar","Retro Anime","Samurai Bot","Sharp Anime","Soft Anime","Starfield","The Void","Tomb Raider","Underwater","Van Gogh","Viking","Western Anime","Wu Kong","Wuxia Anime","Zelda"],"example":"Minecraft","isRequired":true,"uniqueKey":"style.art_style","typeLabel":"enum\u003cstring>"},"version":{"default":"default","type":"string","enum":["v1","v2","default"],"example":"default","description":"* `v1` - more detail, closer prompt adherence, and frame-by-frame previews.\n* `v2` - faster, more consistent, and less noisy.\n* `default` - use the selected art style's default version. Some art styles default to v3, which is unavailable through this API. For `Studio Ghibli`, explicitly set `version` to `v2` to use its supported preset.","uniqueKey":"style.version","typeLabel":"enum\u003cstring>"},"prompt_type":{"default":"default","type":"string","enum":["default","custom","append_default"],"example":"default","description":"* `default` - Use the default recommended prompt for the art style.\n* `custom` - Only use the prompt passed in the API. Note: for v1, lora prompt will still be auto added to apply the art style properly.\n* `append_default` - Add the default recommended prompt to the end of the prompt passed in the API.","uniqueKey":"style.prompt_type","typeLabel":"enum\u003cstring>"},"prompt":{"oneOf":[{"type":"string","example":"A cinematic scene with warm lighting","description":"The prompt used for the video. Prompt is required if `prompt_type` is `custom` or `append_default`. If `prompt_type` is `default`, then the `prompt` value passed will be ignored.","uniqueKey":"style.prompt.oneOf.0","typeLabel":"string"},{"type":"null","example":"A cinematic scene with warm lighting","description":"The prompt used for the video. Prompt is required if `prompt_type` is `custom` or `append_default`. If `prompt_type` is `default`, then the `prompt` value passed will be ignored.","uniqueKey":"style.prompt.oneOf.1","typeLabel":"null"}],"uniqueKey":"style.prompt","typeLabel":"string | null"},"model":{"default":"default","type":"string","enum":["Dreamshaper","Absolute Reality","Flat 2D Anime","Soft Anime","Kaywaii","Western Anime","3D Anime","default"],"example":"default","description":"* `Dreamshaper` - a good all-around model that works for both animations as well as realism.\n* `Absolute Reality` - better at realism, but you'll often get similar results with Dreamshaper as well.\n* `Flat 2D Anime` - best for a flat illustration style that's common in most anime.\n* `default` - use the default recommended model for the selected art style.","uniqueKey":"style.model","typeLabel":"enum\u003cstring>"}},"required":["art_style"],"isRequired":true,"uniqueKey":"style","typeLabel":"object"},"assets":{"type":"object","properties":{"video_source":{"type":"string","enum":["file","youtube"],"description":"Choose your video source.","example":"file","isRequired":true,"uniqueKey":"assets.video_source","typeLabel":"enum\u003cstring>"},"video_file_path":{"type":"string","description":"Your video file. Required if `video_source` is `file`. This value is either\n- a direct URL to the file. The URL path must end in a supported file extension.\n- `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls).\n\nSee the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.\n","example":"api-assets/id/1234.mp4","uniqueKey":"assets.video_file_path","typeLabel":"string"},"youtube_url":{"type":"string","format":"uri","description":"YouTube URL (required if `video_source` is `youtube`).","uniqueKey":"assets.youtube_url","typeLabel":"string\u003curi>"}},"required":["video_source"],"description":"Provide the assets for video-to-video. For video, The `video_source` field determines whether `video_file_path` or `youtube_url` field is used","example":{"video_source":"file","video_file_path":"api-assets/id/1234.mp4"},"isRequired":true,"uniqueKey":"assets","typeLabel":"object"},"name":{"type":"string","description":"Give your video a custom name for easy identification.","example":"My Video To Video video","default":"Video To Video - dateTime","uniqueKey":"name","typeLabel":"string"},"fps_resolution":{"default":"HALF","type":"string","enum":["FULL","HALF"],"description":"Determines whether the resulting video will have the same frame per second as the original video, or half.\n* `FULL` - the result video will have the same FPS as the input video\n* `HALF` - the result video will have half the FPS as the input video","example":"HALF","uniqueKey":"fps_resolution","typeLabel":"enum\u003cstring>"}},"required":["start_seconds","end_seconds","style","assets"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"start_seconds":0,"end_seconds":5,"style":{"art_style":"Minecraft","version":"default","prompt_type":"default","prompt":"A cinematic scene with warm lighting","model":"default"},"assets":{"video_source":"file","video_file_path":"api-assets/id/1234.mp4"},"name":"My Video To Video video","fps_resolution":"HALF"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"7b36c9cc-1d7f-4e41-b2e6-baac3f3f0673":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"cuid-example","description":"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.","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"credits_charged":{"type":"integer","description":"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. \n\nIf video generation fails, credits will be refunded, and this field will be updated to include the refund.","example":450,"isRequired":true,"uniqueKey":"credits_charged","typeLabel":"integer"}},"required":["id","credits_charged"],"description":"Success","uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"cuid-example","credits_charged":450}}},"exampleType":"generated"}},"exampleType":"generated"},"89e8bdfa-82aa-45f3-bee5-5c6f33002e14":{"description":"Invalid Request","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_request"],"description":"Machine-readable error code.\n\n- `invalid_request`: Fix request syntax or validation errors before retrying.","isRequired":true,"uniqueKey":"code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable error message.","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"invalid_request","message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"2d15fd5a-fb0b-4923-90da-04aa19742504":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["unauthorized"],"description":"Machine-readable error code.\n\n- `unauthorized`: Provide a valid API key before retrying.","isRequired":true,"uniqueKey":"code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable error message.","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"unauthorized","message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"f9b1cbbd-ae61-4200-a346-f66c539fe58f":{"description":"Payment Required","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["insufficient_credits","subscription_required","plan_upgrade_required"],"description":"Machine-readable error code.\n\n- `insufficient_credits`: Purchase credits before retrying.\n\n- `subscription_required`: Start a subscription before retrying.\n\n- `plan_upgrade_required`: Upgrade the subscription plan before retrying.","isRequired":true,"uniqueKey":"code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable error message.","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"insufficient_credits","message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"b5ad871a-8b8b-4c92-9903-314a17748292":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["not_found"],"description":"Machine-readable error code.\n\n- `not_found`: Check the route or resource identifier.","isRequired":true,"uniqueKey":"code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable error message.","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"not_found","message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"6b54ccd7-e59c-4053-9c76-1c89c18a4fa7":{"description":"Unprocessable Entity","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["unprocessable_entity"],"description":"Machine-readable error code.\n\n- `unprocessable_entity`: Change the request values before retrying.","isRequired":true,"uniqueKey":"code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable error message.","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"unprocessable_entity","message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"07b2cd2c-f3ce-41bb-bb7b-c68b4bb54a9c":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["internal_server_error"],"description":"Machine-readable error code.\n\n- `internal_server_error`: Retry later or contact support if the error continues.","isRequired":true,"uniqueKey":"code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Human-readable error message.","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"code":"internal_server_error","message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"7a184c3f-6bb6-4f6d-ba29-13bca7fe59c2":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003capi_key>`, where `\u003capi_key>` is your API key. To get your API key, go to [Developer Hub](https://magichour.ai/developer?tab=api-keys\u0026utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=api-reference) and click \"Create new API Key\".","scopes":[],"schemeName":"bearerAuth"}}},"servers":{"bff22ee6-56d2-4175-a168-cad9a2398d0a":{"url":"https://api.magichour.ai"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003capi_key>`, where `\u003capi_key>` is your API key. To get your API key, go to [Developer Hub](https://magichour.ai/developer?tab=api-keys\u0026utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=api-reference) and click \"Create new API Key\".","scopes":[],"schemeName":"bearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003capi_key>`, where `\u003capi_key>` is your API key. To get your API key, go to [Developer Hub](https://magichour.ai/developer?tab=api-keys\u0026utm_source=docs\u0026utm_medium=referral\u0026utm_campaign=api-reference) and click \"Create new API Key\".","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearerAuth","name":"Authorization"}],"title":"bearerAuth"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"magichour","siteName":"Magic Hour API Docs","title":"Video-to-Video - Magic Hour API Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-03T04:29:41.910Z","originalFileLocation":"api-reference/video-projects/video-to-video.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"What this API does Create the same Video To Video 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 to video into apps, pipelines, or tools How it works (3 steps) 1) Upload your inputs (video, image, or audio) with Generate Upload URLs and copy the file_path. 2) Send a request to create a video to video job with the basic fields. 3) Check the job status until it\u0026#x27;s complete, then download the result from downloads. Key options - Inputs: usually a file, sometimes a YouTube link, depending on project type - Resolution: output size and plan requirements vary by workflow and model. Some workflows derive output size from the input video. - Extra fields: e.g. face_swap_mode, start_seconds/end_seconds, or a text prompt Cost Credits are charged when the job is queued (credits_charged in the response). Tools billed per frame charge an estimate and settle to the frames that actually render once the job finishes; tools billed per second charge the final amount upfront. Failed jobs are refunded. For detailed examples, see the product page.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Magic Hour API Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/magichour/pV2W72GIHTaiOFzk/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/magichour/pV2W72GIHTaiOFzk/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/magichour/pV2W72GIHTaiOFzk/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/magichour/pV2W72GIHTaiOFzk/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/magichour/pV2W72GIHTaiOFzk/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/magichour/pV2W72GIHTaiOFzk/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/magichour/pV2W72GIHTaiOFzk/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/magichour/pV2W72GIHTaiOFzk/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/magichour/pV2W72GIHTaiOFzk/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Video-to-Video - Magic Hour API Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"What this API does Create the same Video To Video 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 to video into apps, pipelines, or tools How it works (3 steps) 1) Upload your inputs (video, image, or audio) with Generate Upload URLs and copy the file_path. 2) Send a request to create a video to video job with the basic fields. 3) Check the job status until it\u0026#x27;s complete, then download the result from downloads. Key options - Inputs: usually a file, sometimes a YouTube link, depending on project type - Resolution: output size and plan requirements vary by workflow and model. Some workflows derive output size from the input video. - Extra fields: e.g. face_swap_mode, start_seconds/end_seconds, or a text prompt Cost Credits are charged when the job is queued (credits_charged in the response). Tools billed per frame charge an estimate and settle to the frames that actually render once the job finishes; tools billed per second charge the final amount upfront. Failed jobs are refunded. For detailed examples, see the product page.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Magic Hour API Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.magichour.ai/api-reference/video-projects/video-to-video\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://d28dkohlqf5vwj.cloudfront.net/open-graph/logo-social-noisy-spectrum.jpg\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Video-to-Video - Magic Hour API Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"What this API does Create the same Video To Video 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 to video into apps, pipelines, or tools How it works (3 steps) 1) Upload your inputs (video, image, or audio) with Generate Upload URLs and copy the file_path. 2) Send a request to create a video to video job with the basic fields. 3) Check the job status until it\u0026#x27;s complete, then download the result from downloads. Key options - Inputs: usually a file, sometimes a YouTube link, depending on project type - Resolution: output size and plan requirements vary by workflow and model. Some workflows derive output size from the input video. - Extra fields: e.g. face_swap_mode, start_seconds/end_seconds, or a text prompt Cost Credits are charged when the job is queued (credits_charged in the response). Tools billed per frame charge an estimate and settle to the frames that actually render once the job finishes; tools billed per second charge the final amount upfront. Failed jobs are refunded. For detailed examples, see the product page.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://d28dkohlqf5vwj.cloudfront.net/open-graph/logo-social-noisy-spectrum.jpg\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/magichour/pV2W72GIHTaiOFzk/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Magic Hour API Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#3b82f6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.magichour.ai/api-reference/video-projects/video-to-video\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/video-projects/video-to-video.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.magichour.ai/#organization\",\"name\":\"Magic Hour API Docs\",\"url\":\"https://docs.magichour.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/magichour/5sgGJpuuipkw5s5v/icons/logo-light.svg?fit=max\u0026auto=format\u0026n=5sgGJpuuipkw5s5v\u0026q=85\u0026s=1f167e30baf11927bc2e0932411e455b\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.magichour.ai#website\",\"name\":\"Magic Hour API Docs\",\"url\":\"https://docs.magichour.ai\",\"publisher\":{\"@id\":\"https://docs.magichour.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.magichour.ai/api-reference/video-projects/video-to-video#webpage\",\"url\":\"https://docs.magichour.ai/api-reference/video-projects/video-to-video\",\"name\":\"Video-to-Video\",\"description\":\"What this API does Create the same Video To Video 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 to video into apps, pipelines, or tools How it works (3 steps) 1) Upload your inputs (video, image, or audio) with Generate Upload URLs and copy the file_path. 2) Send a request to create a video to video 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: output size and plan requirements vary by workflow and model. Some workflows derive output size from the input video. - Extra fields: e.g. face_swap_mode, start_seconds/end_seconds, or a text prompt Cost Credits are charged when the job is queued (credits_charged in the response). Tools billed per frame charge an estimate and settle to the frames that actually render once the job finishes; tools billed per second charge the final amount upfront. Failed jobs are refunded. For detailed examples, see the product page.\",\"dateModified\":\"2026-11-03T04:29:41.910Z\",\"isPartOf\":{\"@id\":\"https://docs.magichour.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.magichour.ai/api-reference/video-projects/video-to-video#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.magichour.ai/api-reference/video-projects/video-to-video#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Video Projects\",\"item\":\"https://docs.magichour.ai/api-reference/video-projects/get-video-details\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Video-to-Video\",\"item\":\"https://docs.magichour.ai/api-reference/video-projects/video-to-video\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.magichour.ai/api-reference/video-projects/video-to-video#apireference\",\"headline\":\"Video-to-Video\",\"name\":\"Video-to-Video\",\"description\":\"What this API does Create the same Video To Video 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 to video into apps, pipelines, or tools How it works (3 steps) 1) Upload your inputs (video, image, or audio) with Generate Upload URLs and copy the file_path. 2) Send a request to create a video to video 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: output size and plan requirements vary by workflow and model. Some workflows derive output size from the input video. - Extra fields: e.g. face_swap_mode, start_seconds/end_seconds, or a text prompt Cost Credits are charged when the job is queued (credits_charged in the response). Tools billed per frame charge an estimate and settle to the frames that actually render once the job finishes; tools billed per second charge the final amount upfront. Failed jobs are refunded. For detailed examples, see the product page.\",\"url\":\"https://docs.magichour.ai/api-reference/video-projects/video-to-video\",\"mainEntityOfPage\":{\"@id\":\"https://docs.magichour.ai/api-reference/video-projects/video-to-video#webpage\"},\"image\":\"https://d28dkohlqf5vwj.cloudfront.net/open-graph/logo-social-noisy-spectrum.jpg\",\"dateModified\":\"2026-11-03T04:29:41.910Z\",\"publisher\":{\"@id\":\"https://docs.magichour.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.magichour.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Magic Hour API Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Magic Hour API Docs","nav":{"global":{"anchors":[{"anchor":"API quickstart","icon":"forward-fast","href":"/get-started/quick-start"},{"anchor":"API pricing","icon":"credit-card","href":"/billing/overview"},{"anchor":"Community","icon":"discord","href":"https://discord.com/invite/JX5rgsZaJp"},{"anchor":"Status","icon":"wave-pulse","href":"https://status.magichour.ai"}]},"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":"/introduction"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/overview"},{"title":"Models and Credit Costs","sidebarTitle":"Models","href":"/api-reference/models"},{"title":"Historical API Processing Times","sidebarTitle":"Processing Times","href":"/api-reference/processing-times"},{"group":"Account","pages":[{"title":"Get account details","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/account","href":"/api-reference/account/get-account-details"}]},{"group":"Files","pages":[{"title":"List saved items","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/saved-items","href":"/api-reference/files/list-saved-items"},{"title":"Generate asset upload urls","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/files/upload-urls","href":"/api-reference/files/generate-asset-upload-urls"},{"title":"Get face detection details","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/face-detection/{id}","href":"/api-reference/files/get-face-detection-details"},{"title":"Face Detection","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/face-detection","href":"/api-reference/files/face-detection"}]},{"group":"Video Projects","pages":[{"title":"Get video details","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/video-projects/{id}","href":"/api-reference/video-projects/get-video-details"},{"title":"Delete video","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v1/video-projects/{id}","href":"/api-reference/video-projects/delete-video"},{"title":"AI Talking Photo","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-talking-photo","href":"/api-reference/video-projects/ai-talking-photo"},{"title":"AI UGC Ad Generator","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-ugc-ad","href":"/api-reference/video-projects/ai-ugc-ad-generator"},{"title":"AI Video Editor","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-video-editor","href":"/api-reference/video-projects/ai-video-editor"},{"title":"AI Video Translator","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-video-translator","href":"/api-reference/video-projects/ai-video-translator"},{"title":"AI Video Upscaler","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-video-upscaler","href":"/api-reference/video-projects/ai-video-upscaler"},{"title":"Animation","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/animation","href":"/api-reference/video-projects/animation"},{"title":"Audio-to-Video","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/audio-to-video","href":"/api-reference/video-projects/audio-to-video"},{"title":"Auto Subtitle Generator","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/auto-subtitle-generator","href":"/api-reference/video-projects/auto-subtitle-generator"},{"title":"Character Replace","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/character-replace","href":"/api-reference/video-projects/character-replace"},{"title":"Face Swap Video","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/face-swap","href":"/api-reference/video-projects/face-swap-video"},{"title":"Image-to-Video","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/image-to-video","href":"/api-reference/video-projects/image-to-video"},{"title":"Lip Sync","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/lip-sync","href":"/api-reference/video-projects/lip-sync"},{"title":"Text-to-Video","description":"**What this API does**\n\nCreate the same Text To Video 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.\n \n**Good for**\n- Automation and batch processing \n- Adding text to video into apps, pipelines, or tools \n\n**How it works (3 steps)**\n1) 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`. \n2) Send a request to create a text to video job with the basic fields. \n3) Check the job status until it's `complete`, then download the result from `downloads`.\n\n**Key options**\n- Inputs: usually a file, sometimes a YouTube link, depending on project type \n- Resolution: output size and plan requirements vary by workflow and model. Some workflows derive output size from the input video.\n- Extra fields: e.g. `face_swap_mode`, `start_seconds`/`end_seconds`, or a text prompt \n\n**Cost** \nCredits are charged when the job is queued (`credits_charged` in the response). Tools billed per frame charge an estimate and settle to the frames that actually render once the job finishes; tools billed per second charge the final amount upfront. Failed jobs are refunded.\n\nFor detailed examples, see the [product page](https://magichour.ai/products/text-to-video).","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/text-to-video","href":"/api-reference/video-projects/text-to-video"},{"title":"Video-to-Video","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/video-to-video","href":"/api-reference/video-projects/video-to-video"}]},{"group":"Image Projects","pages":[{"title":"Get image details","description":"Check the progress of a image project. The `downloads` field is populated after a successful render.\n \n**Statuses**\n- `queued` — waiting to start\n- `rendering` — in progress\n- `complete` — ready; see `downloads`\n- `error` — a failure occurred (see `error`)\n- `canceled` — user canceled\n- `draft` — not used","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/image-projects/{id}","href":"/api-reference/image-projects/get-image-details"},{"title":"Delete image","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v1/image-projects/{id}","href":"/api-reference/image-projects/delete-image"},{"title":"AI Clothes Changer","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-clothes-changer","href":"/api-reference/image-projects/ai-clothes-changer"},{"title":"AI Face Editor","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-face-editor","href":"/api-reference/image-projects/ai-face-editor"},{"title":"AI GIF Generator","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-gif-generator","href":"/api-reference/image-projects/ai-gif-generator"},{"title":"AI Image Editor","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-image-editor","href":"/api-reference/image-projects/ai-image-editor"},{"title":"AI Headshot Generator","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-headshot-generator","href":"/api-reference/image-projects/ai-headshot-generator"},{"title":"AI Image Generator","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-image-generator","href":"/api-reference/image-projects/ai-image-generator"},{"title":"AI Image Upscaler","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-image-upscaler","href":"/api-reference/image-projects/ai-image-upscaler"},{"title":"AI Meme Generator","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-meme-generator","href":"/api-reference/image-projects/ai-meme-generator"},{"title":"AI QR Code Generator","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-qr-code-generator","href":"/api-reference/image-projects/ai-qr-code-generator"},{"title":"Body Swap","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/body-swap","href":"/api-reference/image-projects/body-swap"},{"title":"Face Swap Photo","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/face-swap-photo","href":"/api-reference/image-projects/face-swap-photo"},{"title":"Head Swap","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/head-swap","href":"/api-reference/image-projects/head-swap"},{"title":"Image Background Remover","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/image-background-remover","href":"/api-reference/image-projects/image-background-remover"},{"title":"Photo Colorizer","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/photo-colorizer","href":"/api-reference/image-projects/photo-colorizer"}]},{"group":"Audio Projects","pages":[{"title":"Get audio details","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/audio-projects/{id}","href":"/api-reference/audio-projects/get-audio-details"},{"title":"Delete audio","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v1/audio-projects/{id}","href":"/api-reference/audio-projects/delete-audio"},{"title":"AI Music Generator","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-music-generator","href":"/api-reference/audio-projects/ai-music-generator"},{"title":"AI Voice Generator","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-voice-generator","href":"/api-reference/audio-projects/ai-voice-generator"},{"title":"AI Voice Cloner","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-voice-cloner","href":"/api-reference/audio-projects/ai-voice-cloner"}]}],"groups":[{"group":"Account","pages":[{"title":"Get account details","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/account","href":"/api-reference/account/get-account-details"}]},{"group":"Files","pages":[{"title":"List saved items","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/saved-items","href":"/api-reference/files/list-saved-items"},{"title":"Generate asset upload urls","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/files/upload-urls","href":"/api-reference/files/generate-asset-upload-urls"},{"title":"Get face detection details","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/face-detection/{id}","href":"/api-reference/files/get-face-detection-details"},{"title":"Face Detection","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/face-detection","href":"/api-reference/files/face-detection"}]},{"group":"Video Projects","pages":[{"title":"Get video details","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/video-projects/{id}","href":"/api-reference/video-projects/get-video-details"},{"title":"Delete video","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v1/video-projects/{id}","href":"/api-reference/video-projects/delete-video"},{"title":"AI Talking Photo","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-talking-photo","href":"/api-reference/video-projects/ai-talking-photo"},{"title":"AI UGC Ad Generator","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-ugc-ad","href":"/api-reference/video-projects/ai-ugc-ad-generator"},{"title":"AI Video Editor","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-video-editor","href":"/api-reference/video-projects/ai-video-editor"},{"title":"AI Video Translator","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-video-translator","href":"/api-reference/video-projects/ai-video-translator"},{"title":"AI Video Upscaler","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-video-upscaler","href":"/api-reference/video-projects/ai-video-upscaler"},{"title":"Animation","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/animation","href":"/api-reference/video-projects/animation"},{"title":"Audio-to-Video","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/audio-to-video","href":"/api-reference/video-projects/audio-to-video"},{"title":"Auto Subtitle Generator","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/auto-subtitle-generator","href":"/api-reference/video-projects/auto-subtitle-generator"},{"title":"Character Replace","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/character-replace","href":"/api-reference/video-projects/character-replace"},{"title":"Face Swap Video","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/face-swap","href":"/api-reference/video-projects/face-swap-video"},{"title":"Image-to-Video","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/image-to-video","href":"/api-reference/video-projects/image-to-video"},{"title":"Lip Sync","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/lip-sync","href":"/api-reference/video-projects/lip-sync"},{"title":"Text-to-Video","description":"**What this API does**\n\nCreate the same Text To Video 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.\n \n**Good for**\n- Automation and batch processing \n- Adding text to video into apps, pipelines, or tools \n\n**How it works (3 steps)**\n1) 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`. \n2) Send a request to create a text to video job with the basic fields. \n3) Check the job status until it's `complete`, then download the result from `downloads`.\n\n**Key options**\n- Inputs: usually a file, sometimes a YouTube link, depending on project type \n- Resolution: output size and plan requirements vary by workflow and model. Some workflows derive output size from the input video.\n- Extra fields: e.g. `face_swap_mode`, `start_seconds`/`end_seconds`, or a text prompt \n\n**Cost** \nCredits are charged when the job is queued (`credits_charged` in the response). Tools billed per frame charge an estimate and settle to the frames that actually render once the job finishes; tools billed per second charge the final amount upfront. Failed jobs are refunded.\n\nFor detailed examples, see the [product page](https://magichour.ai/products/text-to-video).","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/text-to-video","href":"/api-reference/video-projects/text-to-video"},{"title":"Video-to-Video","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/video-to-video","href":"/api-reference/video-projects/video-to-video"}]},{"group":"Image Projects","pages":[{"title":"Get image details","description":"Check the progress of a image project. The `downloads` field is populated after a successful render.\n \n**Statuses**\n- `queued` — waiting to start\n- `rendering` — in progress\n- `complete` — ready; see `downloads`\n- `error` — a failure occurred (see `error`)\n- `canceled` — user canceled\n- `draft` — not used","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/image-projects/{id}","href":"/api-reference/image-projects/get-image-details"},{"title":"Delete image","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v1/image-projects/{id}","href":"/api-reference/image-projects/delete-image"},{"title":"AI Clothes Changer","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-clothes-changer","href":"/api-reference/image-projects/ai-clothes-changer"},{"title":"AI Face Editor","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-face-editor","href":"/api-reference/image-projects/ai-face-editor"},{"title":"AI GIF Generator","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-gif-generator","href":"/api-reference/image-projects/ai-gif-generator"},{"title":"AI Image Editor","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-image-editor","href":"/api-reference/image-projects/ai-image-editor"},{"title":"AI Headshot Generator","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-headshot-generator","href":"/api-reference/image-projects/ai-headshot-generator"},{"title":"AI Image Generator","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-image-generator","href":"/api-reference/image-projects/ai-image-generator"},{"title":"AI Image Upscaler","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-image-upscaler","href":"/api-reference/image-projects/ai-image-upscaler"},{"title":"AI Meme Generator","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-meme-generator","href":"/api-reference/image-projects/ai-meme-generator"},{"title":"AI QR Code Generator","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-qr-code-generator","href":"/api-reference/image-projects/ai-qr-code-generator"},{"title":"Body Swap","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/body-swap","href":"/api-reference/image-projects/body-swap"},{"title":"Face Swap Photo","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/face-swap-photo","href":"/api-reference/image-projects/face-swap-photo"},{"title":"Head Swap","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/head-swap","href":"/api-reference/image-projects/head-swap"},{"title":"Image Background Remover","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/image-background-remover","href":"/api-reference/image-projects/image-background-remover"},{"title":"Photo Colorizer","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/photo-colorizer","href":"/api-reference/image-projects/photo-colorizer"}]},{"group":"Audio Projects","pages":[{"title":"Get audio details","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /v1/audio-projects/{id}","href":"/api-reference/audio-projects/get-audio-details"},{"title":"Delete audio","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /v1/audio-projects/{id}","href":"/api-reference/audio-projects/delete-audio"},{"title":"AI Music Generator","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-music-generator","href":"/api-reference/audio-projects/ai-music-generator"},{"title":"AI Voice Cloner","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-voice-cloner","href":"/api-reference/audio-projects/ai-voice-cloner"},{"title":"AI Voice Generator","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /v1/ai-voice-generator","href":"/api-reference/audio-projects/ai-voice-generator"}]}]},{"tab":"Webhook Reference","pages":[{"title":"Webhook Reference","href":"/webhook-reference/overview"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Video-to-Video - Magic Hour API Docs","buildId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","deploymentId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DCDCdBVX.js","utils-ME8dDnLe.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-0e84ACsd.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-wgRBj-ia.js","snippetPresets-C11Sgb-o.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-C0lapOpP.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-ZeRQV8fF.js","shallow-BupWh095.js","getApiPlaygroundDisplay-BnYQO2Ss.js","CodeSnippet-RKKOc8c_.js","CodeSnippets-Drf_m8wS.js","Page-Bevw23-4.js","getPastedJson-u6QiPzNZ.js","icon-Bb-CBSxO.js","MethodPill-F7l5AI7V.js","DuplicateIcon-IiAXkdSg.js","createIcon-FliI8EBc.js","DynamicMarkdown-B62XqCSI.js","SectionHeading-Dj31pT03.js","axios-vUo_bRtp.js","Markdown-BOgQCTwD.js","clsx-BIWXJmsZ.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-DKZWslLH.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-UDqbR6xh.js"]}