POST /v1/audio/usage:complete
CompleteAudioUsage is a trusted audio-provider/sidecar callback. It turns one completed ASR, TTS, generation or processing attempt into a metering operation, usage report and credit settlement.
The server validates credentials, tenant, environment and permissions. This page does not send requests. Replace example values; deployed server validation remains authoritative.
Parameters
No path or query parameters.
Request body
actual_quantitystringcapability_idstringOptional published capability identity from its execution profile. Nexus validates it against offer_id and freezes the revision on the Operation.
customer_account_idstringdimensions_jsonstringestimated_quantitystringexecution_statusstringSUCCEEDED or FAILED. A FAILED operation is handled by the failure-charge policy.
failure_codestringmeter_codestringThe single meter that determines the credit reservation and settlement.
modelstringoffer_idstringoperation_keystringoperation_typestringAUDIO_TRANSCRIBE, AUDIO_SPEECH, AUDIO_GENERATE or AUDIO_PROCESS.
providerstringprovider_request_idstringsource_event_idstringStable upstream event ID. Reusing it makes a callback retry idempotent.
cURL
curl --request POST 'https://nexus-api.rainlib.com/v1/audio/usage:complete' \
--header 'Authorization: Bearer <NEXUS_ACCESS_TOKEN>' \
--header 'Content-Type: application/json' \
--data '{
"actual_quantity": "<value>",
"capability_id": "<value>",
"customer_account_id": "<value>",
"dimensions_json": "<value>",
"estimated_quantity": "<value>",
"execution_status": "<value>",
"failure_code": "<value>",
"meter_code": "<value>",
"model": "<value>",
"offer_id": "<value>",
"operation_key": "<value>",
"operation_type": "<value>",
"provider": "<value>",
"provider_request_id": "<value>",
"source_event_id": "<value>"
}'Response contract
200 · OK
actual_quantitystringattempt_idstringexecution_statusstringmeter_codestringoperation_idstringstatusstring
Generated responses do not enumerate every runtime error. See the integration guide for authentication, conflicts and retries.