API v1

Read task billing

GET/v1/video/tasks/{task_id}/billing

Retrieve the whole-task billing summary and one ordered page of permanent billing events.

View Markdown
  • Put your API key after Authorization: Bearer in the request header.
  • The summary covers the whole task, never a subtotal of the current page.
  • Page through permanent billing events with cursor and page_size.
  • Amounts are USD strings with six decimal places.

Headers

#AuthorizationstringRequired

Bearer, a space and your API key. A missing or invalid key returns 401 authentication_failed.

#X-Request-IDstring

Your own request identifier. An invalid or repeated value is replaced; the value used comes back in the X-Request-ID response header.

Path parameters

#task_idstringRequired

ID of the video task to retrieve

Query parameters

#cursorstring

Opaque value for fetching the next page of permanent billing events.

Length1–256
#page_sizeinteger

Maximum number of billing events in this page.

Default50Range1–100

ReturnsHTTP 200

A whole-task billing summary with one ordered page of permanent events.

#objectstringRequired

Identifies this object as task billing.

Alwaysvideo.task.billing
#task_idstringRequired

ID of the task owned by your team.

Length4–128CharactersA–Z a–z 0–9 _ -
#request_idstringRequired

Request ID associated with the task.

Length4–128CharactersA–Z a–z 0–9 _ -
#billing_correlation_idstringRequired

ID used to correlate this task's billing.

Length4–128CharactersA–Z a–z 0–9 _ -
#modelstringRequired

Model used for this task.

dreamina-seedance-2-0-260128Seedance 2.0
dreamina-seedance-2-0-fast-260128Seedance 2.0 Fast
dreamina-seedance-2-0-mini-260615Seedance 2.0 Mini
#task_statusstringRequired

Progress of task execution.

queuedQueued
processingProcessing
succeededSucceeded
failedFailed
cancelledCancelled
#settlement_statusstringRequired

Progress of billing settlement for this task.

reservedReserved
pendingPending
reconciliation_requiredUnder review
settledSettled
settled_with_receivableSettled - amount due
#currencystringRequired

Currency of the amounts: USD.

AlwaysUSD
#reserved_amountstringRequired

Amount reserved for the task.

Format6 decimal places
#charged_amountstringRequired

Charge recorded for the task.

Format6 decimal places
#collected_liability_amountstringRequired

Amount collected toward the charge.

Format6 decimal places
#funding_debit_amountstringRequired

Amount debited from balance.

Format6 decimal places
#refunded_liability_amountstringRequired

Amount of the charge refunded.

Format6 decimal places
#funding_refund_amountstringRequired

Amount refunded to balance.

Format6 decimal places
#outstanding_receivablestringRequired

Amount due that has not been collected. Zero for settled tasks that failed or were cancelled.

Format6 decimal places
#final_actual_coststringRequiredNullable

Final charge. Null while queued or processing, or while settlement is reserved, pending or reconciliation_required. An amount is provided for settled or settled_with_receivable. Settled tasks that failed or were cancelled have a zero final charge.

Format6 decimal places
#eventsarrayRequired

Permanent billing events in this page.

Items≤ 100
25 child fields
#billing_event_idstringRequired

ID of this billing event.

Length4–128CharactersA–Z a–z 0–9 _ -
#task_idstringRequired

Task to which this event belongs.

Length4–128CharactersA–Z a–z 0–9 _ -
#request_idstringRequired

Request ID associated with the event.

Length4–128CharactersA–Z a–z 0–9 _ -
#billing_correlation_idstringRequired

ID used to correlate billing records.

Length4–128CharactersA–Z a–z 0–9 _ -
#event_typestringRequired

Kind of billing event recorded.

hold_createdReserved
hold_increasedReservation increased
hold_reducedReservation reduced
charge_capturedCharged
supplemental_chargeAdditional charge
receivable_createdAmount due recorded
receivable_paymentAmount due paid
receivable_reducedAmount due reduced
hold_releasedReservation released
refund_postedRefunded
charge_waivedCharge waived
manual_adjustmentManual adjustment
#billing_componentstringRequired

Part of the service being billed.

generation_outputVideo generation
reference_videoReference video
reference_imageReference image
reference_audioReference audio
web_searchWeb search
otherOther billing component
#amountstringRequired

Amount of this event. Zero for charge_waived and greater than zero for hold_reduced.

Format6 decimal places
#charge_amountstringRequired

Charge amount recorded by this event.

Format6 decimal places
#refund_amountstringRequired

Refund amount recorded by this event.

Format6 decimal places
#collected_liability_amountstringRequired

Amount collected in this event.

Format6 decimal places
#funding_debit_amountstringRequired

Amount this event debited from balance.

Format6 decimal places
#funding_refund_amountstringRequired

Amount this event refunded to balance.

Format6 decimal places
#receivable_amountstringRequired

Change in the amount due recorded by this event.

Format6 decimal places
#receivable_directionstringRequiredNullable

increase for receivable_created; decrease for receivable_payment or receivable_reduced. Null for other event types.

One ofincreasedecreasenull
#adjustment_directionstringRequiredNullable

debit or credit for manual_adjustment; null otherwise.

One ofdebitcreditnull
#audit_reasonstringRequiredNullable

Audit explanation, present for manual_adjustment and null for other events.

Length1–1024
#component_detail_codestringRequiredNullable

Required detail code when billing_component is other; null for other components.

Length1–96Charactersa–z 0–9 _
#currencystringRequired

Currency of the amounts: USD.

AlwaysUSD
#settlement_statusstringRequired

Settlement state recorded by this event.

reservedReserved
pendingPending
reconciliation_requiredUnder review
settledSettled
settled_with_receivableSettled - amount due
#created_atintegerRequired

Time the event was created, in whole Unix seconds.

Range≥ 0
#billing_operation_idstring

ID of the billing operation, required for hold_reduced.

Length4–128CharactersA–Z a–z 0–9 _ -
#quote_revision_beforeinteger

Quote revision before the operation, required for hold_reduced.

Range≥ 0
#quote_revision_afterinteger

Quote revision after the operation, required for hold_reduced.

Range≥ 1
#reservation_revision_beforeinteger

Reservation revision before the operation, required for hold_reduced.

Range≥ 0
#reservation_revision_afterinteger

Reservation revision after the operation, required for hold_reduced.

Range≥ 1
#next_cursorstringRequiredNullable

Value for continuing to the next page, or null.

Length1–256
#reconciliationobjectRequiredNullable

Review summary when settlement is reconciliation_required. Null for reserved, pending, settled and settled_with_receivable.

4 child fields
#case_idstringRequired

ID of the review case.

Length4–128CharactersA–Z a–z 0–9 _ -
#reason_codestringRequired

Code explaining why billing needs review.

missing_billable_usageBillable usage is missing
usage_schema_driftThe recorded usage shape has changed
unknown_usage_unitThe usage unit is not recognized
price_rule_not_uniqueA single applicable price rule could not be determined
output_unavailableResult unavailable
#missing_metersarrayRequired

Missing usage measurements, without duplicates. At least one is listed for missing_billable_usage.

Items≤ 16
#customer_action_requiredbooleanRequired

Whether you need to take any action.

Response headers

#X-Request-IDstringRequired

The identifier of this request: the valid value you sent, or its replacement.

Status codes

Each error.code and what to do about it is on Error codes.

StatusMeaning and error.code
200A whole-task billing summary with one ordered page of permanent events.
400The submitted request is not valid.
401The API key is missing or invalid.
Response headersWWW-Authenticate
404No task with this ID is visible to your team.
429The request rate limit blocks this read operation.
Response headersRetry-After
500Internal error.
503The service is temporarily unavailable.