Seedance quotes and billing receipts
Estimate Seedance generation costs and verify the final debit using authenticated, persistent billing receipts.
Seedance quotes and billing receipts
Applies to seedance-2.0, seedance-2.5, seedance-2.0-fast, and seedance-2.0-mini, across all generation channels. Base URL: https://apimaster.ai/v1 (https://apimaster.ai/v1). Authenticate all requests with Authorization: Bearer YOUR_API_KEY.
Obtain an estimate
POST https://apimaster.ai/v1/videos/quote accepts the same JSON parameters as a standard video-generation request, including model, prompt, duration, resolution, video_urls, and other supported generation settings. Draft generation, draft upgrades, and remix quotes are not currently supported.
curl "https://apimaster.ai/v1/videos/quote" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"seedance-2.0","prompt":"A paper boat on a pond","duration":4,"resolution":"480p","generate_audio":false}'
The response contains object: "video.quote", quote_id, expires_at (Unix seconds), binding: false, funds_reserved: false, and a billing object described below. The quote has a five-minute advisory validity period. It does not debit funds, create a task, or start provider generation. billing.reserved_amount is therefore "0.000000". The quote ID is informational; it is not an authorization or price-lock token and does not need to be submitted with generation.
Pricing is recalculated at actual submission and frozen for that task. An estimate is not a maximum-charge guarantee. The completed task may cost more or less than the estimate. Automatic-duration requests use a 30-second output estimate; requested_output_seconds is -1.
Generation remains subject to provider validation. For Seedance 2.5 video-extension requests, explicitly set aspect_ratio: "adaptive"; a provider rejection is handled through the normal refund lifecycle.
Retrieve the task receipt
curl "https://apimaster.ai/v1/videos/task_xxx/billing" \
-H "Authorization: Bearer YOUR_API_KEY"
GET /v1/videos/{task_id}/billing returns object: "video.billing_receipt" and billing. Only API keys belonging to the task owner's account can retrieve it. Unknown, foreign, and historical tasks without a receipt return HTTP 404. Receipts are created for new tasks after this feature was enabled; older tasks are not retrospectively reconstructed.
The same billing object is included in both task-query responses:
GET /v1/videos/{task_id}: top-levelbilling.GET /v1/video/generations/{task_id}:data.billing.
settlement_status is pending, settled, or refunded; quote responses use estimate. Task completion and financial settlement are separate: treat amounts as final only when the receipt is settled or refunded. Repeated receipt requests do not run generation, settlement, or refunds. Finalized receipts keep the same receipt ID and contents, including after a refund.
Billing schema
All monetary amounts and unit rates are decimal strings. Time durations are seconds. Nullable fields are JSON null until available.
| Field | Type | Meaning |
|---|---|---|
schema_version |
string | Current receipt schema: "1" |
receipt_id, task_id |
string | Stable task-linked receipt identity; absent from quotes |
settlement_status |
string | estimate, pending, settled, refunded |
model, resolution |
string | Applied public model and normalized resolution |
tariff_variant |
string | Resolution tier, with -input when video references are present |
tariff_revision |
string | Fingerprint of the model, tariff tier, configured base rate and billing-rule version |
currency, unit |
string | USD, second |
base_unit_rate |
decimal string | Configured base price per billable second |
channel_multiplier, account_multiplier |
number | Applied aggregate channel pricing and account/group multipliers |
effective_unit_rate |
decimal string | Final applicable per-second rate, frozen at submission and rounded to 12 decimal places |
requested_output_seconds |
integer | Requested output duration; -1 for automatic duration |
estimated_output_seconds, estimated_billable_seconds |
integer | Initial output and combined input/output estimates |
input_videos |
array | Per-reference server measurements, in request order |
input_videos[].index, .media_id |
integer, string | Zero-based reference index and account-scoped media hash or owned asset ID; no source URL |
input_videos[].measured_seconds |
number or null | Server-measured duration before rounding; can be null for older cached assets |
input_videos[].billable_seconds |
integer | This reference's rounded billable duration |
input_videos[].duration_source |
string | apimaster_probe or apimaster_asset_cache |
billable_input_video_seconds |
integer | Sum of per-reference billable seconds |
output |
object or null | Final output duration information, available after successful settlement |
output.actual_seconds |
number or null | Actual reported/probed output duration; null if unavailable |
output.billable_seconds |
integer | Output seconds actually used in settlement |
output.duration_source |
string | provider_reported, apimaster_probe, provider_billable_seconds, requested_duration_fallback, or reservation_fallback |
billable_seconds |
integer or null | Final combined billable input/output seconds |
rounding |
object | Input, output and money rounding rules and amount formula |
estimated_amount |
decimal string | Initial estimated cost |
reserved_amount |
decimal string | Initial task debit; zero for quotes. This is an account debit, not a separate bank authorization hold |
additional_debit_amount |
decimal string | Additional debit above the initial task debit |
final_debit_amount, net_amount |
decimal string or null | Final net task cost after adjustments; zero after full refund |
refunded_amount |
decimal string | Amount returned from the initial debit |
initial_quota_units, final_quota_units |
integer, integer or null | Exact initial and final account units |
account_unit_usd |
decimal string | "0.000002" per account unit |
media_charges |
object | image, audio, other_reference are zero under the current tariff; input_video_unrounded and output_video_unrounded separate the video components before final monetary rounding |
final_debit_may_exceed_estimate |
boolean | true; the estimate is not a hard spending cap |
created_at, settled_at |
integer, integer or null | Unix timestamps |
Recalculate the final cost
With reference video, the video-input tier applies to both the output and reference-video seconds. Images and audio have no separate surcharge under the current Seedance tariff. Token counts and provider cost are not billing inputs.
- Round each input video's measured duration up independently, then sum:
input_seconds = sum(ceil(each_video_duration)). - Round output duration to the nearest whole second, with positive half seconds rounded up.
- Add input and output billable seconds.
- Multiply by
effective_unit_rate, divide byaccount_unit_usd, then round the total once to the nearest integer account unit, with positive half units rounded up.
final_quota_units = round_half_up(billable_seconds × effective_unit_rate / 0.000002)
net_amount = final_quota_units × 0.000002
net_amount = reserved_amount + additional_debit_amount - refunded_amount
Use decimal arithmetic. Do not round the input and output monetary components separately. For example, a 4-second Seedance 2.0 task at 480P, without reference video, with base rate 0.07031, channel multiplier 1, and account multiplier 1.05, has an effective rate of 0.0738255 and a net cost of 0.295302 USD (147651 account units).
APIMaster measures reference-video duration, rather than trusting client fields such as input_seconds or reference_seconds. Requested duration/seconds controls output duration. For outputs, settlement prefers provider-reported duration and probes the output when needed; unavailable measurements may fall back to provider billable seconds or the requested/reserved duration. The receipt explicitly labels the source. A fallback is never labeled as an independently measured actual duration. Existing cached assets or inherited older drafts can lack complete per-file measurement details.
actual_time in the video response is task processing time, not output video duration. usage.completion_tokens, when present, is informational.
Failures and refunds
Provider task failures and the configured 24-hour unfinished-task timeout trigger an automatic full refund. Their receipts remain retrievable and show refunded with zero net amount once the refund succeeds. Temporary polling/network errors do not immediately refund or cancel a task; processing is retried.
A submission failure confirmed as uncharged is refunded. An ambiguous submission outcome is held for automatic reconciliation (first async reconciliation after approximately 20 minutes; still-unknown outcomes after 24 hours are refunded during reconciliation). If submission did not create a public task, there is no task-linked receipt for that attempt. A quote is not a reservation and needs no release.
There is no public Seedance cancellation endpoint. Disconnecting or stopping polling does not cancel a task. Task-state checks prevent repeated polling from applying the same completion settlement/refund again, while the receipt endpoint itself is read-only. These are not a blanket exactly-once guarantee for every infrastructure failure; pending financial operations must not be treated as finalized.
