[{"data":1,"prerenderedAt":126},["ShallowReactive",2],{"reference-detail-en-get_ai_video_cost_api_v1_ai_video_cost_get":3,"developer-code-un8ihy":124,"developer-code-ijy0uv":125},{"tag":4,"sourceTag":5,"tagSlug":6,"method":7,"path":8,"slug":9,"summary":10,"description":11,"operationId":12,"groupOrder":13,"descriptionHtml":14,"parameters":15,"responses":43,"security":111,"codeSamples":114},"AI Video","AI Videos","ai-videos","GET","\u002Fapi\u002Fv1\u002Fai_video\u002Fcost","get-ai-video-cost","Estimate cost","Estimate the credits a generation will cost before submitting, using the same formula as the actual\ncharge. Omit `resolution` to price the model default.\n\nBeta: available to any account with an active paid subscription; standard per-key rate limits apply.","get_ai_video_cost_api_v1_ai_video_cost_get",60,"\u003Cp>Estimate the credits a generation will cost before submitting, using the same formula as the actual charge. Omit \u003Ccode>resolution\u003C\u002Fcode> to price the model default.\u003C\u002Fp>\u003Cp>Beta: available to any account with an active paid subscription; standard per-key rate limits apply.\u003C\u002Fp>",[16,23,28,33,39],{"name":17,"in":18,"required":19,"description":20,"type":21,"example":22},"X-API-Key","header",true,"Your VisionStory API key (`sk-vs-...`), kept server-side. Create or manage keys in [API keys](\u002Fapi-keys) (Pro plan and up).","string","sk-vs-your-api-key",{"name":24,"in":25,"required":19,"description":26,"type":21,"example":27},"model_id","query","Model to price for. Use an id from GET \u002Fapi\u002Fv1\u002Fai_video\u002Fmodels, e.g. `seedance-2.0`.","seedance-2.0",{"name":29,"in":25,"required":19,"description":30,"type":31,"example":32},"duration_sec","Clip length in seconds to price. Must be an allowed value for the model (see GET \u002Fapi\u002Fv1\u002Fai_video\u002Fmodels).","integer",8,{"name":34,"in":25,"required":35,"description":36,"type":37,"example":38},"resolution",false,"Output resolution to price, e.g. `480p` \u002F `720p` \u002F `1080p` \u002F `4k`. Allowed values vary by model; omit to use the model default.","string | null","720p",{"name":40,"in":25,"required":35,"description":41,"type":42,"example":19},"generate_audio","Whether a native audio track is requested. Accepted for parity with the create request; audio never changes the price.","boolean | null",[44,82],{"status":45,"description":46,"contentType":47,"schema":48,"example":71,"examples":75,"headers":81},"200","Successful Response","application\u002Fjson",{"type":49,"description":50,"nullable":35,"properties":51},"BaseSuccessResponse_AiVideoCostResponse_","",[52,61,66],{"name":53,"required":19,"type":54,"description":55,"nullable":19,"properties":56},"data","AiVideoCostResponse | null","The endpoint-specific payload. See this endpoint's response schema for its fields; null only when the operation returns no payload.",[57],{"name":58,"required":19,"type":31,"description":59,"nullable":35,"properties":60},"credit","Estimated credits the generation will cost with the given parameters. Uses the same formula as the actual charge.",[],{"name":62,"required":35,"type":21,"description":63,"nullable":35,"default":64,"properties":65},"message","Human-readable status message; `\"success\"` on a successful call.","success",[],{"name":67,"required":19,"type":68,"description":69,"nullable":35,"properties":70},"server_time","string · date-time","Server-side timestamp when the response was produced, in ISO 8601 format (UTC).",[],{"data":72,"message":64,"server_time":74},{"credit":73},16,"2026-09-04T00:00:00Z",[76],{"name":64,"description":77,"summary":78,"value":79},"Examples illustrate the response structure, not live account data or a pricing quote. IDs and URLs are placeholders. Query model discovery and cost endpoints for current availability and prices.","Successful response",{"data":80,"message":64,"server_time":74},{"credit":73},[],{"status":83,"description":84,"contentType":47,"schema":85,"example":107,"headers":110},"default","Error response. All failures share one envelope: an `error` object with a numeric `code`, a human-readable `message`, an optional `details` string, and an optional `hint` giving an actionable next step (useful for AI agents).",{"type":86,"description":50,"nullable":35,"properties":87},"ErrorResponse",[88],{"name":89,"required":19,"type":90,"description":50,"nullable":35,"properties":91},"error","ErrorDetail",[92,96,100,104],{"name":93,"required":19,"type":31,"description":94,"nullable":35,"properties":95},"code","Machine-readable error code. Mirrors the HTTP status for transport-level failures (e.g. 401, 404, 422, 500) and may carry a business-specific code otherwise.",[],{"name":97,"required":35,"type":37,"description":98,"nullable":19,"properties":99},"details","Optional structured detail about the failure, e.g. a JSON string of per-field validation errors on a 422. Absent when there is nothing extra to report.",[],{"name":101,"required":35,"type":37,"description":102,"nullable":19,"properties":103},"hint","Actionable next step for resolving the error, written for both humans and AI agents (e.g. how to fix the request, or where to obtain an API key). May be absent.",[],{"name":62,"required":19,"type":21,"description":105,"nullable":35,"properties":106},"Human-readable explanation of what went wrong. Safe to log or surface to end users; not localized.",[],{"error":108},{"code":109,"message":21,"details":21,"hint":21},1,[],[112],{"APIKeyHeader":113},[],[115,118,121],{"lang":116,"source":117},"SDK","from visionstory import VisionStoryClient\n\nclient = VisionStoryClient.from_env()\ncost = client.ai_video_cost(\n    model_id=\"seedance-2.0\",\n    duration_sec=8,\n    resolution=\"720p\",\n    generate_audio=True,\n)\nprint(cost)",{"lang":119,"source":120},"REST","import os\nimport requests\n\nresponse = requests.get(\n    \"https:\u002F\u002Fopenapi.visionstory.ai\u002Fapi\u002Fv1\u002Fai_video\u002Fcost\",\n    headers={\"X-API-Key\": os.environ[\"VISIONSTORY_API_KEY\"]},\n    params={\n      \"model_id\": \"seedance-2.0\",\n      \"duration_sec\": 8\n    },\n)\nresponse.raise_for_status()\nprint(response.json())",{"lang":122,"source":123},"cURL","curl --request GET 'https:\u002F\u002Fopenapi.visionstory.ai\u002Fapi\u002Fv1\u002Fai_video\u002Fcost?model_id=seedance-2.0&duration_sec=8' \\\n  --header 'X-API-Key: $VISIONSTORY_API_KEY'","\u003Cpre class=\"shiki github-dark-default\" style=\"background-color:#0d1117;color:#e6edf3\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#FF7B72\">from\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> visionstory \u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">import\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> VisionStoryClient\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E6EDF3\">client \u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> VisionStoryClient.from_env()\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E6EDF3\">cost \u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">=\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\"> client.ai_video_cost(\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#FFA657\">    model_id\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">=\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"seedance-2.0\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#FFA657\">    duration_sec\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">=\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">8\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#FFA657\">    resolution\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">=\u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"720p\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#FFA657\">    generate_audio\u003C\u002Fspan>\u003Cspan style=\"color:#FF7B72\">=\u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">True\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E6EDF3\">)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#79C0FF\">print\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">(cost)\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>","\u003Cpre class=\"shiki github-dark-default\" style=\"background-color:#0d1117;color:#e6edf3\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"color:#E6EDF3\">{\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#7EE787\">  \"data\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#7EE787\">    \"credit\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#79C0FF\">16\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E6EDF3\">  },\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#7EE787\">  \"message\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"success\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#7EE787\">  \"server_time\"\u003C\u002Fspan>\u003Cspan style=\"color:#E6EDF3\">: \u003C\u002Fspan>\u003Cspan style=\"color:#A5D6FF\">\"2026-09-04T00:00:00Z\"\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"color:#E6EDF3\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>",1790231924534]