Model id from the catalog, for example seedance-2-5-flash. Spellings with dots and hyphens are treated the same. A model that exists but is currently disabled is answered 409.
A description of what you want created. Required except for motion control models, which may leave it empty because the server fills in a neutral instruction. Maximum 2,500 characters for motion models.The prompt passes through content filtering first; sensitive words, public figures, or indications of abuse are removed before the request is forwarded. Some models sold openly without filtering are recognizable by their id (spicy, nsfw) and are not filtered.
Duration in seconds, e.g. "5" or "30". A trailing s is accepted and stripped. Validated against capabilities.durations. Ignored on motion control models.
"image", "video", or "audio". May be omitted — the server detects it from the file contents. Maximum counts per type depend on the model (defaults: 9 images / 1 video / 1 audio; image models allow 10 images and no video or audio).
Minimum 8 characters. The same key returns the existing job with 200 and idempotent: true, without a second credit deduction. Below 8 characters, your value is ignored and the server generates its own key. See Idempotency.
curl -X POST https://vidgen.id/api/v1/generate \ -H "Authorization: Bearer vg_4b1a82f3c9d0e1f2a3b4c5d6e7f80912" \ -H "Content-Type: application/json" \ -d '{ "model": "seedance-2-5-flash", "prompt": "secangkir kopi di meja kayu, cahaya pagi, kamera dolly perlahan ke kanan", "parameters": { "duration": "5", "ratio": "16:9", "resolution": "720p" }, "idempotencyKey": "order-4711-a39f2c7b" }'
const res = await fetch("https://vidgen.id/api/v1/generate", { method: "POST", headers: { Authorization: `Bearer ${process.env.VIDGEN_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ model: "seedance-2-5-flash", prompt: "secangkir kopi di meja kayu, cahaya pagi, kamera dolly perlahan ke kanan", parameters: { duration: "5", ratio: "16:9", resolution: "720p" }, idempotencyKey: "order-4711-a39f2c7b", }),});console.log(res.status, await res.json());
res = requests.post( "https://vidgen.id/api/v1/generate", headers={"Authorization": f"Bearer {api_key}"}, json={ "model": "seedance-2-5-flash", "prompt": "secangkir kopi di meja kayu, cahaya pagi, kamera dolly perlahan ke kanan", "parameters": {"duration": "5", "ratio": "16:9", "resolution": "720p"}, "idempotencyKey": "order-4711-a39f2c7b", },)print(res.status_code, res.json())
Generation is asynchronous. 202 means the request was accepted and the queue entry is set up; you fetch the result later through the job id. The only 200 on this endpoint is an idempotent replay.
When are credits deducted and when do they come back?
They are deducted before the job is saved. If the job fails, the cancellation fails to save, or the queue is full, the credits are refunded automatically with a refund reason recorded in the account history. You do not need to build your own refund mechanism.
Can a request be safely repeated?
Yes, as long as you use the same idempotencyKey with a length of at least 8 characters. Without it, every retry is a new job with a new charge.
Extra fields in the body are ignored?
Yes. A body sending watermark: false or n: 2 produces no error, but also no effect. Only model, prompt, parameters, references, and idempotencyKey are read.
Limits that make this request get rejected
Two concurrent processes (Unlimited accounts only), 50 successful videos per day, the server queue being full, or the site being under maintenance. All of them use 429 or 503.
⌘I
curl -X POST https://vidgen.id/api/v1/generate \ -H "Authorization: Bearer vg_4b1a82f3c9d0e1f2a3b4c5d6e7f80912" \ -H "Content-Type: application/json" \ -d '{ "model": "seedance-2-5-flash", "prompt": "secangkir kopi di meja kayu, cahaya pagi, kamera dolly perlahan ke kanan", "parameters": { "duration": "5", "ratio": "16:9", "resolution": "720p" }, "idempotencyKey": "order-4711-a39f2c7b" }'
const res = await fetch("https://vidgen.id/api/v1/generate", { method: "POST", headers: { Authorization: `Bearer ${process.env.VIDGEN_API_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ model: "seedance-2-5-flash", prompt: "secangkir kopi di meja kayu, cahaya pagi, kamera dolly perlahan ke kanan", parameters: { duration: "5", ratio: "16:9", resolution: "720p" }, idempotencyKey: "order-4711-a39f2c7b", }),});console.log(res.status, await res.json());
res = requests.post( "https://vidgen.id/api/v1/generate", headers={"Authorization": f"Bearer {api_key}"}, json={ "model": "seedance-2-5-flash", "prompt": "secangkir kopi di meja kayu, cahaya pagi, kamera dolly perlahan ke kanan", "parameters": {"duration": "5", "ratio": "16:9", "resolution": "720p"}, "idempotencyKey": "order-4711-a39f2c7b", },)print(res.status_code, res.json())
{ "success": true, "job": { "id": "9f2c1d34-a8b7-4e0f-9a1b-2c3d4e5f6a7b", "status": "queued", "model": "seedance-2-5-flash", "category": "Video", "prompt": "secangkir kopi di meja kayu, cahaya pagi, kamera dolly perlahan ke kanan", "creditsCharged": 3, "createdAt": "2026-11-04T09:12:44.000Z" }, "queue": { "position": 2, "status": "queued" }}
{ "error": "Kredit akun tidak mencukupi. Pembuatan ini membutuhkan 10 kredit", "requiredCredits": 10, "currentCredits": 4}
{ "error": "Maksimal 2 proses generate bersamaan. Tunggu salah satunya selesai sebelum memulai yang baru.", "maxConcurrent": 2, "activeJobs": 2}
{ "error": "Parameter tidak valid: Durasi 60s tidak didukung Seedance 2.5 Flash. Pilihan: 20s.", "fields": ["Durasi 60s tidak didukung Seedance 2.5 Flash. Pilihan: 20s."]}
{"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/generate","slug":"/en/api-reference/generate","pageMetadata":{"title":"Create a generation job","description":"Send a prompt and references to create a video or image. Returns a job id for polling.","keywords":["POST /api/v1/generate","text to video","image to video","202 accepted"],"api":"POST /api/v1/generate","href":"/en/api-reference/generate"},"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: \"Send a prompt and references to create a video or image. Returns a job id for polling.\"\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`,p:`p`,strong:`strong`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,Expandable,Heading,Info,ParamField,ResponseField}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Creates one generation job. Credits are deducted at this endpoint, and the request is answered `,_jsx(_components.strong,{children:`before`}),` the result is ready.`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Need the list of models you can put in the `,_jsx(_components.code,{children:`model`}),` field? Get it from `,_jsx(_components.a,{href:`/en/api-reference/models`,children:_jsx(_components.code,{children:`GET /api/v1/models`})}),`. The valid `,_jsx(_components.code,{children:`parameters`}),` values also depend on the model.`]})}),`\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_...`}),`. You can also use the `,_jsx(_components.code,{children:`x-api-key`}),` header.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`request-body`,children:`Request body`}),`\n`,_jsx(ParamField,{body:`model`,type:`string`,required:true,id:`param-model`,children:_jsxs(_components.p,{children:[`Model id from the catalog, for example `,_jsx(_components.code,{children:`seedance-2-5-flash`}),`. Spellings with dots and hyphens are treated the same. A model that exists but is currently disabled is answered `,_jsx(_components.code,{children:`409`}),`.`]})}),`\n`,_jsxs(ParamField,{body:`prompt`,type:`string`,id:`param-prompt`,children:[_jsxs(_components.p,{children:[`A description of what you want created. `,_jsx(_components.strong,{children:`Required`}),` except for motion control models, which may leave it empty because the server fills in a neutral instruction. Maximum 2,500 characters for motion models.`]}),_jsxs(_components.p,{children:[`The prompt passes through content filtering first; sensitive words, public figures, or indications of abuse are removed before the request is forwarded. Some models sold openly without filtering are recognizable by their id (`,_jsx(_components.code,{children:`spicy`}),`, `,_jsx(_components.code,{children:`nsfw`}),`) and are not filtered.`]})]}),`\n`,_jsxs(ParamField,{body:`parameters`,type:`object`,default:`{}`,id:`param-parameters`,children:[_jsx(_components.p,{children:`Output settings. Only recognized keys are processed; other keys are ignored without an error.`}),_jsxs(Expandable,{title:`recognized properties`,children:[_jsx(ParamField,{body:`duration`,type:`string`,id:`param-duration`,children:_jsxs(_components.p,{children:[`Duration in seconds, e.g. `,_jsx(_components.code,{children:`\"5\"`}),` or `,_jsx(_components.code,{children:`\"30\"`}),`. A trailing `,_jsx(_components.code,{children:`s`}),` is accepted and stripped. Validated against `,_jsx(_components.code,{children:`capabilities.durations`}),`. `,_jsx(_components.strong,{children:`Ignored on motion control models.`})]})}),_jsx(ParamField,{body:`resolution`,type:`string`,id:`param-resolution`,children:_jsxs(_components.p,{children:[`Resolution, e.g. `,_jsx(_components.code,{children:`\"720p\"`}),`, `,_jsx(_components.code,{children:`\"1080p\"`}),`, `,_jsx(_components.code,{children:`\"1K\"`}),`, `,_jsx(_components.code,{children:`\"2K\"`}),`, `,_jsx(_components.code,{children:`\"4K\"`}),`. Validated against `,_jsx(_components.code,{children:`capabilities.resolutions`}),`.`]})}),_jsx(ParamField,{body:`ratio`,type:`string`,id:`param-ratio`,children:_jsxs(_components.p,{children:[`Aspect ratio: `,_jsx(_components.code,{children:`\"16:9\"`}),`, `,_jsx(_components.code,{children:`\"9:16\"`}),`, `,_jsx(_components.code,{children:`\"1:1\"`}),`, `,_jsx(_components.code,{children:`\"4:3\"`}),`, `,_jsx(_components.code,{children:`\"3:4\"`}),`, or `,_jsx(_components.code,{children:`\"auto\"`}),`. `,_jsx(_components.code,{children:`aspect_ratio`}),` is accepted as an alias.`]})}),_jsx(ParamField,{body:`quality`,type:`string`,id:`param-quality`,children:_jsxs(_components.p,{children:[`For image models that have `,_jsx(_components.code,{children:`capabilities.qualities`}),` (`,_jsx(_components.code,{children:`low`}),`, `,_jsx(_components.code,{children:`medium`}),`, `,_jsx(_components.code,{children:`high`}),`, `,_jsx(_components.code,{children:`max`}),`). Ignored if the model does not support it.`]})}),_jsx(ParamField,{body:`background`,type:`string`,id:`param-background`,children:_jsxs(_components.p,{children:[`For image models that have `,_jsx(_components.code,{children:`capabilities.backgrounds`}),` (`,_jsx(_components.code,{children:`auto`}),`, `,_jsx(_components.code,{children:`transparent`}),`, `,_jsx(_components.code,{children:`opaque`}),`).`]})}),_jsx(ParamField,{body:`output_format`,type:`string`,id:`param-output-format`,children:_jsxs(_components.p,{children:[`Output format; `,_jsx(_components.code,{children:`format`}),` is accepted as an alias. Only used if the model has `,_jsx(_components.code,{children:`capabilities.outputFormats`}),`.`]})}),_jsx(ParamField,{body:`negative_prompt`,type:`string`,id:`param-negative-prompt`,children:_jsxs(_components.p,{children:[`What you do not want. Only forwarded if `,_jsx(_components.code,{children:`capabilities.supportsNegativePrompt`}),`.`]})}),_jsx(ParamField,{body:`seed`,type:`string`,id:`param-seed`,children:_jsxs(_components.p,{children:[`Random seed for reproducible results. Only forwarded if `,_jsx(_components.code,{children:`capabilities.supportsSeed`}),`.`]})}),_jsx(ParamField,{body:`orientation`,type:`string`,id:`param-orientation`,children:_jsxs(_components.p,{children:[`Motion control only: `,_jsx(_components.code,{children:`\"image\"`}),` (output ratio follows the character image) or `,_jsx(_components.code,{children:`\"video\"`}),` (output ratio follows the motion video). Other values are ignored.`]})})]})]}),`\n`,_jsxs(ParamField,{body:`references`,type:`array\u003cobject>`,id:`param-references`,children:[_jsxs(_components.p,{children:[`Input material: character images, products, or motion videos. Each object can be an asset from `,_jsx(_components.a,{href:`/en/api-reference/upload`,children:_jsx(_components.code,{children:`POST /api/v1/upload`})}),` `,_jsx(_components.strong,{children:`or`}),` a public URL.`]}),_jsxs(Expandable,{title:`reference object`,children:[_jsx(ParamField,{body:`id`,type:`string`,id:`param-id`,children:_jsxs(_components.p,{children:[`Asset id from the upload endpoint. If present, this object is used as-is (also send `,_jsx(_components.code,{children:`url`}),`, `,_jsx(_components.code,{children:`file_url`}),`, and `,_jsx(_components.code,{children:`filename`}),` exactly as you received them).`]})}),_jsx(ParamField,{body:`url`,type:`string`,id:`param-url`,children:_jsxs(_components.p,{children:[`A public media URL (`,_jsx(_components.code,{children:`http`}),` or `,_jsx(_components.code,{children:`https`}),`) that the server will download with a 20 second timeout. Download failures are answered `,_jsx(_components.code,{children:`400`}),`.`]})}),_jsx(ParamField,{body:`type`,type:`string`,id:`param-type`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`\"image\"`}),`, `,_jsx(_components.code,{children:`\"video\"`}),`, or `,_jsx(_components.code,{children:`\"audio\"`}),`. May be omitted — the server detects it from the file contents. Maximum counts per type depend on the model (defaults: 9 images / 1 video / 1 audio; image models allow 10 images and no video or audio).`]})}),_jsx(ParamField,{body:`filename`,type:`string`,id:`param-filename`,children:_jsx(_components.p,{children:`File name in server storage. Follow the exact value from the upload response.`})})]})]}),`\n`,_jsx(ParamField,{body:`idempotencyKey`,type:`string`,id:`param-idempotency-key`,children:_jsxs(_components.p,{children:[`Minimum 8 characters. The same key returns the existing job with `,_jsx(_components.code,{children:`200`}),` and `,_jsx(_components.code,{children:`idempotent: true`}),`, without a second credit deduction. Below 8 characters, your value is ignored and the server generates its own key. See `,_jsx(_components.a,{href:`/en/concepts/idempotency`,children:`Idempotency`}),`.`]})}),`\n`,`\n`,_jsx(Heading,{level:`3`,id:`responses`,children:`Responses`}),`\n`,_jsx(ResponseField,{name:`success`,type:`boolean`,id:`param-success`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`true`}),` on every successful response.`]})}),`\n`,_jsxs(ResponseField,{name:`job`,type:`object`,required:true,id:`param-job`,children:[_jsx(_components.p,{children:`The job object.`}),_jsxs(Expandable,{title:`job properties`,defaultOpen:true,children:[_jsx(ResponseField,{name:`id`,type:`string`,required:true,id:`param-id-1`,children:_jsxs(_components.p,{children:[`The id to poll at `,_jsx(_components.code,{children:`GET /api/v1/jobs/{id}`}),`.`]})}),_jsx(ResponseField,{name:`status`,type:`string`,required:true,id:`param-status`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`\"queued\"`}),` for a new job. Other values: `,_jsx(_components.code,{children:`dispatching`}),`, `,_jsx(_components.code,{children:`processing`}),`, `,_jsx(_components.code,{children:`succeeded`}),`, `,_jsx(_components.code,{children:`failed`}),`, `,_jsx(_components.code,{children:`cancelled`}),`.`]})}),_jsx(ResponseField,{name:`model`,type:`string`,id:`param-model-1`,children:_jsx(_components.p,{children:`Model id that was used.`})}),_jsx(ResponseField,{name:`category`,type:`string`,id:`param-category`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`\"Video\"`}),`, `,_jsx(_components.code,{children:`\"Image\"`}),`, or `,_jsx(_components.code,{children:`\"Audio\"`}),`.`]})}),_jsx(ResponseField,{name:`prompt`,type:`string`,id:`param-prompt-1`,children:_jsxs(_components.p,{children:[`The prompt `,_jsx(_components.strong,{children:`after`}),` content filtering. This is what was actually processed.`]})}),_jsx(ResponseField,{name:`creditsCharged`,type:`number`,required:true,id:`param-credits-charged`,children:_jsxs(_components.p,{children:[`Credits deducted. `,_jsx(_components.code,{children:`0`}),` when the Unlimited quota covered it.`]})}),_jsx(ResponseField,{name:`createdAt`,type:`string (ISO 8601)`,id:`param-created-at`,children:_jsx(_components.p,{children:`When the job was created, UTC.`})}),_jsx(ResponseField,{name:`result`,type:`object | null`,id:`param-result`,children:_jsxs(_components.p,{children:[`Only populated on an idempotent replay of an already finished job; always `,_jsx(_components.code,{children:`null`}),` for a new job.`]})})]})]}),`\n`,_jsxs(ResponseField,{name:`queue`,type:`object`,id:`param-queue`,children:[_jsx(_components.p,{children:`Queue information at the moment the request was made.`}),_jsxs(Expandable,{title:`contents of queue`,children:[_jsx(ResponseField,{name:`position`,type:`number`,id:`param-position`,children:_jsxs(_components.p,{children:[`Position in the queue. `,_jsx(_components.code,{children:`0`}),` means it is being processed or the position is not reported.`]})}),_jsx(ResponseField,{name:`status`,type:`string`,id:`param-status-1`,children:_jsxs(_components.p,{children:[`Mirrors the job status, usually `,_jsx(_components.code,{children:`\"queued\"`}),`.`]})})]})]}),`\n`,_jsx(ResponseField,{name:`idempotent`,type:`boolean`,id:`param-idempotent`,children:_jsx(_components.p,{children:`Only present when the same key was already used and the original job is being returned.`})}),`\n`,`\n`,_jsx(Heading,{level:`2`,id:`what-you-need-to-know`,children:`What you need to know`}),`\n`,_jsxs(AccordionGroup,{children:[_jsx(Accordion,{title:`Why 202 and not 200?`,id:`why-202-and-not-200`,children:_jsxs(_components.p,{children:[`Generation is asynchronous. `,_jsx(_components.code,{children:`202`}),` means the request was accepted and the queue entry is set up; you fetch the result later through the job id. The only `,_jsx(_components.code,{children:`200`}),` on this endpoint is an idempotent replay.`]})}),_jsx(Accordion,{title:`When are credits deducted and when do they come back?`,id:`when-are-credits-deducted-and-when-do-they-come-back`,children:_jsx(_components.p,{children:`They are deducted before the job is saved. If the job fails, the cancellation fails to save, or the queue is full, the credits are refunded automatically with a refund reason recorded in the account history. You do not need to build your own refund mechanism.`})}),_jsx(Accordion,{title:`Can a request be safely repeated?`,id:`can-a-request-be-safely-repeated`,children:_jsxs(_components.p,{children:[`Yes, as long as you use the same `,_jsx(_components.code,{children:`idempotencyKey`}),` with a length of at least 8 characters. Without it, every retry is a new job with a new charge.`]})}),_jsx(Accordion,{title:`Extra fields in the body are ignored?`,id:`extra-fields-in-the-body-are-ignored`,children:_jsxs(_components.p,{children:[`Yes. A body sending `,_jsx(_components.code,{children:`watermark: false`}),` or `,_jsx(_components.code,{children:`n: 2`}),` produces no error, but also no effect. Only `,_jsx(_components.code,{children:`model`}),`, `,_jsx(_components.code,{children:`prompt`}),`, `,_jsx(_components.code,{children:`parameters`}),`, `,_jsx(_components.code,{children:`references`}),`, and `,_jsx(_components.code,{children:`idempotencyKey`}),` are read.`]})}),_jsx(Accordion,{title:`Limits that make this request get rejected`,id:`limits-that-make-this-request-get-rejected`,children:_jsxs(_components.p,{children:[`Two concurrent processes (Unlimited accounts only), 50 successful videos per day, the server queue being full, or the site being under maintenance. All of them use `,_jsx(_components.code,{children:`429`}),` or `,_jsx(_components.code,{children:`503`}),`.`]})})]})]})}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":"Create a generation job","description":"Send a prompt and references to create a video or image. Returns a job id for polling.","keywords":["POST /api/v1/generate","text to video","image to video","202 accepted"],"api":"POST /api/v1/generate","href":"/en/api-reference/generate"}}},"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`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{Accordion,AccordionGroup,CodeBlock,Expandable,Heading,Info,ParamField,RequestExample,ResponseExample,ResponseField}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!AccordionGroup)_missingMdxReference(`AccordionGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Creates one generation job. Credits are deducted at this endpoint, and the request is answered `,_jsx(_components.strong,{children:`before`}),` the result is ready.`]}),`\n`,_jsx(Info,{children:_jsxs(_components.p,{children:[`Need the list of models you can put in the `,_jsx(_components.code,{children:`model`}),` field? Get it from `,_jsx(_components.a,{href:`/en/api-reference/models`,children:_jsx(_components.code,{children:`GET /api/v1/models`})}),`. The valid `,_jsx(_components.code,{children:`parameters`}),` values also depend on the model.`]})}),`\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_...`}),`. You can also use the `,_jsx(_components.code,{children:`x-api-key`}),` header.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`request-body`,children:`Request body`}),`\n`,_jsx(ParamField,{body:`model`,type:`string`,required:true,id:`param-model`,children:_jsxs(_components.p,{children:[`Model id from the catalog, for example `,_jsx(_components.code,{children:`seedance-2-5-flash`}),`. Spellings with dots and hyphens are treated the same. A model that exists but is currently disabled is answered `,_jsx(_components.code,{children:`409`}),`.`]})}),`\n`,_jsxs(ParamField,{body:`prompt`,type:`string`,id:`param-prompt`,children:[_jsxs(_components.p,{children:[`A description of what you want created. `,_jsx(_components.strong,{children:`Required`}),` except for motion control models, which may leave it empty because the server fills in a neutral instruction. Maximum 2,500 characters for motion models.`]}),_jsxs(_components.p,{children:[`The prompt passes through content filtering first; sensitive words, public figures, or indications of abuse are removed before the request is forwarded. Some models sold openly without filtering are recognizable by their id (`,_jsx(_components.code,{children:`spicy`}),`, `,_jsx(_components.code,{children:`nsfw`}),`) and are not filtered.`]})]}),`\n`,_jsxs(ParamField,{body:`parameters`,type:`object`,default:`{}`,id:`param-parameters`,children:[_jsx(_components.p,{children:`Output settings. Only recognized keys are processed; other keys are ignored without an error.`}),_jsxs(Expandable,{title:`recognized properties`,children:[_jsx(ParamField,{body:`duration`,type:`string`,id:`param-duration`,children:_jsxs(_components.p,{children:[`Duration in seconds, e.g. `,_jsx(_components.code,{children:`\"5\"`}),` or `,_jsx(_components.code,{children:`\"30\"`}),`. A trailing `,_jsx(_components.code,{children:`s`}),` is accepted and stripped. Validated against `,_jsx(_components.code,{children:`capabilities.durations`}),`. `,_jsx(_components.strong,{children:`Ignored on motion control models.`})]})}),_jsx(ParamField,{body:`resolution`,type:`string`,id:`param-resolution`,children:_jsxs(_components.p,{children:[`Resolution, e.g. `,_jsx(_components.code,{children:`\"720p\"`}),`, `,_jsx(_components.code,{children:`\"1080p\"`}),`, `,_jsx(_components.code,{children:`\"1K\"`}),`, `,_jsx(_components.code,{children:`\"2K\"`}),`, `,_jsx(_components.code,{children:`\"4K\"`}),`. Validated against `,_jsx(_components.code,{children:`capabilities.resolutions`}),`.`]})}),_jsx(ParamField,{body:`ratio`,type:`string`,id:`param-ratio`,children:_jsxs(_components.p,{children:[`Aspect ratio: `,_jsx(_components.code,{children:`\"16:9\"`}),`, `,_jsx(_components.code,{children:`\"9:16\"`}),`, `,_jsx(_components.code,{children:`\"1:1\"`}),`, `,_jsx(_components.code,{children:`\"4:3\"`}),`, `,_jsx(_components.code,{children:`\"3:4\"`}),`, or `,_jsx(_components.code,{children:`\"auto\"`}),`. `,_jsx(_components.code,{children:`aspect_ratio`}),` is accepted as an alias.`]})}),_jsx(ParamField,{body:`quality`,type:`string`,id:`param-quality`,children:_jsxs(_components.p,{children:[`For image models that have `,_jsx(_components.code,{children:`capabilities.qualities`}),` (`,_jsx(_components.code,{children:`low`}),`, `,_jsx(_components.code,{children:`medium`}),`, `,_jsx(_components.code,{children:`high`}),`, `,_jsx(_components.code,{children:`max`}),`). Ignored if the model does not support it.`]})}),_jsx(ParamField,{body:`background`,type:`string`,id:`param-background`,children:_jsxs(_components.p,{children:[`For image models that have `,_jsx(_components.code,{children:`capabilities.backgrounds`}),` (`,_jsx(_components.code,{children:`auto`}),`, `,_jsx(_components.code,{children:`transparent`}),`, `,_jsx(_components.code,{children:`opaque`}),`).`]})}),_jsx(ParamField,{body:`output_format`,type:`string`,id:`param-output-format`,children:_jsxs(_components.p,{children:[`Output format; `,_jsx(_components.code,{children:`format`}),` is accepted as an alias. Only used if the model has `,_jsx(_components.code,{children:`capabilities.outputFormats`}),`.`]})}),_jsx(ParamField,{body:`negative_prompt`,type:`string`,id:`param-negative-prompt`,children:_jsxs(_components.p,{children:[`What you do not want. Only forwarded if `,_jsx(_components.code,{children:`capabilities.supportsNegativePrompt`}),`.`]})}),_jsx(ParamField,{body:`seed`,type:`string`,id:`param-seed`,children:_jsxs(_components.p,{children:[`Random seed for reproducible results. Only forwarded if `,_jsx(_components.code,{children:`capabilities.supportsSeed`}),`.`]})}),_jsx(ParamField,{body:`orientation`,type:`string`,id:`param-orientation`,children:_jsxs(_components.p,{children:[`Motion control only: `,_jsx(_components.code,{children:`\"image\"`}),` (output ratio follows the character image) or `,_jsx(_components.code,{children:`\"video\"`}),` (output ratio follows the motion video). Other values are ignored.`]})})]})]}),`\n`,_jsxs(ParamField,{body:`references`,type:`array\u003cobject>`,id:`param-references`,children:[_jsxs(_components.p,{children:[`Input material: character images, products, or motion videos. Each object can be an asset from `,_jsx(_components.a,{href:`/en/api-reference/upload`,children:_jsx(_components.code,{children:`POST /api/v1/upload`})}),` `,_jsx(_components.strong,{children:`or`}),` a public URL.`]}),_jsxs(Expandable,{title:`reference object`,children:[_jsx(ParamField,{body:`id`,type:`string`,id:`param-id`,children:_jsxs(_components.p,{children:[`Asset id from the upload endpoint. If present, this object is used as-is (also send `,_jsx(_components.code,{children:`url`}),`, `,_jsx(_components.code,{children:`file_url`}),`, and `,_jsx(_components.code,{children:`filename`}),` exactly as you received them).`]})}),_jsx(ParamField,{body:`url`,type:`string`,id:`param-url`,children:_jsxs(_components.p,{children:[`A public media URL (`,_jsx(_components.code,{children:`http`}),` or `,_jsx(_components.code,{children:`https`}),`) that the server will download with a 20 second timeout. Download failures are answered `,_jsx(_components.code,{children:`400`}),`.`]})}),_jsx(ParamField,{body:`type`,type:`string`,id:`param-type`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`\"image\"`}),`, `,_jsx(_components.code,{children:`\"video\"`}),`, or `,_jsx(_components.code,{children:`\"audio\"`}),`. May be omitted — the server detects it from the file contents. Maximum counts per type depend on the model (defaults: 9 images / 1 video / 1 audio; image models allow 10 images and no video or audio).`]})}),_jsx(ParamField,{body:`filename`,type:`string`,id:`param-filename`,children:_jsx(_components.p,{children:`File name in server storage. Follow the exact value from the upload response.`})})]})]}),`\n`,_jsx(ParamField,{body:`idempotencyKey`,type:`string`,id:`param-idempotency-key`,children:_jsxs(_components.p,{children:[`Minimum 8 characters. The same key returns the existing job with `,_jsx(_components.code,{children:`200`}),` and `,_jsx(_components.code,{children:`idempotent: true`}),`, without a second credit deduction. Below 8 characters, your value is ignored and the server generates its own key. See `,_jsx(_components.a,{href:`/en/concepts/idempotency`,children:`Idempotency`}),`.`]})}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`9`,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:`9`,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/generate`}),_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:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_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:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"seedance-2-5-flash\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\": \"secangkir kopi di meja kayu, cahaya pagi, kamera dolly perlahan ke kanan\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"parameters\": { \"duration\": \"5\", \"ratio\": \"16:9\", \"resolution\": \"720p\" },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"idempotencyKey\": \"order-4711-a39f2c7b\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Node.js`,numberOfLines:`15`,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:`15`,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:` res`}),_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:`#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/generate\"`}),_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:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`}),_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\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_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:` model:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"seedance-2-5-flash\"`}),_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:` prompt:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"secangkir kopi di meja kayu, cahaya pagi, kamera dolly perlahan ke kanan\"`}),_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:` parameters:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`duration:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"5\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ratio:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"16:9\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`resolution:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"720p\"`}),_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:` idempotencyKey:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"order-4711-a39f2c7b\"`}),_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`,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\":`#9CDCFE`},children:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`res`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` res`}),_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:`12`,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:`12`,children:[_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/generate\"`}),_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:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,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:`\"seedance-2-5-flash\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"secangkir kopi di meja kayu, cahaya pagi, kamera dolly perlahan ke kanan\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"parameters\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"duration\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"5\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ratio\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"16:9\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"resolution\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"720p\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"idempotencyKey\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"order-4711-a39f2c7b\"`}),_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`,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:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(res.status_code, res.json())`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`3`,id:`responses`,children:`Responses`}),`\n`,_jsx(ResponseField,{name:`success`,type:`boolean`,id:`param-success`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`true`}),` on every successful response.`]})}),`\n`,_jsxs(ResponseField,{name:`job`,type:`object`,required:true,id:`param-job`,children:[_jsx(_components.p,{children:`The job object.`}),_jsxs(Expandable,{title:`job properties`,defaultOpen:true,children:[_jsx(ResponseField,{name:`id`,type:`string`,required:true,id:`param-id-1`,children:_jsxs(_components.p,{children:[`The id to poll at `,_jsx(_components.code,{children:`GET /api/v1/jobs/{id}`}),`.`]})}),_jsx(ResponseField,{name:`status`,type:`string`,required:true,id:`param-status`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`\"queued\"`}),` for a new job. Other values: `,_jsx(_components.code,{children:`dispatching`}),`, `,_jsx(_components.code,{children:`processing`}),`, `,_jsx(_components.code,{children:`succeeded`}),`, `,_jsx(_components.code,{children:`failed`}),`, `,_jsx(_components.code,{children:`cancelled`}),`.`]})}),_jsx(ResponseField,{name:`model`,type:`string`,id:`param-model-1`,children:_jsx(_components.p,{children:`Model id that was used.`})}),_jsx(ResponseField,{name:`category`,type:`string`,id:`param-category`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`\"Video\"`}),`, `,_jsx(_components.code,{children:`\"Image\"`}),`, or `,_jsx(_components.code,{children:`\"Audio\"`}),`.`]})}),_jsx(ResponseField,{name:`prompt`,type:`string`,id:`param-prompt-1`,children:_jsxs(_components.p,{children:[`The prompt `,_jsx(_components.strong,{children:`after`}),` content filtering. This is what was actually processed.`]})}),_jsx(ResponseField,{name:`creditsCharged`,type:`number`,required:true,id:`param-credits-charged`,children:_jsxs(_components.p,{children:[`Credits deducted. `,_jsx(_components.code,{children:`0`}),` when the Unlimited quota covered it.`]})}),_jsx(ResponseField,{name:`createdAt`,type:`string (ISO 8601)`,id:`param-created-at`,children:_jsx(_components.p,{children:`When the job was created, UTC.`})}),_jsx(ResponseField,{name:`result`,type:`object | null`,id:`param-result`,children:_jsxs(_components.p,{children:[`Only populated on an idempotent replay of an already finished job; always `,_jsx(_components.code,{children:`null`}),` for a new job.`]})})]})]}),`\n`,_jsxs(ResponseField,{name:`queue`,type:`object`,id:`param-queue`,children:[_jsx(_components.p,{children:`Queue information at the moment the request was made.`}),_jsxs(Expandable,{title:`contents of queue`,children:[_jsx(ResponseField,{name:`position`,type:`number`,id:`param-position`,children:_jsxs(_components.p,{children:[`Position in the queue. `,_jsx(_components.code,{children:`0`}),` means it is being processed or the position is not reported.`]})}),_jsx(ResponseField,{name:`status`,type:`string`,id:`param-status-1`,children:_jsxs(_components.p,{children:[`Mirrors the job status, usually `,_jsx(_components.code,{children:`\"queued\"`}),`.`]})})]})]}),`\n`,_jsx(ResponseField,{name:`idempotent`,type:`boolean`,id:`param-idempotent`,children:_jsx(_components.p,{children:`Only present when the same key was already used and the original job is being returned.`})}),`\n`,_jsxs(ResponseExample,{children:[_jsx(CodeBlock,{filename:`202 — new job`,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:` \"job\"`}),_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:`\"9f2c1d34-a8b7-4e0f-9a1b-2c3d4e5f6a7b\"`}),_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:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"queued\"`}),_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:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"seedance-2-5-flash\"`}),_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:` \"category\"`}),_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:` \"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"secangkir kopi di meja kayu, cahaya pagi, kamera dolly perlahan ke kanan\"`}),_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:` \"creditsCharged\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_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:` \"createdAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-11-04T09:12:44.000Z\"`})]}),`\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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"queue\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"position\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"queued\"`}),_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:`200 — idempotent replay`,numberOfLines:`15`,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:`15`,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:` \"job\"`}),_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:`\"9f2c1d34-a8b7-4e0f-9a1b-2c3d4e5f6a7b\"`}),_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:` \"status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"succeeded\"`}),_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:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"seedance-2-5-flash\"`}),_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:` \"category\"`}),_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:` \"prompt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"secangkir kopi di meja kayu, cahaya pagi, kamera dolly perlahan ke kanan\"`}),_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:` \"result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},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:`\"https://vidgen.id/api/media-proxy?token=...\"`}),_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:` \"creditsCharged\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_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:` \"createdAt\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2026-11-04T09:12:44.000Z\"`})]}),`\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:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"queue\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"position\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_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:` \"idempotent\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`402 — not enough credits`,numberOfLines:`5`,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:`5`,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:`\"Kredit akun tidak mencukupi. Pembuatan ini membutuhkan 10 kredit\"`}),_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:` \"requiredCredits\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10`}),_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:` \"currentCredits\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`4`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`429 — all concurrent slots busy`,numberOfLines:`5`,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:`5`,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:`\"Maksimal 2 proses generate bersamaan. Tunggu salah satunya selesai sebelum memulai yang baru.\"`}),_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:` \"maxConcurrent\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`}),_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:` \"activeJobs\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`2`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`400 — invalid parameter`,numberOfLines:`4`,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:`4`,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:`\"Parameter tidak valid: Durasi 60s tidak didukung Seedance 2.5 Flash. Pilihan: 20s.\"`}),_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:` \"fields\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Durasi 60s tidak didukung Seedance 2.5 Flash. Pilihan: 20s.\"`}),_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`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`what-you-need-to-know`,children:`What you need to know`}),`\n`,_jsxs(AccordionGroup,{children:[_jsx(Accordion,{title:`Why 202 and not 200?`,id:`why-202-and-not-200`,children:_jsxs(_components.p,{children:[`Generation is asynchronous. `,_jsx(_components.code,{children:`202`}),` means the request was accepted and the queue entry is set up; you fetch the result later through the job id. The only `,_jsx(_components.code,{children:`200`}),` on this endpoint is an idempotent replay.`]})}),_jsx(Accordion,{title:`When are credits deducted and when do they come back?`,id:`when-are-credits-deducted-and-when-do-they-come-back`,children:_jsx(_components.p,{children:`They are deducted before the job is saved. If the job fails, the cancellation fails to save, or the queue is full, the credits are refunded automatically with a refund reason recorded in the account history. You do not need to build your own refund mechanism.`})}),_jsx(Accordion,{title:`Can a request be safely repeated?`,id:`can-a-request-be-safely-repeated`,children:_jsxs(_components.p,{children:[`Yes, as long as you use the same `,_jsx(_components.code,{children:`idempotencyKey`}),` with a length of at least 8 characters. Without it, every retry is a new job with a new charge.`]})}),_jsx(Accordion,{title:`Extra fields in the body are ignored?`,id:`extra-fields-in-the-body-are-ignored`,children:_jsxs(_components.p,{children:[`Yes. A body sending `,_jsx(_components.code,{children:`watermark: false`}),` or `,_jsx(_components.code,{children:`n: 2`}),` produces no error, but also no effect. Only `,_jsx(_components.code,{children:`model`}),`, `,_jsx(_components.code,{children:`prompt`}),`, `,_jsx(_components.code,{children:`parameters`}),`, `,_jsx(_components.code,{children:`references`}),`, and `,_jsx(_components.code,{children:`idempotencyKey`}),` are read.`]})}),_jsx(Accordion,{title:`Limits that make this request get rejected`,id:`limits-that-make-this-request-get-rejected`,children:_jsxs(_components.p,{children:[`Two concurrent processes (Unlimited accounts only), 50 successful videos per day, the server queue being full, or the site being under maintenance. All of them use `,_jsx(_components.code,{children:`429`}),` or `,_jsx(_components.code,{children:`503`}),`.`]})})]})]})}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":"Create a generation job","description":"Send a prompt and references to create a video or image. Returns a job id for polling.","keywords":["POST /api/v1/generate","text to video","image to video","202 accepted"],"api":"POST /api/v1/generate","href":"/en/api-reference/generate"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Authorizations","slug":"authorizations","depth":3,"children":[]},{"title":"Request body","slug":"request-body","depth":3,"children":[]},{"title":"Responses","slug":"responses","depth":3,"children":[]},{"title":"What you need to know","slug":"what-you-need-to-know","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=\"9\">\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/generate\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\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"model\": \"seedance-2-5-flash\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"prompt\": \"secangkir kopi di meja kayu, cahaya pagi, kamera dolly perlahan ke kanan\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"parameters\": { \"duration\": \"5\", \"ratio\": \"16:9\", \"resolution\": \"720p\" },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"idempotencyKey\": \"order-4711-a39f2c7b\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\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=\"15\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> res\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\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/generate\"\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>\u003c/span>\n\u003cspan class=\"line\">\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:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"application/json\"\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:#9CDCFE\"> body:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> JSON\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">stringify\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">({\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> model:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"seedance-2-5-flash\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> prompt:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"secangkir kopi di meja kayu, cahaya pagi, kamera dolly perlahan ke kanan\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> parameters:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">duration:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"5\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">ratio:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"16:9\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">resolution:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"720p\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> idempotencyKey:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"order-4711-a39f2c7b\"\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>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">console\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">log\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">res\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">status\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">await\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> res\u003c/span>\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=\"12\">\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/generate\"\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\"> json\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\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\">\"seedance-2-5-flash\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"prompt\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"secangkir kopi di meja kayu, cahaya pagi, kamera dolly perlahan ke kanan\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"parameters\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"duration\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"5\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"ratio\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"16:9\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"resolution\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"720p\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">},\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"idempotencyKey\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"order-4711-a39f2c7b\"\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>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\">print\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(res.status_code, res.json())\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"202 — new job","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\"> \"job\"\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\">\"9f2c1d34-a8b7-4e0f-9a1b-2c3d4e5f6a7b\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"queued\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"model\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"seedance-2-5-flash\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"category\"\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\"> \"prompt\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"secangkir kopi di meja kayu, cahaya pagi, kamera dolly perlahan ke kanan\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"creditsCharged\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">3\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"createdAt\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-11-04T09:12:44.000Z\"\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:#116329;--shiki-dark:#9CDCFE\"> \"queue\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: { \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"position\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">2\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"queued\"\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\u003c/code>\u003c/pre>"},{"filename":"200 — idempotent replay","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=\"15\">\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\"> \"job\"\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\">\"9f2c1d34-a8b7-4e0f-9a1b-2c3d4e5f6a7b\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"status\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"succeeded\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"model\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"seedance-2-5-flash\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"category\"\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\"> \"prompt\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"secangkir kopi di meja kayu, cahaya pagi, kamera dolly perlahan ke kanan\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"result\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: { \u003c/span>\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\">\"https://vidgen.id/api/media-proxy?token=...\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"creditsCharged\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">3\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"createdAt\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"2026-11-04T09:12:44.000Z\"\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:#116329;--shiki-dark:#9CDCFE\"> \"queue\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: { \u003c/span>\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\">\"position\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">0\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"idempotent\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">true\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":"402 — not enough credits","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=\"5\">\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\">\"Kredit akun tidak mencukupi. Pembuatan ini membutuhkan 10 kredit\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"requiredCredits\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">10\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"currentCredits\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">4\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 — all concurrent slots busy","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=\"5\">\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\">\"Maksimal 2 proses generate bersamaan. Tunggu salah satunya selesai sebelum memulai yang baru.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"maxConcurrent\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">2\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"activeJobs\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">2\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 — invalid parameter","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=\"4\">\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\">\"Parameter tidak valid: Durasi 60s tidak didukung Seedance 2.5 Flash. Pilihan: 20s.\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"fields\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Durasi 60s tidak didukung Seedance 2.5 Flash. Pilihan: 20s.\"\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\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Create a generation job","path":"/api/v1/generate","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_...` . You can also use the `x-api-key` header.","required":true}]}}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"model":[{"type":"string","description":"Model id from the catalog, for example `seedance-2-5-flash` . Spellings with dots and hyphens are treated the same. A model that exists but is currently disabled is answered `409` .","required":true}],"prompt":[{"type":"string","description":"A description of what you want created. Required except for motion control models, which may leave it empty because the server fills in a neutral instruction. Maximum 2,500 characters for motion models. The prompt passes through content filtering first; sensitive words, public figures, or indications of abuse are removed before the request is forwarded. Some models sold openly without filtering are recognizable by their id ( `spicy` , `nsfw` ) and are not filtered."}],"parameters":[{"type":"object","properties":{"duration":[{"type":"string","description":"Duration in seconds, e.g. `\"5\"` or `\"30\"` . A trailing `s` is accepted and stripped. Validated against `capabilities.durations` . Ignored on motion control models."}],"resolution":[{"type":"string","description":"Resolution, e.g. `\"720p\"` , `\"1080p\"` , `\"1K\"` , `\"2K\"` , `\"4K\"` . Validated against `capabilities.resolutions` ."}],"ratio":[{"type":"string","description":"Aspect ratio: `\"16:9\"` , `\"9:16\"` , `\"1:1\"` , `\"4:3\"` , `\"3:4\"` , or `\"auto\"` . `aspect_ratio` is accepted as an alias."}],"quality":[{"type":"string","description":"For image models that have `capabilities.qualities` ( `low` , `medium` , `high` , `max` ). Ignored if the model does not support it."}],"background":[{"type":"string","description":"For image models that have `capabilities.backgrounds` ( `auto` , `transparent` , `opaque` )."}],"output_format":[{"type":"string","description":"Output format; `format` is accepted as an alias. Only used if the model has `capabilities.outputFormats` ."}],"negative_prompt":[{"type":"string","description":"What you do not want. Only forwarded if `capabilities.supportsNegativePrompt` ."}],"seed":[{"type":"string","description":"Random seed for reproducible results. Only forwarded if `capabilities.supportsSeed` ."}],"orientation":[{"type":"string","description":"Motion control only: `\"image\"` (output ratio follows the character image) or `\"video\"` (output ratio follows the motion video). Other values are ignored."}]},"description":"Output settings. Only recognized keys are processed; other keys are ignored without an error."}],"references":[{"type":"array","items":[{"type":"object","properties":{"id":[{"type":"string","description":"Asset id from the upload endpoint. If present, this object is used as-is (also send `url` , `file_url` , and `filename` exactly as you received them)."}],"url":[{"type":"string","description":"A public media URL ( `http` or `https` ) that the server will download with a 20 second timeout. Download failures are answered `400` ."}],"type":[{"type":"string","description":"`\"image\"` , `\"video\"` , or `\"audio\"` . May be omitted — the server detects it from the file contents. Maximum counts per type depend on the model (defaults: 9 images / 1 video / 1 audio; image models allow 10 images and no video or audio)."}],"filename":[{"type":"string","description":"File name in server storage. Follow the exact value from the upload response."}]}}],"description":"Input material: character images, products, or motion videos. Each object can be an asset from `POST /api/v1/upload` or a public URL."}],"idempotencyKey":[{"type":"string","description":"Minimum 8 characters. The same key returns the existing job with `200` and `idempotent: true` , without a second credit deduction. Below 8 characters, your value is ignored and the server generates its own key. See Idempotency ."}]}}],"examples":{"example":{"value":{"model":"\u003cstring>","prompt":"\u003cstring>","parameters":{"duration":"\u003cstring>","resolution":"\u003cstring>","ratio":"\u003cstring>","quality":"\u003cstring>","background":"\u003cstring>","output_format":"\u003cstring>","negative_prompt":"\u003cstring>","seed":"\u003cstring>","orientation":"\u003cstring>"},"references":[{"id":"\u003cstring>","url":"\u003cstring>","type":"\u003cstring>","filename":"\u003cstring>"}],"idempotencyKey":"\u003cstring>"}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"success":[{"type":"boolean","description":"`true` on every successful response."}],"job":[{"type":"object","properties":{"id":[{"type":"string","description":"The id to poll at `GET /api/v1/jobs/{id}` .","required":true}],"status":[{"type":"string","description":"`\"queued\"` for a new job. Other values: `dispatching` , `processing` , `succeeded` , `failed` , `cancelled` .","required":true}],"model":[{"type":"string","description":"Model id that was used."}],"category":[{"type":"string","description":"`\"Video\"` , `\"Image\"` , or `\"Audio\"` ."}],"prompt":[{"type":"string","description":"The prompt after content filtering. This is what was actually processed."}],"creditsCharged":[{"type":"number","description":"Credits deducted. `0` when the Unlimited quota covered it.","required":true}],"createdAt":[{"type":"object","properties":{},"description":"When the job was created, UTC."}],"result":[{"type":"object","properties":{},"description":"Only populated on an idempotent replay of an already finished job; always `null` for a new job."}]},"description":"The job object.","required":true}],"queue":[{"type":"object","properties":{"position":[{"type":"number","description":"Position in the queue. `0` means it is being processed or the position is not reported."}],"status":[{"type":"string","description":"Mirrors the job status, usually `\"queued\"` ."}]},"description":"Queue information at the moment the request was made."}],"idempotent":[{"type":"boolean","description":"Only present when the same key was already used and the original job is being returned."}]}}],"examples":{"example":{"value":{"success":true,"job":{"id":"\u003cstring>","status":"\u003cstring>","model":"\u003cstring>","category":"\u003cstring>","prompt":"\u003cstring>","creditsCharged":123,"createdAt":{},"result":{}},"queue":{"position":123,"status":"\u003cstring>"},"idempotent":true}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"vidgen","siteName":"Vidgen API Docs","title":"Create a generation job - Vidgen API Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"id":{"href":"/api-reference/generate","matchLevel":1},"en":{"href":"/en/api-reference/generate","matchLevel":0}}},"lastModified":"2026-11-04T09:11:35.762Z","originalFileLocation":"en/api-reference/generate.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=\"Send a prompt and references to create a video or image. Returns a job id for polling.\">\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=\"Create a generation job - Vidgen API Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Send a prompt and references to create a video or image. Returns a job id for polling.\">\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/generate\">\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=Generate\u0026amp;title=Create+a+generation+job\u0026amp;description=Send+a+prompt+and+references+to+create+a+video+or+image.+Returns+a+job+id+for+polling.\u0026amp;theme=91ecb3ef6f970435f9dcd990\u0026amp;signature=a0aaf2df524409046e58a3d9f7d0116cbe0616b42c7e63de2f13d7e313c29b31\">\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=\"Create a generation job - Vidgen API Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Send a prompt and references to create a video or image. Returns a job id for polling.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://vidgen.mintlify.app/_mintlify/api/og/v2?division=Generate\u0026amp;title=Create+a+generation+job\u0026amp;description=Send+a+prompt+and+references+to+create+a+video+or+image.+Returns+a+job+id+for+polling.\u0026amp;theme=91ecb3ef6f970435f9dcd990\u0026amp;signature=a0aaf2df524409046e58a3d9f7d0116cbe0616b42c7e63de2f13d7e313c29b31\">\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/generate\">\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/generate.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.vidgen.id/en/api-reference/generate\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"id\" href=\"https://docs.vidgen.id/api-reference/generate\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.vidgen.id/api-reference/generate\">\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/generate#webpage\",\"url\":\"https://docs.vidgen.id/en/api-reference/generate\",\"name\":\"Create a generation job\",\"description\":\"Send a prompt and references to create a video or image. Returns a job id for polling.\",\"dateModified\":\"2026-11-04T09:11:35.762Z\",\"isPartOf\":{\"@id\":\"https://docs.vidgen.id#website\"},\"breadcrumb\":{\"@id\":\"https://docs.vidgen.id/en/api-reference/generate#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.vidgen.id/en/api-reference/generate#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Vidgen API Docs\",\"item\":\"https://docs.vidgen.id\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a generation job\",\"item\":\"https://docs.vidgen.id/en/api-reference/generate\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.vidgen.id/en/api-reference/generate#apireference\",\"headline\":\"Create a generation job\",\"name\":\"Create a generation job\",\"description\":\"Send a prompt and references to create a video or image. Returns a job id for polling.\",\"url\":\"https://docs.vidgen.id/en/api-reference/generate\",\"mainEntityOfPage\":{\"@id\":\"https://docs.vidgen.id/en/api-reference/generate#webpage\"},\"dateModified\":\"2026-11-04T09:11:35.762Z\",\"keywords\":\"POST /api/v1/generate, text to video, image to video, 202 accepted\",\"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/generate"}]},{"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","description":"The five Vidgen API endpoints, the standard error shape, and the things that stay consistent across endpoints.","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","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":"Create a generation job - 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"]}