Estimate the credits a generation will cost before submitting, using the same formula as the actual charge. Omit resolution to price the model default.
Beta: available to any account with an active paid subscription; standard per-key rate limits apply.
Headers
X-API-KeystringrequiredYour VisionStory API key (sk-vs-...), kept server-side. Create or manage keys in API keys (Pro plan and up).
Query parameters
model_idstringrequiredModel to price for. Use an id from GET /api/v1/ai_video/models, e.g. seedance-2.0.
duration_secnumberrequiredClip length in seconds to price. Use an allowed model duration; for V-Character 5.0 Pro auto/video-edit requests, pass the resolved reference duration (2–15s).
resolutionstring | nullOutput resolution to price, e.g. 480p / 720p / 1080p / 4k. Allowed values vary by model; omit to use the model default.
reference_video_duration_secnumberSum of reference-video durations, capped per video at 15s (Seedance 2.0 series) or 30s (seedance-2.5, seedance-2.5-flash, kling-4.0). All Seedance models and kling-4.0: reference seconds up to half the output duration are free; only excess seconds cost 60% of the output rate. V-Character 5.0 Pro: any positive value doubles the generation second rate, once per task. For estimation only; actual charge uses server-measured durations.
Default: 0
generate_audioboolean | nullWhether a native audio track is requested. Accepted for parity with the create request; audio never changes the price.
Responses
200Successful Response
application/json
dataAiVideoCostResponse | nullrequirednullableThe endpoint-specific payload. See this endpoint's response schema for its fields; null only when the operation returns no payload.
base_creditintegerGeneration credits rounded up. With reference-video pricing, the surcharge is the rounded total minus this amount.
creditintegerrequiredEstimated credits the generation will cost with the given parameters. Uses the same formula as the actual charge.
reference_videoReferenceVideoCostDto | nullnullablecost_creditintegerrequiredReference-video surcharge after rounding total credits up.
duration_secnumberrequiredTotal reference-video seconds used for this quote.
excess_duration_secnumberrequiredOnly these excess reference seconds are charged.
free_duration_secnumberrequiredReference seconds included for free, up to half the output duration.
unit_costnumberrequiredCredits per excess second: 60% of the output second rate.
messagestringHuman-readable status message; "success" on a successful call.
server_timestring · date-timerequiredServer-side timestamp when the response was produced, in ISO 8601 format (UTC).
defaultError 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).
application/json
errorErrorDetailrequiredcodeintegerrequiredMachine-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.
detailsstring | nullnullableOptional 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.
hintstring | nullnullableActionable 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.
messagestringrequiredHuman-readable explanation of what went wrong. Safe to log or surface to end users; not localized.