{ "error": "Batas unggah media tercapai (maksimal 60 berkas per jam). Coba lagi dalam 12 menit."}
Stores one media file in Vidgen and returns an asset object that you can paste directly into references on POST /api/v1/generate.This endpoint uses multipart/form-data, not JSON.
A single file. Images JPG/PNG/WebP, video MP4/WebM, or audio MP3/WAV. Maximum 100 MB; empty files are rejected. The format is recognized from the file contents, not from the extension or Content-Type.
Seconds for video/audio. This key is absent when the length cannot be detected (for example, images). On motion control models this is the value that determines the output duration.
60 files per hour per account, with a Retry-After header when you hit 429
Image too small
Shortest side below 100 px → 400
Image too large
Shortest side < 300 px, longest side > 1920 px, total > 4 million px, or > 3 MB → downscaled automatically
General video/audio
Duration 2–15 seconds; longer video is trimmed to about 14.5 seconds
Motion control
Duration 3–30 seconds; orientation: "image" caps it at 10 seconds
Reference video minimum
Total pixels ≥ 300,000 and shortest side ≥ 360 px
Unreadable duration (motion)
400 — re-export as MP4
Assets have no client-facing expiry date. If you need to reuse the same reference for weeks, keep the original file in your own storage and upload it again when needed.
{ "error": "Batas unggah media tercapai (maksimal 60 berkas per jam). Coba lagi dalam 12 menit."}
{"docsConfig":{"theme":"luma","$schema":"https://mintlify.com/docs.json","name":"Vidgen API Docs","description":"Dokumentasi resmi Vidgen API — generate video, gambar, dan audio lewat satu API key. Quickstart, referensi endpoint, batas pemakaian, dan pemecahan masalah.","colors":{"primary":"#c9c4b8","light":"#e9e6df","dark":"#8f8a80"},"logo":{"light":"https://mintcdn.com/vidgen/PkfHG7lSv_ZkpypT/logo/light.svg?fit=max\u0026auto=format\u0026n=PkfHG7lSv_ZkpypT\u0026q=85\u0026s=3c8fb13b964a5133e89b3bd1b651bee6","dark":"https://mintcdn.com/vidgen/PkfHG7lSv_ZkpypT/logo/dark.svg?fit=max\u0026auto=format\u0026n=PkfHG7lSv_ZkpypT\u0026q=85\u0026s=47feeb240cfbac5b9fc09dc329c3a16f","href":"https://vidgen.id"},"favicon":"https://mintcdn.com/vidgen/PkfHG7lSv_ZkpypT/favicon.svg?fit=max\u0026auto=format\u0026n=PkfHG7lSv_ZkpypT\u0026q=85\u0026s=3060ccd18fc92cb83292b9b13294ec47","api":{"mdx":{"auth":{"method":"bearer"},"server":"https://vidgen.id"}},"appearance":{"default":"dark","strict":false},"navbar":{"links":[{"href":"https://vidgen.id/generator","label":"Dashboard"}],"primary":{"type":"button","label":"Ambil API Key","href":"https://vidgen.id/docs"}},"footer":{"socials":{"x":"https://x.com/vidgen"},"links":[{"header":"Produk","items":[{"label":"Vidgen Studio","href":"https://vidgen.id/generator"},{"label":"Harga","href":"https://vidgen.id/"},{"label":"Pustaka","href":"https://vidgen.id/library"}]},{"header":"Developers","items":[{"label":"Quickstart","href":"https://docs.vidgen.id/quickstart"},{"label":"Referensi API","href":"https://docs.vidgen.id/api-reference/overview"},{"label":"Kode error","href":"https://docs.vidgen.id/troubleshooting/errors"}]}]},"seo":{"metatags":{"canonical":"https://docs.vidgen.id","og:locale":"id_ID","og:site_name":"Vidgen API"},"indexing":"navigable"},"icons":{"library":"lucide"},"interaction":{"drilldown":true},"styling":{"latex":false},"navigation":{"languages":[{"language":"id","href":""},{"language":"en","href":"en"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"vidgen","hasAudioNarration":false,"actualSubdomain":"vidgen","customDomains":["docs.vidgen.id"],"gitSource":{"type":"github","owner":"dafidxcode","repo":"vidgen-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":"","_id":"6ae9b4ab626a14a9d451c5fc"},"chroma":{"latestBuiltDeploymentHistoryId":"6aeafb6719d8a3cecd672932","collectionId":"b1a8099b-86fe-4a05-8366-70ba11680f6e","liveDeploymentHistoryId":"6aeafb6719d8a3cecd672932","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aeafb6719d8a3cecd672932","clientVersion":"0.0.4054","searchFilterCounts":[{"language":"id","tag":"Dokumentasi","count":15},{"language":"en","tag":"Documentation","count":15},{"language":"id","tag":"Mulai","count":6},{"language":"id","tag":"Referensi API","count":6},{"language":"en","tag":"Get started","count":6},{"language":"en","tag":"API Reference","count":6},{"language":"id","tag":"Konsep","count":5},{"language":"en","tag":"Concepts","count":5},{"language":"id","tag":"Panduan","count":4},{"language":"en","tag":"Guides","count":4},{"language":"id","tag":"Katalog \u0026 Akun","count":2},{"language":"id","tag":"Generate","count":2},{"language":"id","tag":"Bantuan","count":2},{"language":"id","tag":"Pemecahan masalah","count":2},{"language":"en","tag":"Catalog \u0026 account","count":2},{"language":"en","tag":"Generate","count":2},{"language":"en","tag":"Support","count":2},{"language":"en","tag":"Troubleshooting","count":2},{"language":"id","tag":"Ikhtisar","count":1},{"language":"en","tag":"Overview","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"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":"rbac-expansion","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":"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":"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},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"en/api-reference/upload","slug":"/en/api-reference/upload","pageMetadata":{"title":"Upload reference media","description":"Upload an image, video, or audio file for use as a generation reference. Returns an asset object.","keywords":["POST /api/v1/upload","multipart","upload reference image","image to video source material"],"api":"POST /api/v1/upload","href":"/en/api-reference/upload"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Upload an image, video, or audio file for use as a generation reference. Returns an asset object.\"\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,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Expandable,Heading,Note,ParamField,ResponseField,Table,Warning}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Stores one media file in Vidgen and returns an `,_jsx(_components.code,{children:`asset`}),` object that you can paste directly into `,_jsx(_components.code,{children:`references`}),` on `,_jsx(_components.a,{href:`/en/api-reference/generate`,children:_jsx(_components.code,{children:`POST /api/v1/generate`})}),`.`]}),`\n`,_jsxs(_components.p,{children:[`This endpoint uses `,_jsx(_components.code,{children:`multipart/form-data`}),`, not JSON.`]}),`\n`,_jsx(Heading,{level:`3`,id:`authorizations`,children:`Authorizations`}),`\n`,_jsx(ParamField,{path:`Authorization`,type:`string`,required:true,id:`param-authorization`,children:_jsxs(_components.p,{children:[`API key formatted `,_jsx(_components.code,{children:`Bearer vg_...`}),`.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`form-data`,children:`Form data`}),`\n`,_jsx(ParamField,{body:`file`,type:`binary (multipart)`,required:true,id:`param-file`,children:_jsxs(_components.p,{children:[`A single file. Images JPG/PNG/WebP, video MP4/WebM, or audio MP3/WAV. Maximum 100 MB; empty files are rejected. The format is recognized from the file contents, not from the extension or `,_jsx(_components.code,{children:`Content-Type`}),`.`]})}),`\n`,_jsxs(ParamField,{body:`model`,type:`string`,id:`param-model`,children:[_jsx(_components.p,{children:`Target model id. Not required, but it decides which rules the server applies:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Motion control models: the reference video duration range is loosened to 3–30 seconds and the video is `,_jsx(_components.strong,{children:`not`}),` trimmed automatically.`]}),`\n`,_jsx(_components.li,{children:`Other models: video longer than 15 seconds is trimmed to about 14.5 seconds, and audio must be 2–15 seconds.`}),`\n`,_jsx(_components.li,{children:`Some storage paths store files differently per model.`}),`\n`]})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`If you upload a reference video for motion control without `,_jsx(_components.code,{children:`model`}),`, the server treats it as a general video and trims it to 14.5 seconds.`]})}),`\n`,`\n`,_jsx(Heading,{level:`3`,id:`responses`,children:`Responses`}),`\n`,_jsx(ResponseField,{name:`success`,type:`boolean`,required:true,id:`param-success`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`true`}),` when the file was stored.`]})}),`\n`,_jsxs(ResponseField,{name:`asset`,type:`object`,required:true,id:`param-asset`,children:[_jsxs(_components.p,{children:[`Carry this object whole into the `,_jsx(_components.code,{children:`references`}),` field.`]}),_jsxs(Expandable,{title:`contents of asset`,defaultOpen:true,children:[_jsx(ResponseField,{name:`id`,type:`string`,required:true,id:`param-id`,children:_jsxs(_components.p,{children:[`Asset identifier. On the local storage path it is the file name on the server, for example `,_jsx(_components.code,{children:`ref_api_1762261900_gerakan.mp4`}),`.`]})}),_jsx(ResponseField,{name:`url`,type:`string`,required:true,id:`param-url`,children:_jsxs(_components.p,{children:[`Media location. Usually `,_jsx(_components.code,{children:`/api/media/{nama-berkas}`}),`.`]})}),_jsx(ResponseField,{name:`file_url`,type:`string`,id:`param-file-url`,children:_jsxs(_components.p,{children:[`Identical to `,_jsx(_components.code,{children:`url`}),` on the local storage path. On other paths it holds the full link.`]})}),_jsx(ResponseField,{name:`type`,type:`string`,required:true,id:`param-type`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`\"image\"`}),`, `,_jsx(_components.code,{children:`\"video\"`}),`, or `,_jsx(_components.code,{children:`\"audio\"`}),` — the result of inspecting the file contents.`]})}),_jsx(ResponseField,{name:`filename`,type:`string`,id:`param-filename`,children:_jsxs(_components.p,{children:[`File name in server storage, `,_jsx(_components.strong,{children:`not`}),` the name you sent. Do not build paths from it.`]})}),_jsx(ResponseField,{name:`duration`,type:`number`,id:`param-duration`,children:_jsxs(_components.p,{children:[`Seconds for video/audio. This key is `,_jsx(_components.strong,{children:`absent`}),` when the length cannot be detected (for example, images). On motion control models this is the value that determines the output duration.`]})}),_jsx(ResponseField,{name:`width`,type:`number`,id:`param-width`,children:_jsx(_components.p,{children:`Detected width; also absent when unavailable.`})}),_jsx(ResponseField,{name:`height`,type:`number`,id:`param-height`,children:_jsx(_components.p,{children:`Detected height; also absent when unavailable.`})})]})]}),`\n`,`\n`,_jsx(Heading,{level:`2`,id:`limits-enforced-here`,children:`Limits enforced here`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Aspect`}),_jsx(_components.th,{children:`Rule`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Size`}),_jsx(_components.td,{children:`100 MB per file`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Rate`}),_jsxs(_components.td,{children:[`60 files per hour per account, with a `,_jsx(_components.code,{children:`Retry-After`}),` header when you hit `,_jsx(_components.code,{children:`429`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Image too small`}),_jsxs(_components.td,{children:[`Shortest side below 100 px → `,_jsx(_components.code,{children:`400`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Image too large`}),_jsx(_components.td,{children:`Shortest side \u003c 300 px, longest side > 1920 px, total > 4 million px, or > 3 MB → downscaled automatically`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`General video/audio`}),_jsx(_components.td,{children:`Duration 2–15 seconds; longer video is trimmed to about 14.5 seconds`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Motion control`}),_jsxs(_components.td,{children:[`Duration 3–30 seconds; `,_jsx(_components.code,{children:`orientation: \"image\"`}),` caps it at 10 seconds`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Reference video minimum`}),_jsx(_components.td,{children:`Total pixels ≥ 300,000 and shortest side ≥ 360 px`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Unreadable duration (motion)`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`400`}),` — re-export as MP4`]})]})]})]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`Assets have no client-facing expiry date. If you need to reuse the same reference for weeks, keep the original file in your own storage and upload it again when needed.`})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Upload reference media","description":"Upload an image, video, or audio file for use as a generation reference. Returns an asset object.","keywords":["POST /api/v1/upload","multipart","upload reference image","image to video source material"],"api":"POST /api/v1/upload","href":"/en/api-reference/upload"}}},"mdxSourceWithNoJs":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,Note,ParamField,RequestExample,ResponseExample,ResponseField,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Stores one media file in Vidgen and returns an `,_jsx(_components.code,{children:`asset`}),` object that you can paste directly into `,_jsx(_components.code,{children:`references`}),` on `,_jsx(_components.a,{href:`/en/api-reference/generate`,children:_jsx(_components.code,{children:`POST /api/v1/generate`})}),`.`]}),`\n`,_jsxs(_components.p,{children:[`This endpoint uses `,_jsx(_components.code,{children:`multipart/form-data`}),`, not JSON.`]}),`\n`,_jsx(Heading,{level:`3`,id:`authorizations`,children:`Authorizations`}),`\n`,_jsx(ParamField,{path:`Authorization`,type:`string`,required:true,id:`param-authorization`,children:_jsxs(_components.p,{children:[`API key formatted `,_jsx(_components.code,{children:`Bearer vg_...`}),`.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`form-data`,children:`Form data`}),`\n`,_jsx(ParamField,{body:`file`,type:`binary (multipart)`,required:true,id:`param-file`,children:_jsxs(_components.p,{children:[`A single file. Images JPG/PNG/WebP, video MP4/WebM, or audio MP3/WAV. Maximum 100 MB; empty files are rejected. The format is recognized from the file contents, not from the extension or `,_jsx(_components.code,{children:`Content-Type`}),`.`]})}),`\n`,_jsxs(ParamField,{body:`model`,type:`string`,id:`param-model`,children:[_jsx(_components.p,{children:`Target model id. Not required, but it decides which rules the server applies:`}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Motion control models: the reference video duration range is loosened to 3–30 seconds and the video is `,_jsx(_components.strong,{children:`not`}),` trimmed automatically.`]}),`\n`,_jsx(_components.li,{children:`Other models: video longer than 15 seconds is trimmed to about 14.5 seconds, and audio must be 2–15 seconds.`}),`\n`,_jsx(_components.li,{children:`Some storage paths store files differently per model.`}),`\n`]})]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`If you upload a reference video for motion control without `,_jsx(_components.code,{children:`model`}),`, the server treats it as a general video and trims it to 14.5 seconds.`]})}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://vidgen.id/api/v1/upload`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer vg_4b1a82f3c9d0e1f2a3b4c5d6e7f80912\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -F`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"file=@gerakan.mp4\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -F`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model=kling-mc-3-0-pro\"`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`11`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` form`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` FormData`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`form`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`append`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"file\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Blob`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`([`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`bytes`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`], { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`type:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"video/mp4\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }), `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"gerakan.mp4\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`form`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`append`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"kling-mc-3-0-pro\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`asset`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://vidgen.id/api/v1/upload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Authorization:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" `Bearer \"}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:\"${\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`process`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`env`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`VIDGEN_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"`\"}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` form`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`).`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`10`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`with`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` open`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"gerakan.mp4\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"rb\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` f:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` res `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://vidgen.id/api/v1/upload\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` files`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"file\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: f},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"kling-mc-3-0-pro\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` timeout`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`180`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` )`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`asset `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` res.json()[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"asset\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`responses`,children:`Responses`}),`\n`,_jsx(ResponseField,{name:`success`,type:`boolean`,required:true,id:`param-success`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`true`}),` when the file was stored.`]})}),`\n`,_jsxs(ResponseField,{name:`asset`,type:`object`,required:true,id:`param-asset`,children:[_jsxs(_components.p,{children:[`Carry this object whole into the `,_jsx(_components.code,{children:`references`}),` field.`]}),_jsxs(Expandable,{title:`contents of asset`,defaultOpen:true,children:[_jsx(ResponseField,{name:`id`,type:`string`,required:true,id:`param-id`,children:_jsxs(_components.p,{children:[`Asset identifier. On the local storage path it is the file name on the server, for example `,_jsx(_components.code,{children:`ref_api_1762261900_gerakan.mp4`}),`.`]})}),_jsx(ResponseField,{name:`url`,type:`string`,required:true,id:`param-url`,children:_jsxs(_components.p,{children:[`Media location. Usually `,_jsx(_components.code,{children:`/api/media/{nama-berkas}`}),`.`]})}),_jsx(ResponseField,{name:`file_url`,type:`string`,id:`param-file-url`,children:_jsxs(_components.p,{children:[`Identical to `,_jsx(_components.code,{children:`url`}),` on the local storage path. On other paths it holds the full link.`]})}),_jsx(ResponseField,{name:`type`,type:`string`,required:true,id:`param-type`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`\"image\"`}),`, `,_jsx(_components.code,{children:`\"video\"`}),`, or `,_jsx(_components.code,{children:`\"audio\"`}),` — the result of inspecting the file contents.`]})}),_jsx(ResponseField,{name:`filename`,type:`string`,id:`param-filename`,children:_jsxs(_components.p,{children:[`File name in server storage, `,_jsx(_components.strong,{children:`not`}),` the name you sent. Do not build paths from it.`]})}),_jsx(ResponseField,{name:`duration`,type:`number`,id:`param-duration`,children:_jsxs(_components.p,{children:[`Seconds for video/audio. This key is `,_jsx(_components.strong,{children:`absent`}),` when the length cannot be detected (for example, images). On motion control models this is the value that determines the output duration.`]})}),_jsx(ResponseField,{name:`width`,type:`number`,id:`param-width`,children:_jsx(_components.p,{children:`Detected width; also absent when unavailable.`})}),_jsx(ResponseField,{name:`height`,type:`number`,id:`param-height`,children:_jsx(_components.p,{children:`Detected height; also absent when unavailable.`})})]})]}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`200`,numberOfLines:`13`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`13`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"success\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"asset\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ref_api_1762261900_gerakan.mp4\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/api/media/ref_api_1762261900_gerakan.mp4\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"file_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/api/media/ref_api_1762261900_gerakan.mp4\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"video\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"filename\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ref_api_1762261900_gerakan.mp4\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"duration\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`8.42`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"width\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1080`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"height\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1920`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`400 — duration out of range`,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Durasi Video referensi (48.0 detik) di luar batas (2-15 detik).\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`413 — file too large`,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Ukuran berkas melebihi batas maksimal 100 MB.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`429 — upload limit reached`,numberOfLines:`3`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`3`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"error\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Batas unggah media tercapai (maksimal 60 berkas per jam). Coba lagi dalam 12 menit.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`limits-enforced-here`,children:`Limits enforced here`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Aspect`}),_jsx(_components.th,{children:`Rule`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Size`}),_jsx(_components.td,{children:`100 MB per file`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Rate`}),_jsxs(_components.td,{children:[`60 files per hour per account, with a `,_jsx(_components.code,{children:`Retry-After`}),` header when you hit `,_jsx(_components.code,{children:`429`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Image too small`}),_jsxs(_components.td,{children:[`Shortest side below 100 px → `,_jsx(_components.code,{children:`400`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Image too large`}),_jsx(_components.td,{children:`Shortest side \u003c 300 px, longest side > 1920 px, total > 4 million px, or > 3 MB → downscaled automatically`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`General video/audio`}),_jsx(_components.td,{children:`Duration 2–15 seconds; longer video is trimmed to about 14.5 seconds`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Motion control`}),_jsxs(_components.td,{children:[`Duration 3–30 seconds; `,_jsx(_components.code,{children:`orientation: \"image\"`}),` caps it at 10 seconds`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Reference video minimum`}),_jsx(_components.td,{children:`Total pixels ≥ 300,000 and shortest side ≥ 360 px`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Unreadable duration (motion)`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`400`}),` — re-export as MP4`]})]})]})]}),`\n`,_jsx(Note,{children:_jsx(_components.p,{children:`Assets have no client-facing expiry date. If you need to reuse the same reference for weeks, keep the original file in your own storage and upload it again when needed.`})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Upload reference media","description":"Upload an image, video, or audio file for use as a generation reference. Returns an asset object.","keywords":["POST /api/v1/upload","multipart","upload reference image","image to video source material"],"api":"POST /api/v1/upload","href":"/en/api-reference/upload"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Authorizations","slug":"authorizations","depth":3,"children":[]},{"title":"Form data","slug":"form-data","depth":3,"children":[]},{"title":"Responses","slug":"responses","depth":3,"children":[]},{"title":"Limits enforced here","slug":"limits-enforced-here","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"4\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://vidgen.id/api/v1/upload\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization: Bearer vg_4b1a82f3c9d0e1f2a3b4c5d6e7f80912\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -F\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"file=@gerakan.mp4\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -F\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"model=kling-mc-3-0-pro\"\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Node.js","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"javascript\">\u003ccode language=\"javascript\" numberOfLines=\"11\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> form\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\"> new\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> FormData\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">();\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">form\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">append\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"file\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">new\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> Blob\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">([\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">bytes\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">], { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">type:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"video/mp4\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }), \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"gerakan.mp4\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">);\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">form\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">append\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"model\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"kling-mc-3-0-pro\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">);\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\">asset\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> } \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> (\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> fetch\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"https://vidgen.id/api/v1/upload\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> method:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"POST\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> headers:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">Authorization:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> `Bearer \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#569CD6\">${\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">process\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">env\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\">VIDGEN_API_KEY\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#569CD6\">}\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">`\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> body:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> form\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> })\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">).\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">json\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">();\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"10\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">with\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\"> open\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"gerakan.mp4\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"rb\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">) \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">as\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> f:\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> res \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests.post(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://vidgen.id/api/v1/upload\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> headers\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Authorization\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">f\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Bearer \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">{\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">api_key\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">}\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">},\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> files\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"file\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: f},\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> data\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"model\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"kling-mc-3-0-pro\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">},\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> timeout\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">180\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> )\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">asset \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> res.json()[\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"asset\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">]\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"200","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"13\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"success\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"asset\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"ref_api_1762261900_gerakan.mp4\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"url\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"/api/media/ref_api_1762261900_gerakan.mp4\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"file_url\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"/api/media/ref_api_1762261900_gerakan.mp4\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"video\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"filename\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"ref_api_1762261900_gerakan.mp4\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"duration\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">8.42\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"width\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1080\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"height\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1920\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"400 — duration out of range","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"3\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Durasi Video referensi (48.0 detik) di luar batas (2-15 detik).\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"413 — file too large","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"3\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Ukuran berkas melebihi batas maksimal 100 MB.\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"429 — upload limit reached","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"3\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"error\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Batas unggah media tercapai (maksimal 60 berkas per jam). Coba lagi dalam 12 menit.\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Upload reference media","path":"/api/v1/upload","servers":[{"url":"https://vidgen.id"}],"method":"post","request":{"security":[{"title":"Bearer Auth","parameters":{"header":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{},"cookie":{},"path":{"Authorization":{"schema":[{"type":"string","description":"API key formatted `Bearer vg_...` .","required":true}]}}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"file":[{"type":"object","properties":{},"description":"A single file. Images JPG/PNG/WebP, video MP4/WebM, or audio MP3/WAV. Maximum 100 MB; empty files are rejected. The format is recognized from the file contents, not from the extension or `Content-Type` .","required":true}],"model":[{"type":"string","description":"Target model id. Not required, but it decides which rules the server applies: Motion control models: the reference video duration range is loosened to 3–30 seconds and the video is not trimmed automatically. Other models: video longer than 15 seconds is trimmed to about 14.5 seconds, and audio must be 2–15 seconds. Some storage paths store files differently per model."}]}}],"examples":{"example":{"value":{"file":{},"model":"\u003cstring>"}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"success":[{"type":"boolean","description":"`true` when the file was stored.","required":true}],"asset":[{"type":"object","properties":{"id":[{"type":"string","description":"Asset identifier. On the local storage path it is the file name on the server, for example `ref_api_1762261900_gerakan.mp4` .","required":true}],"url":[{"type":"string","description":"Media location. Usually `/api/media/{nama-berkas}` .","required":true}],"file_url":[{"type":"string","description":"Identical to `url` on the local storage path. On other paths it holds the full link."}],"type":[{"type":"string","description":"`\"image\"` , `\"video\"` , or `\"audio\"` — the result of inspecting the file contents.","required":true}],"filename":[{"type":"string","description":"File name in server storage, not the name you sent. Do not build paths from it."}],"duration":[{"type":"number","description":"Seconds for video/audio. This key is absent when the length cannot be detected (for example, images). On motion control models this is the value that determines the output duration."}],"width":[{"type":"number","description":"Detected width; also absent when unavailable."}],"height":[{"type":"number","description":"Detected height; also absent when unavailable."}]},"description":"Carry this object whole into the `references` field.","required":true}]}}],"examples":{"example":{"value":{"success":true,"asset":{"id":"\u003cstring>","url":"\u003cstring>","file_url":"\u003cstring>","type":"\u003cstring>","filename":"\u003cstring>","duration":123,"width":123,"height":123}}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"vidgen","siteName":"Vidgen API Docs","title":"Upload reference media - Vidgen API Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"id":{"href":"/api-reference/upload","matchLevel":1},"en":{"href":"/en/api-reference/upload","matchLevel":0}}},"lastModified":"2026-11-04T09:11:35.758Z","originalFileLocation":"en/api-reference/upload.mdx","locale":"en"},"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=\"Upload an image, video, or audio file for use as a generation reference. Returns an asset object.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Vidgen 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/vidgen/BbwuXMvwiYQ3bWHE/_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/vidgen/BbwuXMvwiYQ3bWHE/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/vidgen/BbwuXMvwiYQ3bWHE/_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/vidgen/BbwuXMvwiYQ3bWHE/_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/vidgen/BbwuXMvwiYQ3bWHE/_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/vidgen/BbwuXMvwiYQ3bWHE/_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/vidgen/BbwuXMvwiYQ3bWHE/_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/vidgen/BbwuXMvwiYQ3bWHE/_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/vidgen/BbwuXMvwiYQ3bWHE/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Upload reference media - Vidgen API Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Upload an image, video, or audio file for use as a generation reference. Returns an asset object.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Vidgen API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.vidgen.id/en/api-reference/upload\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://vidgen.mintlify.app/_mintlify/api/og/v2?division=Media\u0026amp;title=Upload+reference+media\u0026amp;description=Upload+an+image%2C+video%2C+or+audio+file+for+use+as+a+generation+reference.+Returns+an+asset+object.\u0026amp;theme=91ecb3ef6f970435f9dcd990\u0026amp;signature=fadaff87e5ba847d9053a2e5f78994a14f7f159cb0b5ccf46f3538f378006ff7\">\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=\"Upload reference media - Vidgen API Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Upload an image, video, or audio file for use as a generation reference. Returns an asset object.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://vidgen.mintlify.app/_mintlify/api/og/v2?division=Media\u0026amp;title=Upload+reference+media\u0026amp;description=Upload+an+image%2C+video%2C+or+audio+file+for+use+as+a+generation+reference.+Returns+an+asset+object.\u0026amp;theme=91ecb3ef6f970435f9dcd990\u0026amp;signature=fadaff87e5ba847d9053a2e5f78994a14f7f159cb0b5ccf46f3538f378006ff7\">\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/vidgen/BbwuXMvwiYQ3bWHE/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Vidgen API Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#c9c4b8\">\u003cmeta data-mint-head name=\"og:locale\" content=\"id_ID\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.vidgen.id/en/api-reference/upload\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/en/api-reference/upload.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.vidgen.id/en/api-reference/upload\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"id\" href=\"https://docs.vidgen.id/api-reference/upload\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.vidgen.id/api-reference/upload\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.vidgen.id/#organization\",\"name\":\"Vidgen API Docs\",\"url\":\"https://docs.vidgen.id\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/vidgen/PkfHG7lSv_ZkpypT/logo/light.svg?fit=max\u0026auto=format\u0026n=PkfHG7lSv_ZkpypT\u0026q=85\u0026s=3c8fb13b964a5133e89b3bd1b651bee6\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.vidgen.id#website\",\"name\":\"Vidgen API Docs\",\"url\":\"https://docs.vidgen.id\",\"publisher\":{\"@id\":\"https://docs.vidgen.id/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.vidgen.id/en/api-reference/upload#webpage\",\"url\":\"https://docs.vidgen.id/en/api-reference/upload\",\"name\":\"Upload reference media\",\"description\":\"Upload an image, video, or audio file for use as a generation reference. Returns an asset object.\",\"dateModified\":\"2026-11-04T09:11:35.758Z\",\"isPartOf\":{\"@id\":\"https://docs.vidgen.id#website\"},\"breadcrumb\":{\"@id\":\"https://docs.vidgen.id/en/api-reference/upload#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.vidgen.id/en/api-reference/upload#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Vidgen API Docs\",\"item\":\"https://docs.vidgen.id\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Upload reference media\",\"item\":\"https://docs.vidgen.id/en/api-reference/upload\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.vidgen.id/en/api-reference/upload#apireference\",\"headline\":\"Upload reference media\",\"name\":\"Upload reference media\",\"description\":\"Upload an image, video, or audio file for use as a generation reference. Returns an asset object.\",\"url\":\"https://docs.vidgen.id/en/api-reference/upload\",\"mainEntityOfPage\":{\"@id\":\"https://docs.vidgen.id/en/api-reference/upload#webpage\"},\"dateModified\":\"2026-11-04T09:11:35.758Z\",\"keywords\":\"POST /api/v1/upload, multipart, upload reference image, image to video source material\",\"publisher\":{\"@id\":\"https://docs.vidgen.id/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.vidgen.id#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Vidgen API Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Vidgen API Docs","nav":{"global":null,"languages":[{"language":"id","pages":[{"title":"id","href":"/api-reference/upload"}]},{"language":"en","tabs":[{"tab":"Documentation","icon":"book-open","pages":[{"title":"Documentation","href":"/en"}]},{"tab":"API Reference","icon":"square-terminal","groups":[{"group":"Overview","pages":[{"title":"API reference overview","href":"/en/api-reference/overview"}]},{"group":"Generate","pages":[{"title":"Create a generation job","api":"POST /api/v1/generate","href":"/en/api-reference/generate"},{"title":"Get job status","description":"Poll the status of a generation job, read the queue position, and fetch the result URL.","api":"GET /api/v1/jobs/{id}","href":"/en/api-reference/get-job"}]},{"group":"Media","pages":[{"title":"Upload reference media","api":"POST /api/v1/upload","href":"/en/api-reference/upload"}]},{"group":"Catalog \u0026 account","pages":[{"title":"List models","description":"The catalog of active models with credit pricing, durations, ratios, resolutions, and per-model reference limits.","api":"GET /api/v1/models","href":"/en/api-reference/models"},{"title":"Account balance \u0026 limits","api":"GET /api/v1/user/credits","href":"/en/api-reference/credits"}]}]},{"tab":"Support","icon":"life-buoy","pages":[{"title":"Support","href":"/en/troubleshooting/errors"}]}]}]},"basePath":"","title":"Upload reference media - Vidgen API Docs","buildId":"dpl_345ReqzYaAjzS9QpeJemsKdb7KDj","deploymentId":"dpl_345ReqzYaAjzS9QpeJemsKdb7KDj","dynamics":["c2aa737661","b0f84f53ff","2b790eda92"],"chunks":["OpenApiReferenceProvider-C8RPHPxo.js","utils-0BK-9q6z.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DfjzsUJT.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-B4v9psJ4.js","snippetPresets-CpTQv-Ez.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","Page-Buji1S4J.js","ApiExamples-BNP-Fvr0.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BSgu6h1D.js","shallow-Biv1i9Gs.js","getApiPlaygroundDisplay-BoGOXhtF.js","CodeSnippet-DvQoT18_.js","CodeSnippets-Dnpa15xT.js","getPastedJson-xAIyhUFE.js","icon-S6FBih11.js","MethodPill-SaYeUZyk.js","DuplicateIcon-Cs-p3v2Q.js","createIcon-DjCFEoHq.js","DynamicMarkdown-BcnBltEQ.js","SectionHeading-BUBl0eEF.js","axios-vUo_bRtp.js"]}