{"openapi":"3.1.0","info":{"title":"SoundHalo API","version":"1.0.0","description":"Speech and dubbing API: transcription, subtitle translation, text to speech, voice-over, dubbing, voice cloning and lip-sync. Authenticate with an account API key as a Bearer token. Requests use the account's plan minutes, prepaid balance and monthly cost cap. Docs: https://soundhalo.com/developers/"},"servers":[{"url":"https://api.soundhalo.com"}],"security":[{"apiKey":[]}],"tags":[{"name":"Assets"},{"name":"Account"},{"name":"Transcription"},{"name":"Translation"},{"name":"Speech"},{"name":"Dubbing"},{"name":"Voices"},{"name":"Lip-sync"},{"name":"Jobs"}],"paths":{"/v1/assets":{"post":{"summary":"Upload a file, or import one from a public link","tags":["Assets"],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"}}}},"application/json":{"schema":{"type":"object","required":["source_url"],"properties":{"source_url":{"type":"string","format":"uri"}}}}}},"responses":{"201":{"description":"Stored","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"type":"object","properties":{"result":{"type":"object","properties":{"asset_ref":{"type":"object","required":["asset_id","asset_token"],"properties":{"asset_id":{"type":"string"},"asset_token":{"type":"string"}}},"file_info":{"type":"object"}}}}}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"413":{"$ref":"#/components/responses/E413"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/assets/{id}":{"get":{"summary":"Read file metadata","tags":["Assets"],"parameters":[{"name":"id","in":"path","required":true,"description":"Asset id","schema":{"type":"string"}},{"name":"x-asset-token","in":"header","required":true,"description":"The asset token","schema":{"type":"string"}}],"responses":{"200":{"description":"Metadata","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"type":"object","properties":{"result":{"type":"object"}}}]}}}},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"}}},"delete":{"summary":"Delete a stored file","tags":["Assets"],"parameters":[{"name":"id","in":"path","required":true,"description":"Asset id","schema":{"type":"string"}},{"name":"x-asset-token","in":"header","required":true,"description":"The asset token","schema":{"type":"string"}}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"type":"object","properties":{"result":{"type":"object"}}}]}}}},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"}}}},"/v1/assets/{id}/download":{"get":{"summary":"Download a file","tags":["Assets"],"parameters":[{"name":"id","in":"path","required":true,"description":"Asset id","schema":{"type":"string"}},{"name":"x-asset-token","in":"header","required":true,"description":"The asset token","schema":{"type":"string"}}],"responses":{"200":{"description":"The file bytes"},"403":{"$ref":"#/components/responses/E403"},"404":{"$ref":"#/components/responses/E404"}}}},"/v1/usage/processing":{"get":{"summary":"Allowances left today and this month, with the prepaid balance","tags":["Account"],"responses":{"200":{"description":"Allowance snapshot","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"type":"object","properties":{"result":{"$ref":"#/components/schemas/Allowance"}}}]}}}},"401":{"$ref":"#/components/responses/E401"},"503":{"$ref":"#/components/responses/E503"}}}},"/v1/me/billing/status":{"get":{"summary":"Plan and subscription status","tags":["Account"],"responses":{"200":{"description":"Status","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"type":"object","properties":{"result":{"type":"object"}}}]}}}},"401":{"$ref":"#/components/responses/E401"},"503":{"$ref":"#/components/responses/E503"}}}},"/v1/extract/transcribe":{"post":{"summary":"Transcribe an uploaded file","tags":["Transcription"],"parameters":[{"name":"x-execution-mode","in":"header","required":false,"description":"\"async\" returns a job to poll; omit for a synchronous answer","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["input"],"properties":{"input":{"type":"object","required":["asset_ref"],"properties":{"asset_ref":{"type":"object","required":["asset_id","asset_token"],"properties":{"asset_id":{"type":"string"},"asset_token":{"type":"string"}}}}},"options":{"type":"object","properties":{"language":{"type":"string","default":"auto"},"timestamps":{"enum":["segment","word"]},"diarize":{"type":"boolean"}}}}}}}},"responses":{"200":{"description":"Transcript","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"type":"object","properties":{"result":{"type":"object","properties":{"text":{"type":"string"},"segments":{"type":"array","items":{"type":"object","required":["start_sec","end_sec","text"],"properties":{"start_sec":{"type":"number"},"end_sec":{"type":"number"},"text":{"type":"string","maxLength":1000},"speaker":{"type":"string"}}}},"detected_language":{"type":"string"},"duration_sec":{"type":"number"}}}}}]}}}},"202":{"description":"Queued job (async mode)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Envelope"}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"413":{"$ref":"#/components/responses/E413"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/v1/translate/captions":{"post":{"summary":"Translate timed captions","tags":["Translation"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["input","options"],"properties":{"input":{"type":"object","required":["cues"],"properties":{"cues":{"type":"array","maxItems":5000,"items":{"type":"object","required":["start_sec","end_sec","text"],"properties":{"start_sec":{"type":"number"},"end_sec":{"type":"number"},"text":{"type":"string","maxLength":1000},"speaker":{"type":"string"}}}}}},"options":{"type":"object","required":["target_language"],"properties":{"target_language":{"type":"string","examples":["es-419","fr","de"]},"glossary":{"type":"string","maxLength":1000},"purpose":{"enum":["subtitles","dubbing"],"default":"subtitles"}}}}}}}},"responses":{"200":{"description":"Translated cues, same order and times","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"type":"object","properties":{"result":{"type":"object","properties":{"target_language":{"type":"string"},"cues":{"type":"array","items":{"type":"object","required":["start_sec","end_sec","text"],"properties":{"start_sec":{"type":"number"},"end_sec":{"type":"number"},"text":{"type":"string","maxLength":1000},"speaker":{"type":"string"}}}},"characters":{"type":"integer"}}}}}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"413":{"$ref":"#/components/responses/E413"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/v1/generate/speech/voices":{"get":{"summary":"List voices and languages","tags":["Speech"],"security":[],"responses":{"200":{"description":"Catalog","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"type":"object","properties":{"result":{"type":"object","properties":{"languages":{"type":"array","items":{"type":"object"}},"voices":{"type":"array","items":{"$ref":"#/components/schemas/Voice"}},"limits":{"type":"object"}}}}}]}}}}}}},"/v1/generate/speech":{"post":{"summary":"Text to speech","tags":["Speech"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["input","options"],"properties":{"input":{"type":"object","required":["text"],"properties":{"text":{"type":"string"}}},"options":{"type":"object","required":["voice"],"properties":{"voice":{"type":"string","description":"A catalog voice id, or \"personal\" for the account's cloned voice"},"format":{"enum":["mp3","wav"],"default":"mp3"},"language":{"type":"string","description":"Required with voice \"personal\""}}}}}}}},"responses":{"200":{"description":"Spoken audio","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"type":"object","properties":{"result":{"type":"object","properties":{"output_asset":{"type":"object","properties":{"asset_id":{"type":"string"},"asset_token":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"duration_sec":{"type":"number"},"download_url":{"type":"string","format":"uri"}}},"characters":{"type":"integer"},"voice":{"type":"object"}}}}}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"413":{"$ref":"#/components/responses/E413"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/v1/compose/voice-over":{"post":{"summary":"Timed lines to one voice track","tags":["Speech"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["input","options"],"properties":{"input":{"type":"object","required":["segments"],"properties":{"segments":{"type":"array","maxItems":500,"items":{"type":"object","required":["start_sec","end_sec","text"],"properties":{"start_sec":{"type":"number"},"end_sec":{"type":"number"},"text":{"type":"string","maxLength":1000},"speaker":{"type":"string"}}}}}},"options":{"type":"object","required":["voice"],"properties":{"voice":{"type":"string"},"format":{"enum":["mp3","wav"]},"min_duration_sec":{"type":"number"},"purpose":{"enum":["voice-over","dubbing"]},"max_balance_micros":{"type":"integer","description":"Dubbing only: the most the prepaid balance may pay, in micro-dollars"},"request_id":{"type":"string","description":"Retry key: a repeat with the same id is refused instead of charged again"}}}}}}}},"responses":{"200":{"description":"Voice track","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"type":"object","properties":{"result":{"type":"object","properties":{"output_asset":{"type":"object","properties":{"asset_id":{"type":"string"},"asset_token":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"duration_sec":{"type":"number"},"download_url":{"type":"string","format":"uri"}}},"summary":{"type":"object"}}}}}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"409":{"$ref":"#/components/responses/E409"},"413":{"$ref":"#/components/responses/E413"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/v1/compose/mix":{"post":{"summary":"Lay a voice track over a recording or video","tags":["Speech"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["input","options"],"properties":{"input":{"type":"object","properties":{"source":{"type":"object","required":["asset_id","asset_token"],"properties":{"asset_id":{"type":"string"},"asset_token":{"type":"string"}}},"voice":{"type":"object","required":["asset_id","asset_token"],"properties":{"asset_id":{"type":"string"},"asset_token":{"type":"string"}}}}},"options":{"type":"object","properties":{"mode":{"enum":["duck","light-duck","replace"]},"format":{"enum":["mp3","wav"]}}}}}}}},"responses":{"200":{"description":"Mixed file","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"type":"object","properties":{"result":{"type":"object","properties":{"output_asset":{"type":"object","properties":{"asset_id":{"type":"string"},"asset_token":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"duration_sec":{"type":"number"},"download_url":{"type":"string","format":"uri"}}}}}}}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"413":{"$ref":"#/components/responses/E413"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/v1/dubbing":{"post":{"summary":"Start a dub (stops at a quote)","tags":["Dubbing"],"description":"Transcribes, translates and quotes the dub. Nothing is spoken until POST /v1/dubbing/{id}/confirm.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["input","options"],"properties":{"input":{"oneOf":[{"type":"object","required":["asset_ref"],"properties":{"asset_ref":{"type":"object","required":["asset_id","asset_token"],"properties":{"asset_id":{"type":"string"},"asset_token":{"type":"string"}}}}},{"type":"object","required":["source_url"],"properties":{"source_url":{"type":"string","format":"uri"}}}]},"options":{"type":"object","required":["voice"],"properties":{"voice":{"type":"string","description":"Catalog voice id, \"personal\" or \"original\""},"language":{"type":"string"},"background":{"enum":["none","lowered","keep"]},"format":{"enum":["mp3","wav"]},"source_language":{"type":"string"},"rights_confirmed":{"type":"boolean"}}}}}}}},"responses":{"202":{"description":"Dub started","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"type":"object","properties":{"result":{"type":"object","properties":{"dub":{"$ref":"#/components/schemas/Dub"}}}}}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"413":{"$ref":"#/components/responses/E413"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/dubbing/{id}":{"get":{"summary":"Read a dub","tags":["Dubbing"],"parameters":[{"name":"id","in":"path","required":true,"description":"Dub id","schema":{"type":"string"}}],"responses":{"200":{"description":"Dub","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"type":"object","properties":{"result":{"type":"object","properties":{"dub":{"$ref":"#/components/schemas/Dub"}}}}}]}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"}}}},"/v1/dubbing/{id}/confirm":{"post":{"summary":"Accept the quote and generate the dub","tags":["Dubbing"],"parameters":[{"name":"id","in":"path","required":true,"description":"Dub id","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"max_balance_micros":{"type":"integer","minimum":0,"description":"Must be at least quote.balance_micros. The balance never pays more than this."}}}}}},"responses":{"202":{"description":"Generating","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"type":"object","properties":{"result":{"type":"object","properties":{"dub":{"$ref":"#/components/schemas/Dub"}}}}}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"},"409":{"$ref":"#/components/responses/E409"},"410":{"$ref":"#/components/responses/E410"}}}},"/v1/dubbing/{id}/cancel":{"post":{"summary":"Cancel a dub before speech starts","tags":["Dubbing"],"parameters":[{"name":"id","in":"path","required":true,"description":"Dub id","schema":{"type":"string"}}],"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"type":"object","properties":{"result":{"type":"object"}}}]}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"}}}},"/v1/voices/consent-challenge":{"post":{"summary":"Get a sentence to record for voice cloning consent","tags":["Voices"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"language":{"enum":["en","es"]}}}}}},"responses":{"200":{"description":"Challenge","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"type":"object","properties":{"result":{"type":"object","properties":{"challenge_id":{"type":"string"},"sentence":{"type":"string"}}}}}]}}}},"401":{"$ref":"#/components/responses/E401"}}}},"/v1/voices":{"post":{"summary":"Create the account's personal voice from a consent recording","tags":["Voices"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["challenge_id","consent_recording","attestation"],"properties":{"challenge_id":{"type":"string"},"consent_recording":{"type":"object","required":["asset_id","asset_token"],"properties":{"asset_id":{"type":"string"},"asset_token":{"type":"string"}}},"samples":{"type":"array","maxItems":3,"items":{"type":"object","required":["asset_id","asset_token"],"properties":{"asset_id":{"type":"string"},"asset_token":{"type":"string"}}}},"attestation":{"type":"object","properties":{"own_voice_or_permission":{"const":true},"not_public_figure":{"const":true},"adult":{"const":true}}}}}}}},"responses":{"201":{"description":"Voice","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"type":"object","properties":{"result":{"type":"object"}}}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"409":{"$ref":"#/components/responses/E409"},"429":{"$ref":"#/components/responses/E429"}}}},"/v1/voices/me":{"get":{"summary":"Read the personal voice","tags":["Voices"],"responses":{"200":{"description":"Voice or null","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"type":"object","properties":{"result":{"type":"object"}}}]}}}},"401":{"$ref":"#/components/responses/E401"}}},"delete":{"summary":"Delete the personal voice","tags":["Voices"],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"type":"object","properties":{"result":{"type":"object"}}}]}}}},"401":{"$ref":"#/components/responses/E401"}}}},"/v1/compose/lip-sync/quote":{"post":{"summary":"Measure and quote a lip-sync job","tags":["Lip-sync"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"video":{"type":"object","required":["asset_id","asset_token"],"properties":{"asset_id":{"type":"string"},"asset_token":{"type":"string"}}},"audio":{"type":"object","required":["asset_id","asset_token"],"properties":{"asset_id":{"type":"string"},"asset_token":{"type":"string"}}}}},"options":{"type":"object","properties":{"quality":{"enum":["standard","pro","studio"]}}}}}}}},"responses":{"200":{"description":"Quote","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"type":"object","properties":{"result":{"type":"object"}}}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"}}}},"/v1/compose/lip-sync":{"post":{"summary":"Start a lip-sync job","tags":["Lip-sync"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"input":{"type":"object","properties":{"video":{"type":"object","required":["asset_id","asset_token"],"properties":{"asset_id":{"type":"string"},"asset_token":{"type":"string"}}},"audio":{"type":"object","required":["asset_id","asset_token"],"properties":{"asset_id":{"type":"string"},"asset_token":{"type":"string"}}}}},"options":{"type":"object","required":["rights_confirmed","max_credit_micros"],"properties":{"quality":{"enum":["standard","pro","studio"]},"rights_confirmed":{"const":true},"max_credit_micros":{"type":"integer","description":"The most the prepaid balance may pay, from the quote"}}}}}}}},"responses":{"202":{"description":"Job","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"type":"object","properties":{"result":{"type":"object"}}}]}}}},"400":{"$ref":"#/components/responses/E400"},"401":{"$ref":"#/components/responses/E401"},"403":{"$ref":"#/components/responses/E403"},"429":{"$ref":"#/components/responses/E429"},"503":{"$ref":"#/components/responses/E503"}}}},"/v1/compose/lip-sync/{id}":{"get":{"summary":"Poll a lip-sync job","tags":["Lip-sync"],"parameters":[{"name":"id","in":"path","required":true,"description":"Lip-sync job id","schema":{"type":"string"}}],"responses":{"200":{"description":"Job","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"type":"object","properties":{"result":{"type":"object"}}}]}}}},"401":{"$ref":"#/components/responses/E401"},"404":{"$ref":"#/components/responses/E404"}}}},"/v1/jobs/{id}":{"get":{"summary":"Poll an async job","tags":["Jobs"],"parameters":[{"name":"id","in":"path","required":true,"description":"Job id","schema":{"type":"string"}},{"name":"x-job-token","in":"header","required":true,"description":"The job token","schema":{"type":"string"}}],"responses":{"200":{"description":"Job","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"type":"object","properties":{"result":{"type":"object","properties":{"job":{"$ref":"#/components/schemas/Job"}}}}}]}}}},"403":{"$ref":"#/components/responses/E403"}}}},"/v1/jobs/{id}/cancel":{"post":{"summary":"Cancel an async job","tags":["Jobs"],"parameters":[{"name":"id","in":"path","required":true,"description":"Job id","schema":{"type":"string"}},{"name":"x-job-token","in":"header","required":true,"description":"The job token","schema":{"type":"string"}}],"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Envelope"},{"type":"object","properties":{"result":{"type":"object"}}}]}}}},"403":{"$ref":"#/components/responses/E403"}}}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An account API key (sh_live_...). Create one at https://soundhalo.com/app/#/developers."}},"responses":{"E400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"E401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"E403":{"description":"Invalid asset or job token, or not allowed for API keys","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"E404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"E409":{"description":"Conflicting state or duplicate request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"E410":{"description":"Quote expired","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"E413":{"description":"File, text or script too long for the plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"E429":{"description":"Allowance, rate limit or balance limit reached; nothing was charged","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"E503":{"description":"Temporarily unavailable; retry after Retry-After seconds","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"schemas":{"Envelope":{"type":"object","properties":{"request_id":{"type":"string"},"status":{"enum":["completed","queued"]},"operation":{"type":"string"},"result":{},"job":{"oneOf":[{"$ref":"#/components/schemas/Job"},{"type":"null"}]},"warnings":{"type":"array","items":{"type":"string"}}}},"ErrorEnvelope":{"type":"object","properties":{"request_id":{"type":"string"},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object"},"retryable":{"type":"boolean"}}}}},"Job":{"type":"object","properties":{"job_id":{"type":"string"},"job_token":{"type":"string"},"operation":{"type":"string"},"status":{"enum":["queued","running","succeeded","failed","cancelled","failed_partial"]},"result":{}}},"Voice":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"language":{"type":"string"},"gender":{"type":"string"},"accent":{"type":"string"},"sample_url":{"type":"string"}}},"Allowance":{"type":"object","properties":{"plan":{"type":"string"},"dubbing":{"type":"object","properties":{"remaining_seconds":{"type":"integer"}}},"credits":{"type":"object","properties":{"balance_micros":{"type":"integer","description":"Prepaid balance in micro-dollars (1,000,000 = $1)"}}}}},"Dub":{"type":"object","properties":{"dub_id":{"type":"string"},"status":{"enum":["transcribing","translating","awaiting_confirmation","generating","mixing","succeeded","failed","cancelled","expired"]},"source":{"type":"object"},"options":{"type":"object"},"quote":{"oneOf":[{"type":"null"},{"type":"object","properties":{"billable_seconds":{"type":"integer"},"by_text":{"type":"boolean"},"plan_seconds":{"type":"integer"},"plan_seconds_left":{"type":"integer"},"balance_micros":{"type":"integer","description":"Amount the balance pays; confirm at least this"},"balance_available_micros":{"type":"integer"},"lines":{"type":"integer"},"lines_total":{"type":"integer"}}}]},"quote_expires_at":{"type":["string","null"]},"confirmed_max_balance_micros":{"type":["integer","null"]},"lines":{"type":["array","null"],"items":{"type":"object","required":["start_sec","end_sec","text"],"properties":{"start_sec":{"type":"number"},"end_sec":{"type":"number"},"text":{"type":"string","maxLength":1000},"speaker":{"type":"string"}}}},"output":{"oneOf":[{"type":"object","properties":{"asset_id":{"type":"string"},"asset_token":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"duration_sec":{"type":"number"},"download_url":{"type":"string","format":"uri"}}},{"type":"null"}]},"voice_track":{"oneOf":[{"type":"object","properties":{"asset_id":{"type":"string"},"asset_token":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer"},"duration_sec":{"type":"number"},"download_url":{"type":"string","format":"uri"}}},{"type":"null"}]},"error":{"type":["object","null"]},"warnings":{"type":"array","items":{"type":"string"}}}}}}}