@sync.so/sdk 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +3 -0
- package/Client.js +27 -22
- package/api/resources/account/client/Client.d.ts +19 -1
- package/api/resources/account/client/Client.js +79 -5
- package/api/resources/account/client/index.d.ts +1 -1
- package/api/resources/account/client/index.js +15 -0
- package/api/resources/account/client/requests/GetAccountRequest.d.ts +13 -0
- package/api/resources/account/client/requests/GetAccountRequest.js +5 -0
- package/api/resources/account/client/requests/ListAccountOrganizationsRequest.d.ts +13 -0
- package/api/resources/account/client/requests/ListAccountOrganizationsRequest.js +5 -0
- package/api/resources/account/client/requests/index.d.ts +2 -0
- package/api/resources/account/client/requests/index.js +2 -0
- package/api/resources/account/types/AccountActiveJobs.d.ts +1 -1
- package/api/resources/account/types/AccountCredits.d.ts +1 -1
- package/api/resources/account/types/AccountFreeAllowance.d.ts +2 -2
- package/api/resources/account/types/AccountOrganizationListItem.d.ts +9 -0
- package/api/resources/account/types/AccountOrganizationListItem.js +5 -0
- package/api/resources/account/types/AccountOrganizations.d.ts +7 -0
- package/api/resources/account/types/AccountOrganizations.js +5 -0
- package/api/resources/account/types/AccountOverview.d.ts +5 -1
- package/api/resources/account/types/index.d.ts +2 -0
- package/api/resources/account/types/index.js +2 -0
- package/api/resources/assets/client/Client.d.ts +71 -1
- package/api/resources/assets/client/Client.js +312 -8
- package/api/resources/assets/client/requests/CountAssetsRequest.d.ts +30 -0
- package/api/resources/assets/client/requests/CountAssetsRequest.js +5 -0
- package/api/resources/assets/client/requests/FindUploadedAssetRequest.d.ts +18 -0
- package/api/resources/assets/client/requests/FindUploadedAssetRequest.js +5 -0
- package/api/resources/assets/client/requests/ListAssetsRequest.d.ts +5 -1
- package/api/resources/assets/client/requests/index.d.ts +2 -0
- package/api/resources/audioTrims/client/Client.d.ts +72 -0
- package/api/resources/audioTrims/client/Client.js +217 -0
- package/api/resources/audioTrims/client/index.d.ts +1 -0
- package/api/resources/audioTrims/client/index.js +17 -0
- package/api/resources/audioTrims/client/requests/CreateAudioTrimRequest.d.ts +21 -0
- package/api/resources/audioTrims/client/requests/CreateAudioTrimRequest.js +5 -0
- package/api/resources/audioTrims/client/requests/index.d.ts +1 -0
- package/api/resources/audioTrims/client/requests/index.js +2 -0
- package/api/resources/audioTrims/index.d.ts +1 -0
- package/api/resources/audioTrims/index.js +17 -0
- package/api/resources/batch/client/Client.d.ts +6 -2
- package/api/resources/batch/client/Client.js +18 -6
- package/api/resources/batch/client/requests/CreateBatchFromRowsRequest.d.ts +3 -3
- package/api/resources/batch/client/requests/CreateBatchRequest.d.ts +2 -2
- package/api/resources/common/errors/AudioTrimTooManyRequestsError.d.ts +9 -0
- package/api/resources/common/errors/AudioTrimTooManyRequestsError.js +52 -0
- package/api/resources/common/errors/LinkImportInProgressError.d.ts +9 -0
- package/api/resources/common/errors/LinkImportInProgressError.js +52 -0
- package/api/resources/common/errors/LinkImportTooManyRequestsError.d.ts +9 -0
- package/api/resources/common/errors/LinkImportTooManyRequestsError.js +52 -0
- package/api/resources/common/errors/SpeakerAnalysisTooManyRequestsError.d.ts +9 -0
- package/api/resources/common/errors/SpeakerAnalysisTooManyRequestsError.js +52 -0
- package/api/resources/common/errors/index.d.ts +4 -0
- package/api/resources/common/errors/index.js +4 -0
- package/api/resources/common/types/ActiveSpeaker.d.ts +3 -3
- package/api/resources/common/types/AnalyzeSpeakersRequest.d.ts +14 -0
- package/api/resources/common/types/AnalyzeSpeakersRequest.js +5 -0
- package/api/resources/common/types/AssetAudioSource.d.ts +17 -0
- package/api/resources/common/types/AssetAudioSource.js +10 -0
- package/api/resources/common/types/AssetIds.d.ts +4 -0
- package/api/resources/common/types/AssetIds.js +5 -0
- package/api/resources/common/types/Audio.d.ts +2 -2
- package/api/resources/common/types/AudioTrim.d.ts +20 -0
- package/api/resources/common/types/AudioTrim.js +5 -0
- package/api/resources/common/types/AudioTrimStatus.d.ts +13 -0
- package/api/resources/common/types/AudioTrimStatus.js +12 -0
- package/api/resources/common/types/BatchConcurrencyError.d.ts +2 -4
- package/api/resources/common/types/BatchGetAssetsRequest.d.ts +8 -0
- package/api/resources/common/types/BatchGetAssetsRequest.js +5 -0
- package/api/resources/common/types/CreateAssetRequest.d.ts +3 -1
- package/api/resources/common/types/CreateAssetUploadRequest.d.ts +1 -1
- package/api/resources/common/types/CreateAudioTrimDto.d.ts +16 -0
- package/api/resources/common/types/CreateAudioTrimDto.js +5 -0
- package/api/resources/common/types/CreateDialogueEditDto.d.ts +2 -2
- package/api/resources/common/types/CreateGenerationDto.d.ts +3 -3
- package/api/resources/common/types/CreateProjectRequest.d.ts +1 -1
- package/api/resources/common/types/CreateTranscriptionDto.d.ts +2 -2
- package/api/resources/common/types/DialogueEditChange.d.ts +1 -1
- package/api/resources/common/types/DialogueEditError.d.ts +5 -1
- package/api/resources/common/types/DialogueEditErrorCode.d.ts +4 -2
- package/api/resources/common/types/DialogueEditErrorCode.js +2 -0
- package/api/resources/common/types/DialogueEditFailedSlot.d.ts +3 -0
- package/api/resources/common/types/DialogueEditJob.d.ts +2 -2
- package/api/resources/common/types/DubDto.d.ts +6 -0
- package/api/resources/common/types/DubLanguage.d.ts +23 -3
- package/api/resources/common/types/DubLanguage.js +17 -0
- package/api/resources/common/types/DubSourceLanguage.d.ts +24 -4
- package/api/resources/common/types/DubSourceLanguage.js +17 -0
- package/api/resources/common/types/EstimateCostRequest.d.ts +1 -1
- package/api/resources/common/types/FindUploadedAssetResponse.d.ts +8 -0
- package/api/resources/common/types/FindUploadedAssetResponse.js +5 -0
- package/api/resources/common/types/Generation.d.ts +9 -5
- package/api/resources/common/types/GenerationCount.d.ts +6 -0
- package/api/resources/common/types/GenerationCount.js +5 -0
- package/api/resources/common/types/GenerationCountType.d.ts +8 -0
- package/api/resources/common/types/GenerationCountType.js +10 -0
- package/api/resources/common/types/GenerationError.d.ts +4 -0
- package/api/resources/common/types/GenerationOptions.d.ts +3 -3
- package/api/resources/common/types/GenerationProgress.d.ts +24 -0
- package/api/resources/common/types/GenerationProgress.js +5 -0
- package/api/resources/common/types/GenerationProgressStage.d.ts +13 -0
- package/api/resources/common/types/GenerationProgressStage.js +12 -0
- package/api/resources/common/types/GenerationSource.d.ts +17 -0
- package/api/resources/common/types/GenerationSource.js +19 -0
- package/api/resources/common/types/GenerationStatus.d.ts +3 -2
- package/api/resources/common/types/GenerationStatus.js +1 -0
- package/api/resources/common/types/Image.d.ts +1 -1
- package/api/resources/common/types/LinkImportError.d.ts +33 -0
- package/api/resources/common/types/LinkImportError.js +5 -0
- package/api/resources/common/types/LinkImportStatus.d.ts +14 -0
- package/api/resources/common/types/LinkImportStatus.js +13 -0
- package/api/resources/common/types/ProjectGenerationError.d.ts +3 -0
- package/api/resources/common/types/ProjectGenerationErrorReason.d.ts +7 -0
- package/api/resources/common/types/ProjectGenerationErrorReason.js +9 -0
- package/api/resources/common/types/SliceSpeakerFaceTrackRequest.d.ts +21 -0
- package/api/resources/common/types/SliceSpeakerFaceTrackRequest.js +5 -0
- package/api/resources/common/types/SpeakerAnalysis.d.ts +26 -0
- package/api/resources/common/types/SpeakerAnalysis.js +5 -0
- package/api/resources/common/types/SpeakerAnalysisSpeaker.d.ts +21 -0
- package/api/resources/common/types/SpeakerAnalysisSpeaker.js +5 -0
- package/api/resources/common/types/SpeakerAnalysisStatus.d.ts +12 -0
- package/api/resources/common/types/SpeakerAnalysisStatus.js +11 -0
- package/api/resources/common/types/SpeakerAvatar.d.ts +16 -0
- package/api/resources/common/types/SpeakerAvatar.js +5 -0
- package/api/resources/common/types/SpeakerAvatarBox.d.ts +12 -0
- package/api/resources/common/types/SpeakerAvatarBox.js +5 -0
- package/api/resources/common/types/SpeakerFaceSupport.d.ts +17 -0
- package/api/resources/common/types/SpeakerFaceSupport.js +5 -0
- package/api/resources/common/types/SpeakerFaceSupportInterval.d.ts +9 -0
- package/api/resources/common/types/SpeakerFaceSupportInterval.js +5 -0
- package/api/resources/common/types/SpeakerFaceTrack.d.ts +18 -0
- package/api/resources/common/types/SpeakerFaceTrack.js +5 -0
- package/api/resources/common/types/SpeakerFaceTrackSlice.d.ts +7 -0
- package/api/resources/common/types/SpeakerFaceTrackSlice.js +5 -0
- package/api/resources/common/types/SpeakerFaceTrackSliceFrames.d.ts +9 -0
- package/api/resources/common/types/SpeakerFaceTrackSliceFrames.js +5 -0
- package/api/resources/common/types/SpeakerMatchEvidence.d.ts +16 -0
- package/api/resources/common/types/SpeakerMatchEvidence.js +5 -0
- package/api/resources/common/types/SpeakerMatchStatus.d.ts +11 -0
- package/api/resources/common/types/SpeakerMatchStatus.js +10 -0
- package/api/resources/common/types/Transcript.d.ts +2 -0
- package/api/resources/common/types/TranscriptSegment.d.ts +2 -0
- package/api/resources/common/types/TranscriptSpeaker.d.ts +13 -0
- package/api/resources/common/types/TranscriptSpeaker.js +5 -0
- package/api/resources/common/types/TranscriptSpeakerLabelFlag.d.ts +11 -0
- package/api/resources/common/types/TranscriptSpeakerLabelFlag.js +10 -0
- package/api/resources/common/types/TranscriptWord.d.ts +4 -0
- package/api/resources/common/types/TranscriptionJob.d.ts +5 -1
- package/api/resources/common/types/TranscriptionJobEstimate.d.ts +20 -0
- package/api/resources/common/types/TranscriptionJobEstimate.js +5 -0
- package/api/resources/common/types/Tts.d.ts +1 -1
- package/api/resources/common/types/UpdateProjectRequest.d.ts +1 -1
- package/api/resources/common/types/Video.d.ts +3 -3
- package/api/resources/common/types/index.d.ts +32 -0
- package/api/resources/common/types/index.js +32 -0
- package/api/resources/dialogueEdits/client/Client.d.ts +35 -31
- package/api/resources/dialogueEdits/client/Client.js +40 -33
- package/api/resources/dialogueEdits/client/index.d.ts +1 -1
- package/api/resources/dialogueEdits/client/index.js +15 -0
- package/api/resources/dialogueEdits/client/requests/CreateDialogueEditRequest.d.ts +46 -0
- package/api/resources/dialogueEdits/client/requests/CreateDialogueEditRequest.js +5 -0
- package/api/resources/dialogueEdits/client/requests/index.d.ts +1 -0
- package/api/resources/dialogueEdits/client/requests/index.js +2 -0
- package/api/resources/errors/client/Client.d.ts +1 -1
- package/api/resources/errors/client/Client.js +2 -2
- package/api/resources/feedback/client/Client.js +1 -1
- package/api/resources/generationCosts/index.d.ts +1 -0
- package/api/resources/generationCosts/index.js +17 -0
- package/api/resources/generationCosts/types/CostAvailability.d.ts +10 -0
- package/api/resources/generationCosts/types/CostAvailability.js +12 -0
- package/api/resources/generationCosts/types/CostComponent.d.ts +19 -0
- package/api/resources/generationCosts/types/CostComponent.js +5 -0
- package/api/resources/generationCosts/types/CostComponentStatus.d.ts +10 -0
- package/api/resources/generationCosts/types/CostComponentStatus.js +12 -0
- package/api/resources/generationCosts/types/CostComponentType.d.ts +9 -0
- package/api/resources/generationCosts/types/CostComponentType.js +11 -0
- package/api/resources/generationCosts/types/CostSource.d.ts +9 -0
- package/api/resources/generationCosts/types/CostSource.js +11 -0
- package/api/resources/generationCosts/types/CostUnit.d.ts +8 -0
- package/api/resources/generationCosts/types/CostUnit.js +10 -0
- package/api/resources/generationCosts/types/CostValueBasis.d.ts +9 -0
- package/api/resources/generationCosts/types/CostValueBasis.js +11 -0
- package/api/resources/generationCosts/types/GenerationCosts.d.ts +23 -0
- package/api/resources/generationCosts/types/GenerationCosts.js +5 -0
- package/api/resources/generationCosts/types/GenerationCostsApiKey.d.ts +10 -0
- package/api/resources/generationCosts/types/GenerationCostsApiKey.js +5 -0
- package/api/resources/generationCosts/types/GenerationCostsList.d.ts +12 -0
- package/api/resources/generationCosts/types/GenerationCostsList.js +5 -0
- package/api/resources/generationCosts/types/GenerationCostsListItem.d.ts +17 -0
- package/api/resources/generationCosts/types/GenerationCostsListItem.js +5 -0
- package/api/resources/generationCosts/types/index.d.ts +11 -0
- package/api/resources/generationCosts/types/index.js +27 -0
- package/api/resources/generations/client/Client.d.ts +58 -13
- package/api/resources/generations/client/Client.js +245 -21
- package/api/resources/generations/client/requests/CountGenerationsRequest.d.ts +30 -0
- package/api/resources/generations/client/requests/CountGenerationsRequest.js +5 -0
- package/api/resources/generations/client/requests/CreateGenerationRequest.d.ts +1 -1
- package/api/resources/generations/client/requests/GetGenerationRequest.d.ts +2 -2
- package/api/resources/generations/client/requests/ListGenerationCostsRequest.d.ts +29 -0
- package/api/resources/generations/client/requests/ListGenerationCostsRequest.js +5 -0
- package/api/resources/generations/client/requests/index.d.ts +2 -0
- package/api/resources/index.d.ts +6 -0
- package/api/resources/index.js +7 -1
- package/api/resources/models/client/Client.js +1 -1
- package/api/resources/organizations/client/Client.js +1 -1
- package/api/resources/projects/client/Client.js +7 -7
- package/api/resources/projects/client/requests/ListProjectsRequest.d.ts +1 -1
- package/api/resources/transcriptions/client/Client.d.ts +66 -1
- package/api/resources/transcriptions/client/Client.js +236 -3
- package/api/resources/tts/client/Client.js +3 -3
- package/api/resources/voices/client/Client.d.ts +10 -6
- package/api/resources/voices/client/Client.js +22 -10
- package/api/resources/webhooks/types/GenerationNotification.d.ts +6 -2
- package/api/resources/webhooks/types/WebhookStatus.d.ts +2 -1
- package/api/resources/webhooks/types/WebhookStatus.js +1 -0
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +27 -22
- package/dist/api/resources/account/client/Client.d.ts +19 -1
- package/dist/api/resources/account/client/Client.js +79 -5
- package/dist/api/resources/account/client/index.d.ts +1 -1
- package/dist/api/resources/account/client/index.js +15 -0
- package/dist/api/resources/account/client/requests/GetAccountRequest.d.ts +13 -0
- package/dist/api/resources/account/client/requests/GetAccountRequest.js +5 -0
- package/dist/api/resources/account/client/requests/ListAccountOrganizationsRequest.d.ts +13 -0
- package/dist/api/resources/account/client/requests/ListAccountOrganizationsRequest.js +5 -0
- package/dist/api/resources/account/client/requests/index.d.ts +2 -0
- package/dist/api/resources/account/client/requests/index.js +2 -0
- package/dist/api/resources/account/types/AccountActiveJobs.d.ts +1 -1
- package/dist/api/resources/account/types/AccountCredits.d.ts +1 -1
- package/dist/api/resources/account/types/AccountFreeAllowance.d.ts +2 -2
- package/dist/api/resources/account/types/AccountOrganizationListItem.d.ts +9 -0
- package/dist/api/resources/account/types/AccountOrganizationListItem.js +5 -0
- package/dist/api/resources/account/types/AccountOrganizations.d.ts +7 -0
- package/dist/api/resources/account/types/AccountOrganizations.js +5 -0
- package/dist/api/resources/account/types/AccountOverview.d.ts +5 -1
- package/dist/api/resources/account/types/index.d.ts +2 -0
- package/dist/api/resources/account/types/index.js +2 -0
- package/dist/api/resources/assets/client/Client.d.ts +71 -1
- package/dist/api/resources/assets/client/Client.js +312 -8
- package/dist/api/resources/assets/client/requests/CountAssetsRequest.d.ts +30 -0
- package/dist/api/resources/assets/client/requests/CountAssetsRequest.js +5 -0
- package/dist/api/resources/assets/client/requests/FindUploadedAssetRequest.d.ts +18 -0
- package/dist/api/resources/assets/client/requests/FindUploadedAssetRequest.js +5 -0
- package/dist/api/resources/assets/client/requests/ListAssetsRequest.d.ts +5 -1
- package/dist/api/resources/assets/client/requests/index.d.ts +2 -0
- package/dist/api/resources/audioTrims/client/Client.d.ts +72 -0
- package/dist/api/resources/audioTrims/client/Client.js +217 -0
- package/dist/api/resources/audioTrims/client/index.d.ts +1 -0
- package/dist/api/resources/audioTrims/client/index.js +17 -0
- package/dist/api/resources/audioTrims/client/requests/CreateAudioTrimRequest.d.ts +21 -0
- package/dist/api/resources/audioTrims/client/requests/CreateAudioTrimRequest.js +5 -0
- package/dist/api/resources/audioTrims/client/requests/index.d.ts +1 -0
- package/dist/api/resources/audioTrims/client/requests/index.js +2 -0
- package/dist/api/resources/audioTrims/index.d.ts +1 -0
- package/dist/api/resources/audioTrims/index.js +17 -0
- package/dist/api/resources/batch/client/Client.d.ts +6 -2
- package/dist/api/resources/batch/client/Client.js +18 -6
- package/dist/api/resources/batch/client/requests/CreateBatchFromRowsRequest.d.ts +3 -3
- package/dist/api/resources/batch/client/requests/CreateBatchRequest.d.ts +2 -2
- package/dist/api/resources/common/errors/AudioTrimTooManyRequestsError.d.ts +9 -0
- package/dist/api/resources/common/errors/AudioTrimTooManyRequestsError.js +52 -0
- package/dist/api/resources/common/errors/LinkImportInProgressError.d.ts +9 -0
- package/dist/api/resources/common/errors/LinkImportInProgressError.js +52 -0
- package/dist/api/resources/common/errors/LinkImportTooManyRequestsError.d.ts +9 -0
- package/dist/api/resources/common/errors/LinkImportTooManyRequestsError.js +52 -0
- package/dist/api/resources/common/errors/SpeakerAnalysisTooManyRequestsError.d.ts +9 -0
- package/dist/api/resources/common/errors/SpeakerAnalysisTooManyRequestsError.js +52 -0
- package/dist/api/resources/common/errors/index.d.ts +4 -0
- package/dist/api/resources/common/errors/index.js +4 -0
- package/dist/api/resources/common/types/ActiveSpeaker.d.ts +3 -3
- package/dist/api/resources/common/types/AnalyzeSpeakersRequest.d.ts +14 -0
- package/dist/api/resources/common/types/AnalyzeSpeakersRequest.js +5 -0
- package/dist/api/resources/common/types/AssetAudioSource.d.ts +17 -0
- package/dist/api/resources/common/types/AssetAudioSource.js +10 -0
- package/dist/api/resources/common/types/AssetIds.d.ts +4 -0
- package/dist/api/resources/common/types/AssetIds.js +5 -0
- package/dist/api/resources/common/types/Audio.d.ts +2 -2
- package/dist/api/resources/common/types/AudioTrim.d.ts +20 -0
- package/dist/api/resources/common/types/AudioTrim.js +5 -0
- package/dist/api/resources/common/types/AudioTrimStatus.d.ts +13 -0
- package/dist/api/resources/common/types/AudioTrimStatus.js +12 -0
- package/dist/api/resources/common/types/BatchConcurrencyError.d.ts +2 -4
- package/dist/api/resources/common/types/BatchGetAssetsRequest.d.ts +8 -0
- package/dist/api/resources/common/types/BatchGetAssetsRequest.js +5 -0
- package/dist/api/resources/common/types/CreateAssetRequest.d.ts +3 -1
- package/dist/api/resources/common/types/CreateAssetUploadRequest.d.ts +1 -1
- package/dist/api/resources/common/types/CreateAudioTrimDto.d.ts +16 -0
- package/dist/api/resources/common/types/CreateAudioTrimDto.js +5 -0
- package/dist/api/resources/common/types/CreateDialogueEditDto.d.ts +2 -2
- package/dist/api/resources/common/types/CreateGenerationDto.d.ts +3 -3
- package/dist/api/resources/common/types/CreateProjectRequest.d.ts +1 -1
- package/dist/api/resources/common/types/CreateTranscriptionDto.d.ts +2 -2
- package/dist/api/resources/common/types/DialogueEditChange.d.ts +1 -1
- package/dist/api/resources/common/types/DialogueEditError.d.ts +5 -1
- package/dist/api/resources/common/types/DialogueEditErrorCode.d.ts +4 -2
- package/dist/api/resources/common/types/DialogueEditErrorCode.js +2 -0
- package/dist/api/resources/common/types/DialogueEditFailedSlot.d.ts +3 -0
- package/dist/api/resources/common/types/DialogueEditJob.d.ts +2 -2
- package/dist/api/resources/common/types/DubDto.d.ts +6 -0
- package/dist/api/resources/common/types/DubLanguage.d.ts +23 -3
- package/dist/api/resources/common/types/DubLanguage.js +17 -0
- package/dist/api/resources/common/types/DubSourceLanguage.d.ts +24 -4
- package/dist/api/resources/common/types/DubSourceLanguage.js +17 -0
- package/dist/api/resources/common/types/EstimateCostRequest.d.ts +1 -1
- package/dist/api/resources/common/types/FindUploadedAssetResponse.d.ts +8 -0
- package/dist/api/resources/common/types/FindUploadedAssetResponse.js +5 -0
- package/dist/api/resources/common/types/Generation.d.ts +9 -5
- package/dist/api/resources/common/types/GenerationCount.d.ts +6 -0
- package/dist/api/resources/common/types/GenerationCount.js +5 -0
- package/dist/api/resources/common/types/GenerationCountType.d.ts +8 -0
- package/dist/api/resources/common/types/GenerationCountType.js +10 -0
- package/dist/api/resources/common/types/GenerationError.d.ts +4 -0
- package/dist/api/resources/common/types/GenerationOptions.d.ts +3 -3
- package/dist/api/resources/common/types/GenerationProgress.d.ts +24 -0
- package/dist/api/resources/common/types/GenerationProgress.js +5 -0
- package/dist/api/resources/common/types/GenerationProgressStage.d.ts +13 -0
- package/dist/api/resources/common/types/GenerationProgressStage.js +12 -0
- package/dist/api/resources/common/types/GenerationSource.d.ts +17 -0
- package/dist/api/resources/common/types/GenerationSource.js +19 -0
- package/dist/api/resources/common/types/GenerationStatus.d.ts +3 -2
- package/dist/api/resources/common/types/GenerationStatus.js +1 -0
- package/dist/api/resources/common/types/Image.d.ts +1 -1
- package/dist/api/resources/common/types/LinkImportError.d.ts +33 -0
- package/dist/api/resources/common/types/LinkImportError.js +5 -0
- package/dist/api/resources/common/types/LinkImportStatus.d.ts +14 -0
- package/dist/api/resources/common/types/LinkImportStatus.js +13 -0
- package/dist/api/resources/common/types/ProjectGenerationError.d.ts +3 -0
- package/dist/api/resources/common/types/ProjectGenerationErrorReason.d.ts +7 -0
- package/dist/api/resources/common/types/ProjectGenerationErrorReason.js +9 -0
- package/dist/api/resources/common/types/SliceSpeakerFaceTrackRequest.d.ts +21 -0
- package/dist/api/resources/common/types/SliceSpeakerFaceTrackRequest.js +5 -0
- package/dist/api/resources/common/types/SpeakerAnalysis.d.ts +26 -0
- package/dist/api/resources/common/types/SpeakerAnalysis.js +5 -0
- package/dist/api/resources/common/types/SpeakerAnalysisSpeaker.d.ts +21 -0
- package/dist/api/resources/common/types/SpeakerAnalysisSpeaker.js +5 -0
- package/dist/api/resources/common/types/SpeakerAnalysisStatus.d.ts +12 -0
- package/dist/api/resources/common/types/SpeakerAnalysisStatus.js +11 -0
- package/dist/api/resources/common/types/SpeakerAvatar.d.ts +16 -0
- package/dist/api/resources/common/types/SpeakerAvatar.js +5 -0
- package/dist/api/resources/common/types/SpeakerAvatarBox.d.ts +12 -0
- package/dist/api/resources/common/types/SpeakerAvatarBox.js +5 -0
- package/dist/api/resources/common/types/SpeakerFaceSupport.d.ts +17 -0
- package/dist/api/resources/common/types/SpeakerFaceSupport.js +5 -0
- package/dist/api/resources/common/types/SpeakerFaceSupportInterval.d.ts +9 -0
- package/dist/api/resources/common/types/SpeakerFaceSupportInterval.js +5 -0
- package/dist/api/resources/common/types/SpeakerFaceTrack.d.ts +18 -0
- package/dist/api/resources/common/types/SpeakerFaceTrack.js +5 -0
- package/dist/api/resources/common/types/SpeakerFaceTrackSlice.d.ts +7 -0
- package/dist/api/resources/common/types/SpeakerFaceTrackSlice.js +5 -0
- package/dist/api/resources/common/types/SpeakerFaceTrackSliceFrames.d.ts +9 -0
- package/dist/api/resources/common/types/SpeakerFaceTrackSliceFrames.js +5 -0
- package/dist/api/resources/common/types/SpeakerMatchEvidence.d.ts +16 -0
- package/dist/api/resources/common/types/SpeakerMatchEvidence.js +5 -0
- package/dist/api/resources/common/types/SpeakerMatchStatus.d.ts +11 -0
- package/dist/api/resources/common/types/SpeakerMatchStatus.js +10 -0
- package/dist/api/resources/common/types/Transcript.d.ts +2 -0
- package/dist/api/resources/common/types/TranscriptSegment.d.ts +2 -0
- package/dist/api/resources/common/types/TranscriptSpeaker.d.ts +13 -0
- package/dist/api/resources/common/types/TranscriptSpeaker.js +5 -0
- package/dist/api/resources/common/types/TranscriptSpeakerLabelFlag.d.ts +11 -0
- package/dist/api/resources/common/types/TranscriptSpeakerLabelFlag.js +10 -0
- package/dist/api/resources/common/types/TranscriptWord.d.ts +4 -0
- package/dist/api/resources/common/types/TranscriptionJob.d.ts +5 -1
- package/dist/api/resources/common/types/TranscriptionJobEstimate.d.ts +20 -0
- package/dist/api/resources/common/types/TranscriptionJobEstimate.js +5 -0
- package/dist/api/resources/common/types/Tts.d.ts +1 -1
- package/dist/api/resources/common/types/UpdateProjectRequest.d.ts +1 -1
- package/dist/api/resources/common/types/Video.d.ts +3 -3
- package/dist/api/resources/common/types/index.d.ts +32 -0
- package/dist/api/resources/common/types/index.js +32 -0
- package/dist/api/resources/dialogueEdits/client/Client.d.ts +35 -31
- package/dist/api/resources/dialogueEdits/client/Client.js +40 -33
- package/dist/api/resources/dialogueEdits/client/index.d.ts +1 -1
- package/dist/api/resources/dialogueEdits/client/index.js +15 -0
- package/dist/api/resources/dialogueEdits/client/requests/CreateDialogueEditRequest.d.ts +46 -0
- package/dist/api/resources/dialogueEdits/client/requests/CreateDialogueEditRequest.js +5 -0
- package/dist/api/resources/dialogueEdits/client/requests/index.d.ts +1 -0
- package/dist/api/resources/dialogueEdits/client/requests/index.js +2 -0
- package/dist/api/resources/errors/client/Client.d.ts +1 -1
- package/dist/api/resources/errors/client/Client.js +2 -2
- package/dist/api/resources/feedback/client/Client.js +1 -1
- package/dist/api/resources/generationCosts/index.d.ts +1 -0
- package/dist/api/resources/generationCosts/index.js +17 -0
- package/dist/api/resources/generationCosts/types/CostAvailability.d.ts +10 -0
- package/dist/api/resources/generationCosts/types/CostAvailability.js +12 -0
- package/dist/api/resources/generationCosts/types/CostComponent.d.ts +19 -0
- package/dist/api/resources/generationCosts/types/CostComponent.js +5 -0
- package/dist/api/resources/generationCosts/types/CostComponentStatus.d.ts +10 -0
- package/dist/api/resources/generationCosts/types/CostComponentStatus.js +12 -0
- package/dist/api/resources/generationCosts/types/CostComponentType.d.ts +9 -0
- package/dist/api/resources/generationCosts/types/CostComponentType.js +11 -0
- package/dist/api/resources/generationCosts/types/CostSource.d.ts +9 -0
- package/dist/api/resources/generationCosts/types/CostSource.js +11 -0
- package/dist/api/resources/generationCosts/types/CostUnit.d.ts +8 -0
- package/dist/api/resources/generationCosts/types/CostUnit.js +10 -0
- package/dist/api/resources/generationCosts/types/CostValueBasis.d.ts +9 -0
- package/dist/api/resources/generationCosts/types/CostValueBasis.js +11 -0
- package/dist/api/resources/generationCosts/types/GenerationCosts.d.ts +23 -0
- package/dist/api/resources/generationCosts/types/GenerationCosts.js +5 -0
- package/dist/api/resources/generationCosts/types/GenerationCostsApiKey.d.ts +10 -0
- package/dist/api/resources/generationCosts/types/GenerationCostsApiKey.js +5 -0
- package/dist/api/resources/generationCosts/types/GenerationCostsList.d.ts +12 -0
- package/dist/api/resources/generationCosts/types/GenerationCostsList.js +5 -0
- package/dist/api/resources/generationCosts/types/GenerationCostsListItem.d.ts +17 -0
- package/dist/api/resources/generationCosts/types/GenerationCostsListItem.js +5 -0
- package/dist/api/resources/generationCosts/types/index.d.ts +11 -0
- package/dist/api/resources/generationCosts/types/index.js +27 -0
- package/dist/api/resources/generations/client/Client.d.ts +58 -13
- package/dist/api/resources/generations/client/Client.js +245 -21
- package/dist/api/resources/generations/client/requests/CountGenerationsRequest.d.ts +30 -0
- package/dist/api/resources/generations/client/requests/CountGenerationsRequest.js +5 -0
- package/dist/api/resources/generations/client/requests/CreateGenerationRequest.d.ts +1 -1
- package/dist/api/resources/generations/client/requests/GetGenerationRequest.d.ts +2 -2
- package/dist/api/resources/generations/client/requests/ListGenerationCostsRequest.d.ts +29 -0
- package/dist/api/resources/generations/client/requests/ListGenerationCostsRequest.js +5 -0
- package/dist/api/resources/generations/client/requests/index.d.ts +2 -0
- package/dist/api/resources/index.d.ts +6 -0
- package/dist/api/resources/index.js +7 -1
- package/dist/api/resources/models/client/Client.js +1 -1
- package/dist/api/resources/organizations/client/Client.js +1 -1
- package/dist/api/resources/projects/client/Client.js +7 -7
- package/dist/api/resources/projects/client/requests/ListProjectsRequest.d.ts +1 -1
- package/dist/api/resources/transcriptions/client/Client.d.ts +66 -1
- package/dist/api/resources/transcriptions/client/Client.js +236 -3
- package/dist/api/resources/tts/client/Client.js +3 -3
- package/dist/api/resources/voices/client/Client.d.ts +10 -6
- package/dist/api/resources/voices/client/Client.js +22 -10
- package/dist/api/resources/webhooks/types/GenerationNotification.d.ts +6 -2
- package/dist/api/resources/webhooks/types/WebhookStatus.d.ts +2 -1
- package/dist/api/resources/webhooks/types/WebhookStatus.js +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +995 -124
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from "./GenerationCosts";
|
|
2
|
+
export * from "./GenerationCostsList";
|
|
3
|
+
export * from "./GenerationCostsListItem";
|
|
4
|
+
export * from "./GenerationCostsApiKey";
|
|
5
|
+
export * from "./CostAvailability";
|
|
6
|
+
export * from "./CostComponent";
|
|
7
|
+
export * from "./CostComponentType";
|
|
8
|
+
export * from "./CostComponentStatus";
|
|
9
|
+
export * from "./CostValueBasis";
|
|
10
|
+
export * from "./CostUnit";
|
|
11
|
+
export * from "./CostSource";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./GenerationCosts"), exports);
|
|
18
|
+
__exportStar(require("./GenerationCostsList"), exports);
|
|
19
|
+
__exportStar(require("./GenerationCostsListItem"), exports);
|
|
20
|
+
__exportStar(require("./GenerationCostsApiKey"), exports);
|
|
21
|
+
__exportStar(require("./CostAvailability"), exports);
|
|
22
|
+
__exportStar(require("./CostComponent"), exports);
|
|
23
|
+
__exportStar(require("./CostComponentType"), exports);
|
|
24
|
+
__exportStar(require("./CostComponentStatus"), exports);
|
|
25
|
+
__exportStar(require("./CostValueBasis"), exports);
|
|
26
|
+
__exportStar(require("./CostUnit"), exports);
|
|
27
|
+
__exportStar(require("./CostSource"), exports);
|
|
@@ -29,13 +29,62 @@ export declare class Generations {
|
|
|
29
29
|
protected readonly _options: Generations.Options;
|
|
30
30
|
constructor(_options?: Generations.Options);
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Count generations visible to your credentials. All provided filters are combined.
|
|
33
|
+
*
|
|
34
|
+
* @param {Sync.CountGenerationsRequest} request
|
|
35
|
+
* @param {Generations.RequestOptions} requestOptions - Request-specific configuration.
|
|
36
|
+
*
|
|
37
|
+
* @throws {@link Sync.BadRequestError}
|
|
38
|
+
* @throws {@link Sync.UnauthorizedError}
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* await client.generations.count()
|
|
42
|
+
*/
|
|
43
|
+
count(request?: Sync.CountGenerationsRequest, requestOptions?: Generations.RequestOptions): core.HttpResponsePromise<Sync.GenerationCount>;
|
|
44
|
+
private __count;
|
|
45
|
+
/**
|
|
46
|
+
* Read the recorded costs for a generation. Credit amounts are USD face value, not cash paid. Metered amounts exclude invoice adjustments and tax. A null total means one or more components are pending or unavailable. This endpoint does not estimate prices or change billing.
|
|
47
|
+
*
|
|
48
|
+
* @param {Sync.GenerationId} id
|
|
49
|
+
* @param {Generations.RequestOptions} requestOptions - Request-specific configuration.
|
|
50
|
+
*
|
|
51
|
+
* @throws {@link Sync.BadRequestError}
|
|
52
|
+
* @throws {@link Sync.UnauthorizedError}
|
|
53
|
+
* @throws {@link Sync.NotFoundError}
|
|
54
|
+
*
|
|
55
|
+
* @example
|
|
56
|
+
* await client.generations.getCosts("id")
|
|
57
|
+
*/
|
|
58
|
+
getCosts(id: Sync.GenerationId, requestOptions?: Generations.RequestOptions): core.HttpResponsePromise<Sync.GenerationCosts>;
|
|
59
|
+
private __getCosts;
|
|
60
|
+
/**
|
|
61
|
+
* List the recorded costs of every generation that finished in a time range, for loading usage and spend in bulk. Each item is the same cost object as Get Generation Costs, plus `createdAt`, `finishedAt`, `model` and `apiKey`. The range filters on `finishedAt`, with `startTime` inclusive and `endTime` exclusive, and items are ordered oldest first, so back-to-back ranges such as one per UTC day neither overlap nor skip. Page with `cursor` until `nextCursor` is null, keeping the same `startTime` and `endTime`; changing the range between pages can skip items. Costs are normally recorded within about 10 minutes of completion. A null total means one or more components are pending or unavailable; `availability` is `pending`, `partial` or `unavailable`, and `partial` or `unavailable` items may not change. If recorded usage can't be read, the whole page fails with 503 `usage_dependency_unavailable` and no partial page is returned; retry the same request. See [Export usage and costs](/docs/api-reference/guides/usage-export).
|
|
62
|
+
*
|
|
63
|
+
* @param {Sync.ListGenerationCostsRequest} request
|
|
64
|
+
* @param {Generations.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
|
+
*
|
|
66
|
+
* @throws {@link Sync.BadRequestError}
|
|
67
|
+
* @throws {@link Sync.UnauthorizedError}
|
|
68
|
+
* @throws {@link Sync.ServiceUnavailableError}
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* await client.generations.listCosts({
|
|
72
|
+
* startTime: "2026-11-12T00:00:00Z",
|
|
73
|
+
* endTime: "2026-11-13T00:00:00Z",
|
|
74
|
+
* limit: 500
|
|
75
|
+
* })
|
|
76
|
+
*/
|
|
77
|
+
listCosts(request: Sync.ListGenerationCostsRequest, requestOptions?: Generations.RequestOptions): core.HttpResponsePromise<Sync.GenerationCostsList>;
|
|
78
|
+
private __listCosts;
|
|
79
|
+
/**
|
|
80
|
+
* Create a lip sync generation with `application/json` — provide each input by `url` or by `assetId` from an uploaded asset. For reusable or large local files, upload them first with POST /v2/assets/upload and pass the returned `assetId`; see [Asset Uploads](/docs/developer-guides/asset-uploads). Use the multipart "Create Generation with Files" form only when uploading direct audio, video, or image file fields; it has a 5 GiB per-file application parser limit, subject to your plan and any lower proxy limits. Nested fields such as input, options, segments, outputAudio, dubParams, and dialogueEdit must be JSON strings in multipart requests. If a `text` input requires speech synthesis and the ElevenLabs provider is temporarily unavailable, the request returns errorCode elevenlabs_service_unavailable: 504 for provider timeouts and 503 for other provider outages for unkeyed requests. Keyed uncertain outcomes return 503 IDEMPOTENCY_OUTCOME_UNKNOWN instead. An older dialogueEdit preview without segment lipsync and section expansion returns dialogue_edit_retime_required (422). Create a new preview from the same transcript and edits. A dialogueEdit that removes more speech than the surrounding footage can absorb returns errorCode dialogue_edit_removal_too_large (422). When the failing section can be identified, `dialogueEditSection` on the error names it; change it and create a new preview before submitting again. Retrying the same preview fails again. A video input `url` that links to a single TikTok, Instagram, Facebook, or YouTube video is imported first: the generation is created PENDING and starts once the video is downloaded, or ends FAILED with errorCode import_failed if the import fails. A linked audio input, or a linked video in a segments or dubbing request, returns 409 import_in_progress until its import finishes; send the same request (with the same Idempotency-Key, if any) again after Retry-After. Link imports can also return 403 import_not_enabled, 422 import_failed, 429 import_daily_limit_reached or concurrency_limit_reached, and 503 import_unavailable. See [Asset Uploads](/docs/developer-guides/asset-uploads#import-a-social-video-link). Send the optional Idempotency-Key header on the first request and reuse it with the same payload on retries. An accepted replay returns 200 with the original generation's current state and Idempotency-Replayed: true. A retry after that generation ended FAILED or REJECTED starts a new generation instead (201). An API-key request without the header that is identical to one your organization sent in the last 60 seconds returns 409 DUPLICATE_SUBMISSION with the original generationId; send a unique Idempotency-Key with each generation you intend. See [Idempotent Requests](/docs/api-reference/guides/idempotency) for key validation, conflicts, retention, duplicates, and uncertain-outcome recovery.
|
|
33
81
|
*
|
|
34
82
|
* @param {Sync.CreateGenerationJsonRequest} request
|
|
35
83
|
* @param {Generations.RequestOptions} requestOptions - Request-specific configuration.
|
|
36
84
|
*
|
|
37
85
|
* @throws {@link Sync.BadRequestError}
|
|
38
86
|
* @throws {@link Sync.UnauthorizedError}
|
|
87
|
+
* @throws {@link Sync.ForbiddenError}
|
|
39
88
|
* @throws {@link Sync.UnprocessableEntityError}
|
|
40
89
|
* @throws {@link Sync.ConflictError}
|
|
41
90
|
* @throws {@link Sync.GenerationDeletedError}
|
|
@@ -87,7 +136,7 @@ export declare class Generations {
|
|
|
87
136
|
create(request: Sync.CreateGenerationJsonRequest, requestOptions?: Generations.RequestOptions): core.HttpResponsePromise<Sync.Generation>;
|
|
88
137
|
private __create;
|
|
89
138
|
/**
|
|
90
|
-
* The multipart/form-data form of `POST /v2/generate` — the same endpoint as "Create Generation", for uploading local files directly instead of passing URLs. Send each file under a field named for its type (`video`, `image`, `audio`), at most one of each. The application parser allows up to 5 GiB (5 × 1024³ bytes) per file, 3 files, 32 fields, 35 total parts, and 1 MiB per field. A file over the parser limit returns 413 generation_input_validation_failed, and a file over your plan limit returns 422 file_size_exceeds_plan_limit. Proxy limits may be lower; this ceiling does not guarantee a 5 GiB direct transfer. Each file is saved as an asset in your organization and passed to the generation by `assetId`. For large files, upload via POST /v2/assets/upload first and pass the `assetId`, so retries don't resend the file. Nested fields such as `input`, `options`, `segments`, `outputAudio`, `dubParams`, and `dialogueEdit` must be sent as JSON strings in multipart requests. Image inputs are sync-3 only. If a `text` input requires speech synthesis and the ElevenLabs provider is temporarily unavailable, the request returns errorCode elevenlabs_service_unavailable: 504 for provider timeouts and 503 for other provider outages for unkeyed requests. Keyed uncertain outcomes return 503 IDEMPOTENCY_OUTCOME_UNKNOWN instead. An
|
|
139
|
+
* The multipart/form-data form of `POST /v2/generate` — the same endpoint as "Create Generation", for uploading local files directly instead of passing URLs. Send each file under a field named for its type (`video`, `image`, `audio`), at most one of each. The application parser allows up to 5 GiB (5 × 1024³ bytes) per file, 3 files, 32 fields, 35 total parts, and 1 MiB per field. A file over the parser limit returns 413 generation_input_validation_failed, and a file over your plan limit returns 422 file_size_exceeds_plan_limit. A malformed or truncated multipart body, an unsupported file field, or too many fields or parts returns 400 generation_input_validation_failed. Let your HTTP client build the multipart boundaries and send only the documented fields. Proxy limits may be lower; this ceiling does not guarantee a 5 GiB direct transfer. Each file is saved as an asset in your organization and passed to the generation by `assetId`. For large files, upload via POST /v2/assets/upload first and pass the `assetId`, so retries don't resend the file. Nested fields such as `input`, `options`, `segments`, `outputAudio`, `dubParams`, and `dialogueEdit` must be sent as JSON strings in multipart requests. Image inputs are sync-3 only. If a `text` input requires speech synthesis and the ElevenLabs provider is temporarily unavailable, the request returns errorCode elevenlabs_service_unavailable: 504 for provider timeouts and 503 for other provider outages for unkeyed requests. Keyed uncertain outcomes return 503 IDEMPOTENCY_OUTCOME_UNKNOWN instead. An older dialogueEdit preview without segment lipsync and section expansion returns dialogue_edit_retime_required (422). Create a new preview from the same transcript and edits. A dialogueEdit that removes more speech than the surrounding footage can absorb returns errorCode dialogue_edit_removal_too_large (422). When the failing section can be identified, `dialogueEditSection` on the error names it; change it and create a new preview before submitting again. Retrying the same preview fails again. Send the optional Idempotency-Key header on the first request and reuse it with the same payload on retries. An accepted replay returns 200 with the original generation's current state and Idempotency-Replayed: true. A retry after that generation ended FAILED or REJECTED starts a new generation instead (201). An API-key request without the header that is identical to one your organization sent in the last 60 seconds returns 409 DUPLICATE_SUBMISSION with the original generationId; send a unique Idempotency-Key with each generation you intend. See [Idempotent Requests](/docs/api-reference/guides/idempotency) for key validation, conflicts, retention, duplicates, and uncertain-outcome recovery.
|
|
91
140
|
*
|
|
92
141
|
* @param {File | fs.ReadStream | Blob | undefined} video
|
|
93
142
|
* @param {File | fs.ReadStream | Blob | undefined} image
|
|
@@ -152,18 +201,12 @@ export declare class Generations {
|
|
|
152
201
|
* as v2 Creator and v3 Starter or higher) receive the clean output when
|
|
153
202
|
* available. Historical outputs can have the watermark burned in, so an
|
|
154
203
|
* upgrade does not guarantee every old output becomes watermark-free.
|
|
155
|
-
*
|
|
156
|
-
* If no watermarked derivative exists, the resolver retains its existing
|
|
157
|
-
* fallback to the original output; changing plans does not rewrite files.
|
|
204
|
+
* Changing plans does not rewrite historical files.
|
|
158
205
|
* This endpoint does not generate a new render or remove burned-in watermarks.
|
|
159
206
|
*
|
|
160
|
-
* Signed
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
* output is still available. The selected S3 file is checked before
|
|
164
|
-
* signing; a successful response does not guarantee future availability.
|
|
165
|
-
* Older URL-only records return their stored URL unchanged, without
|
|
166
|
-
* checking its availability or extending its original expiration.
|
|
207
|
+
* Signed URLs can expire or become unavailable before their nominal
|
|
208
|
+
* validity. Request this endpoint again for a fresh URL while the output
|
|
209
|
+
* is still available.
|
|
167
210
|
* These URLs are download credentials: keep them private.
|
|
168
211
|
*
|
|
169
212
|
* Errors use the standard JSON error body and stable `errorCode`:
|
|
@@ -176,7 +219,7 @@ export declare class Generations {
|
|
|
176
219
|
* | 404 | `generation_output_unavailable` | No eligible output reference or the selected file is missing; contact support. |
|
|
177
220
|
* | 409 | `generation_not_ready` | Pending or processing; poll Get Generation until COMPLETED. |
|
|
178
221
|
* | 422 | `generation_not_downloadable` | Failed or rejected; inspect the generation error. |
|
|
179
|
-
* | 503 | `generation_download_unavailable` |
|
|
222
|
+
* | 503 | `generation_download_unavailable` | The download URL could not be prepared; retry with backoff. |
|
|
180
223
|
*
|
|
181
224
|
* Authentication also returns 422 for draft organizations. Requesting a
|
|
182
225
|
* download URL does not create a project, incur a generation charge, or
|
|
@@ -199,6 +242,8 @@ export declare class Generations {
|
|
|
199
242
|
download(id: Sync.GenerationId, request?: Sync.GetGenerationDownloadRequest, requestOptions?: Generations.RequestOptions): core.HttpResponsePromise<string>;
|
|
200
243
|
private __download;
|
|
201
244
|
/**
|
|
245
|
+
* list sync. labs generations and filter jobs by status or generation id. review authentication, request parameters, response objects, and api errors.
|
|
246
|
+
*
|
|
202
247
|
* @param {Sync.ListGenerationsRequest} request
|
|
203
248
|
* @param {Generations.RequestOptions} requestOptions - Request-specific configuration.
|
|
204
249
|
*
|
|
@@ -63,21 +63,247 @@ exports.Generations = void 0;
|
|
|
63
63
|
const environments = __importStar(require("../../../../environments"));
|
|
64
64
|
const core = __importStar(require("../../../../core"));
|
|
65
65
|
const Sync = __importStar(require("../../../index"));
|
|
66
|
+
const json_1 = require("../../../../core/json");
|
|
66
67
|
const url_join_1 = __importDefault(require("url-join"));
|
|
67
68
|
const errors = __importStar(require("../../../../errors/index"));
|
|
68
|
-
const json_1 = require("../../../../core/json");
|
|
69
69
|
class Generations {
|
|
70
70
|
constructor(_options = {}) {
|
|
71
71
|
this._options = _options;
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
|
-
*
|
|
74
|
+
* Count generations visible to your credentials. All provided filters are combined.
|
|
75
|
+
*
|
|
76
|
+
* @param {Sync.CountGenerationsRequest} request
|
|
77
|
+
* @param {Generations.RequestOptions} requestOptions - Request-specific configuration.
|
|
78
|
+
*
|
|
79
|
+
* @throws {@link Sync.BadRequestError}
|
|
80
|
+
* @throws {@link Sync.UnauthorizedError}
|
|
81
|
+
*
|
|
82
|
+
* @example
|
|
83
|
+
* await client.generations.count()
|
|
84
|
+
*/
|
|
85
|
+
count(request = {}, requestOptions) {
|
|
86
|
+
return core.HttpResponsePromise.fromPromise(this.__count(request, requestOptions));
|
|
87
|
+
}
|
|
88
|
+
__count() {
|
|
89
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
90
|
+
var _a, _b, _c;
|
|
91
|
+
const { status, type: type_, source, generationSource, currentUserOnly } = request;
|
|
92
|
+
const _queryParams = {};
|
|
93
|
+
if (status != null) {
|
|
94
|
+
_queryParams["status"] = (0, json_1.toJson)(status);
|
|
95
|
+
}
|
|
96
|
+
if (type_ != null) {
|
|
97
|
+
_queryParams["type"] = type_;
|
|
98
|
+
}
|
|
99
|
+
if (source != null) {
|
|
100
|
+
_queryParams["source"] = (0, json_1.toJson)(source);
|
|
101
|
+
}
|
|
102
|
+
if (generationSource != null) {
|
|
103
|
+
_queryParams["generationSource"] = generationSource;
|
|
104
|
+
}
|
|
105
|
+
if (currentUserOnly != null) {
|
|
106
|
+
_queryParams["currentUserOnly"] = currentUserOnly.toString();
|
|
107
|
+
}
|
|
108
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
109
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, "/v2/generations/count"),
|
|
110
|
+
method: "GET",
|
|
111
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.5.0", "User-Agent": "@sync.so/sdk/0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
112
|
+
contentType: "application/json",
|
|
113
|
+
queryParameters: _queryParams,
|
|
114
|
+
requestType: "json",
|
|
115
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
116
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
117
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
118
|
+
});
|
|
119
|
+
if (_response.ok) {
|
|
120
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
121
|
+
}
|
|
122
|
+
if (_response.error.reason === "status-code") {
|
|
123
|
+
switch (_response.error.statusCode) {
|
|
124
|
+
case 400:
|
|
125
|
+
throw new Sync.BadRequestError(_response.error.body, _response.rawResponse);
|
|
126
|
+
case 401:
|
|
127
|
+
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
128
|
+
default:
|
|
129
|
+
throw new errors.SyncError({
|
|
130
|
+
statusCode: _response.error.statusCode,
|
|
131
|
+
body: _response.error.body,
|
|
132
|
+
rawResponse: _response.rawResponse,
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
switch (_response.error.reason) {
|
|
137
|
+
case "non-json":
|
|
138
|
+
throw new errors.SyncError({
|
|
139
|
+
statusCode: _response.error.statusCode,
|
|
140
|
+
body: _response.error.rawBody,
|
|
141
|
+
rawResponse: _response.rawResponse,
|
|
142
|
+
});
|
|
143
|
+
case "timeout":
|
|
144
|
+
throw new errors.SyncTimeoutError("Timeout exceeded when calling GET /v2/generations/count.");
|
|
145
|
+
case "unknown":
|
|
146
|
+
throw new errors.SyncError({
|
|
147
|
+
message: _response.error.errorMessage,
|
|
148
|
+
rawResponse: _response.rawResponse,
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Read the recorded costs for a generation. Credit amounts are USD face value, not cash paid. Metered amounts exclude invoice adjustments and tax. A null total means one or more components are pending or unavailable. This endpoint does not estimate prices or change billing.
|
|
155
|
+
*
|
|
156
|
+
* @param {Sync.GenerationId} id
|
|
157
|
+
* @param {Generations.RequestOptions} requestOptions - Request-specific configuration.
|
|
158
|
+
*
|
|
159
|
+
* @throws {@link Sync.BadRequestError}
|
|
160
|
+
* @throws {@link Sync.UnauthorizedError}
|
|
161
|
+
* @throws {@link Sync.NotFoundError}
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* await client.generations.getCosts("id")
|
|
165
|
+
*/
|
|
166
|
+
getCosts(id, requestOptions) {
|
|
167
|
+
return core.HttpResponsePromise.fromPromise(this.__getCosts(id, requestOptions));
|
|
168
|
+
}
|
|
169
|
+
__getCosts(id, requestOptions) {
|
|
170
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
171
|
+
var _a, _b, _c;
|
|
172
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
173
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, `/v2/generate/${encodeURIComponent(id)}/costs`),
|
|
174
|
+
method: "GET",
|
|
175
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.5.0", "User-Agent": "@sync.so/sdk/0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
176
|
+
contentType: "application/json",
|
|
177
|
+
requestType: "json",
|
|
178
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
179
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
180
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
181
|
+
});
|
|
182
|
+
if (_response.ok) {
|
|
183
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
184
|
+
}
|
|
185
|
+
if (_response.error.reason === "status-code") {
|
|
186
|
+
switch (_response.error.statusCode) {
|
|
187
|
+
case 400:
|
|
188
|
+
throw new Sync.BadRequestError(_response.error.body, _response.rawResponse);
|
|
189
|
+
case 401:
|
|
190
|
+
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
191
|
+
case 404:
|
|
192
|
+
throw new Sync.NotFoundError(_response.error.body, _response.rawResponse);
|
|
193
|
+
default:
|
|
194
|
+
throw new errors.SyncError({
|
|
195
|
+
statusCode: _response.error.statusCode,
|
|
196
|
+
body: _response.error.body,
|
|
197
|
+
rawResponse: _response.rawResponse,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
switch (_response.error.reason) {
|
|
202
|
+
case "non-json":
|
|
203
|
+
throw new errors.SyncError({
|
|
204
|
+
statusCode: _response.error.statusCode,
|
|
205
|
+
body: _response.error.rawBody,
|
|
206
|
+
rawResponse: _response.rawResponse,
|
|
207
|
+
});
|
|
208
|
+
case "timeout":
|
|
209
|
+
throw new errors.SyncTimeoutError("Timeout exceeded when calling GET /v2/generate/{id}/costs.");
|
|
210
|
+
case "unknown":
|
|
211
|
+
throw new errors.SyncError({
|
|
212
|
+
message: _response.error.errorMessage,
|
|
213
|
+
rawResponse: _response.rawResponse,
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* List the recorded costs of every generation that finished in a time range, for loading usage and spend in bulk. Each item is the same cost object as Get Generation Costs, plus `createdAt`, `finishedAt`, `model` and `apiKey`. The range filters on `finishedAt`, with `startTime` inclusive and `endTime` exclusive, and items are ordered oldest first, so back-to-back ranges such as one per UTC day neither overlap nor skip. Page with `cursor` until `nextCursor` is null, keeping the same `startTime` and `endTime`; changing the range between pages can skip items. Costs are normally recorded within about 10 minutes of completion. A null total means one or more components are pending or unavailable; `availability` is `pending`, `partial` or `unavailable`, and `partial` or `unavailable` items may not change. If recorded usage can't be read, the whole page fails with 503 `usage_dependency_unavailable` and no partial page is returned; retry the same request. See [Export usage and costs](/docs/api-reference/guides/usage-export).
|
|
220
|
+
*
|
|
221
|
+
* @param {Sync.ListGenerationCostsRequest} request
|
|
222
|
+
* @param {Generations.RequestOptions} requestOptions - Request-specific configuration.
|
|
223
|
+
*
|
|
224
|
+
* @throws {@link Sync.BadRequestError}
|
|
225
|
+
* @throws {@link Sync.UnauthorizedError}
|
|
226
|
+
* @throws {@link Sync.ServiceUnavailableError}
|
|
227
|
+
*
|
|
228
|
+
* @example
|
|
229
|
+
* await client.generations.listCosts({
|
|
230
|
+
* startTime: "2026-11-12T00:00:00Z",
|
|
231
|
+
* endTime: "2026-11-13T00:00:00Z",
|
|
232
|
+
* limit: 500
|
|
233
|
+
* })
|
|
234
|
+
*/
|
|
235
|
+
listCosts(request, requestOptions) {
|
|
236
|
+
return core.HttpResponsePromise.fromPromise(this.__listCosts(request, requestOptions));
|
|
237
|
+
}
|
|
238
|
+
__listCosts(request, requestOptions) {
|
|
239
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
240
|
+
var _a, _b, _c;
|
|
241
|
+
const { startTime, endTime, limit, cursor } = request;
|
|
242
|
+
const _queryParams = {};
|
|
243
|
+
_queryParams["startTime"] = startTime;
|
|
244
|
+
_queryParams["endTime"] = endTime;
|
|
245
|
+
if (limit != null) {
|
|
246
|
+
_queryParams["limit"] = limit.toString();
|
|
247
|
+
}
|
|
248
|
+
if (cursor != null) {
|
|
249
|
+
_queryParams["cursor"] = cursor;
|
|
250
|
+
}
|
|
251
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
252
|
+
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, "/v2/usage/generations"),
|
|
253
|
+
method: "GET",
|
|
254
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.5.0", "User-Agent": "@sync.so/sdk/0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
255
|
+
contentType: "application/json",
|
|
256
|
+
queryParameters: _queryParams,
|
|
257
|
+
requestType: "json",
|
|
258
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
259
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
260
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
261
|
+
});
|
|
262
|
+
if (_response.ok) {
|
|
263
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
264
|
+
}
|
|
265
|
+
if (_response.error.reason === "status-code") {
|
|
266
|
+
switch (_response.error.statusCode) {
|
|
267
|
+
case 400:
|
|
268
|
+
throw new Sync.BadRequestError(_response.error.body, _response.rawResponse);
|
|
269
|
+
case 401:
|
|
270
|
+
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
271
|
+
case 503:
|
|
272
|
+
throw new Sync.ServiceUnavailableError(_response.error.body, _response.rawResponse);
|
|
273
|
+
default:
|
|
274
|
+
throw new errors.SyncError({
|
|
275
|
+
statusCode: _response.error.statusCode,
|
|
276
|
+
body: _response.error.body,
|
|
277
|
+
rawResponse: _response.rawResponse,
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
switch (_response.error.reason) {
|
|
282
|
+
case "non-json":
|
|
283
|
+
throw new errors.SyncError({
|
|
284
|
+
statusCode: _response.error.statusCode,
|
|
285
|
+
body: _response.error.rawBody,
|
|
286
|
+
rawResponse: _response.rawResponse,
|
|
287
|
+
});
|
|
288
|
+
case "timeout":
|
|
289
|
+
throw new errors.SyncTimeoutError("Timeout exceeded when calling GET /v2/usage/generations.");
|
|
290
|
+
case "unknown":
|
|
291
|
+
throw new errors.SyncError({
|
|
292
|
+
message: _response.error.errorMessage,
|
|
293
|
+
rawResponse: _response.rawResponse,
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Create a lip sync generation with `application/json` — provide each input by `url` or by `assetId` from an uploaded asset. For reusable or large local files, upload them first with POST /v2/assets/upload and pass the returned `assetId`; see [Asset Uploads](/docs/developer-guides/asset-uploads). Use the multipart "Create Generation with Files" form only when uploading direct audio, video, or image file fields; it has a 5 GiB per-file application parser limit, subject to your plan and any lower proxy limits. Nested fields such as input, options, segments, outputAudio, dubParams, and dialogueEdit must be JSON strings in multipart requests. If a `text` input requires speech synthesis and the ElevenLabs provider is temporarily unavailable, the request returns errorCode elevenlabs_service_unavailable: 504 for provider timeouts and 503 for other provider outages for unkeyed requests. Keyed uncertain outcomes return 503 IDEMPOTENCY_OUTCOME_UNKNOWN instead. An older dialogueEdit preview without segment lipsync and section expansion returns dialogue_edit_retime_required (422). Create a new preview from the same transcript and edits. A dialogueEdit that removes more speech than the surrounding footage can absorb returns errorCode dialogue_edit_removal_too_large (422). When the failing section can be identified, `dialogueEditSection` on the error names it; change it and create a new preview before submitting again. Retrying the same preview fails again. A video input `url` that links to a single TikTok, Instagram, Facebook, or YouTube video is imported first: the generation is created PENDING and starts once the video is downloaded, or ends FAILED with errorCode import_failed if the import fails. A linked audio input, or a linked video in a segments or dubbing request, returns 409 import_in_progress until its import finishes; send the same request (with the same Idempotency-Key, if any) again after Retry-After. Link imports can also return 403 import_not_enabled, 422 import_failed, 429 import_daily_limit_reached or concurrency_limit_reached, and 503 import_unavailable. See [Asset Uploads](/docs/developer-guides/asset-uploads#import-a-social-video-link). Send the optional Idempotency-Key header on the first request and reuse it with the same payload on retries. An accepted replay returns 200 with the original generation's current state and Idempotency-Replayed: true. A retry after that generation ended FAILED or REJECTED starts a new generation instead (201). An API-key request without the header that is identical to one your organization sent in the last 60 seconds returns 409 DUPLICATE_SUBMISSION with the original generationId; send a unique Idempotency-Key with each generation you intend. See [Idempotent Requests](/docs/api-reference/guides/idempotency) for key validation, conflicts, retention, duplicates, and uncertain-outcome recovery.
|
|
75
300
|
*
|
|
76
301
|
* @param {Sync.CreateGenerationJsonRequest} request
|
|
77
302
|
* @param {Generations.RequestOptions} requestOptions - Request-specific configuration.
|
|
78
303
|
*
|
|
79
304
|
* @throws {@link Sync.BadRequestError}
|
|
80
305
|
* @throws {@link Sync.UnauthorizedError}
|
|
306
|
+
* @throws {@link Sync.ForbiddenError}
|
|
81
307
|
* @throws {@link Sync.UnprocessableEntityError}
|
|
82
308
|
* @throws {@link Sync.ConflictError}
|
|
83
309
|
* @throws {@link Sync.GenerationDeletedError}
|
|
@@ -136,7 +362,7 @@ class Generations {
|
|
|
136
362
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
137
363
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, "/v2/generate"),
|
|
138
364
|
method: "POST",
|
|
139
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
365
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.5.0", "User-Agent": "@sync.so/sdk/0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "Idempotency-Key": idempotencyKey != null ? idempotencyKey : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
140
366
|
contentType: "application/json",
|
|
141
367
|
requestType: "json",
|
|
142
368
|
body: _body,
|
|
@@ -153,6 +379,8 @@ class Generations {
|
|
|
153
379
|
throw new Sync.BadRequestError(_response.error.body, _response.rawResponse);
|
|
154
380
|
case 401:
|
|
155
381
|
throw new Sync.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
382
|
+
case 403:
|
|
383
|
+
throw new Sync.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
156
384
|
case 422:
|
|
157
385
|
throw new Sync.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
158
386
|
case 409:
|
|
@@ -193,7 +421,7 @@ class Generations {
|
|
|
193
421
|
});
|
|
194
422
|
}
|
|
195
423
|
/**
|
|
196
|
-
* The multipart/form-data form of `POST /v2/generate` — the same endpoint as "Create Generation", for uploading local files directly instead of passing URLs. Send each file under a field named for its type (`video`, `image`, `audio`), at most one of each. The application parser allows up to 5 GiB (5 × 1024³ bytes) per file, 3 files, 32 fields, 35 total parts, and 1 MiB per field. A file over the parser limit returns 413 generation_input_validation_failed, and a file over your plan limit returns 422 file_size_exceeds_plan_limit. Proxy limits may be lower; this ceiling does not guarantee a 5 GiB direct transfer. Each file is saved as an asset in your organization and passed to the generation by `assetId`. For large files, upload via POST /v2/assets/upload first and pass the `assetId`, so retries don't resend the file. Nested fields such as `input`, `options`, `segments`, `outputAudio`, `dubParams`, and `dialogueEdit` must be sent as JSON strings in multipart requests. Image inputs are sync-3 only. If a `text` input requires speech synthesis and the ElevenLabs provider is temporarily unavailable, the request returns errorCode elevenlabs_service_unavailable: 504 for provider timeouts and 503 for other provider outages for unkeyed requests. Keyed uncertain outcomes return 503 IDEMPOTENCY_OUTCOME_UNKNOWN instead. An
|
|
424
|
+
* The multipart/form-data form of `POST /v2/generate` — the same endpoint as "Create Generation", for uploading local files directly instead of passing URLs. Send each file under a field named for its type (`video`, `image`, `audio`), at most one of each. The application parser allows up to 5 GiB (5 × 1024³ bytes) per file, 3 files, 32 fields, 35 total parts, and 1 MiB per field. A file over the parser limit returns 413 generation_input_validation_failed, and a file over your plan limit returns 422 file_size_exceeds_plan_limit. A malformed or truncated multipart body, an unsupported file field, or too many fields or parts returns 400 generation_input_validation_failed. Let your HTTP client build the multipart boundaries and send only the documented fields. Proxy limits may be lower; this ceiling does not guarantee a 5 GiB direct transfer. Each file is saved as an asset in your organization and passed to the generation by `assetId`. For large files, upload via POST /v2/assets/upload first and pass the `assetId`, so retries don't resend the file. Nested fields such as `input`, `options`, `segments`, `outputAudio`, `dubParams`, and `dialogueEdit` must be sent as JSON strings in multipart requests. Image inputs are sync-3 only. If a `text` input requires speech synthesis and the ElevenLabs provider is temporarily unavailable, the request returns errorCode elevenlabs_service_unavailable: 504 for provider timeouts and 503 for other provider outages for unkeyed requests. Keyed uncertain outcomes return 503 IDEMPOTENCY_OUTCOME_UNKNOWN instead. An older dialogueEdit preview without segment lipsync and section expansion returns dialogue_edit_retime_required (422). Create a new preview from the same transcript and edits. A dialogueEdit that removes more speech than the surrounding footage can absorb returns errorCode dialogue_edit_removal_too_large (422). When the failing section can be identified, `dialogueEditSection` on the error names it; change it and create a new preview before submitting again. Retrying the same preview fails again. Send the optional Idempotency-Key header on the first request and reuse it with the same payload on retries. An accepted replay returns 200 with the original generation's current state and Idempotency-Replayed: true. A retry after that generation ended FAILED or REJECTED starts a new generation instead (201). An API-key request without the header that is identical to one your organization sent in the last 60 seconds returns 409 DUPLICATE_SUBMISSION with the original generationId; send a unique Idempotency-Key with each generation you intend. See [Idempotent Requests](/docs/api-reference/guides/idempotency) for key validation, conflicts, retention, duplicates, and uncertain-outcome recovery.
|
|
197
425
|
*
|
|
198
426
|
* @param {File | fs.ReadStream | Blob | undefined} video
|
|
199
427
|
* @param {File | fs.ReadStream | Blob | undefined} image
|
|
@@ -269,7 +497,7 @@ class Generations {
|
|
|
269
497
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
270
498
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, "/v2/generate"),
|
|
271
499
|
method: "POST",
|
|
272
|
-
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
500
|
+
headers: Object.assign(Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.5.0", "User-Agent": "@sync.so/sdk/0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), _maybeEncodedRequest.headers), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
273
501
|
requestType: "file",
|
|
274
502
|
duplex: _maybeEncodedRequest.duplex,
|
|
275
503
|
body: _maybeEncodedRequest.body,
|
|
@@ -361,7 +589,7 @@ class Generations {
|
|
|
361
589
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
362
590
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, `/v2/generate/${encodeURIComponent(id)}`),
|
|
363
591
|
method: "GET",
|
|
364
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
592
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.5.0", "User-Agent": "@sync.so/sdk/0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
365
593
|
contentType: "application/json",
|
|
366
594
|
queryParameters: _queryParams,
|
|
367
595
|
requestType: "json",
|
|
@@ -428,18 +656,12 @@ class Generations {
|
|
|
428
656
|
* as v2 Creator and v3 Starter or higher) receive the clean output when
|
|
429
657
|
* available. Historical outputs can have the watermark burned in, so an
|
|
430
658
|
* upgrade does not guarantee every old output becomes watermark-free.
|
|
431
|
-
*
|
|
432
|
-
* If no watermarked derivative exists, the resolver retains its existing
|
|
433
|
-
* fallback to the original output; changing plans does not rewrite files.
|
|
659
|
+
* Changing plans does not rewrite historical files.
|
|
434
660
|
* This endpoint does not generate a new render or remove burned-in watermarks.
|
|
435
661
|
*
|
|
436
|
-
* Signed
|
|
437
|
-
*
|
|
438
|
-
*
|
|
439
|
-
* output is still available. The selected S3 file is checked before
|
|
440
|
-
* signing; a successful response does not guarantee future availability.
|
|
441
|
-
* Older URL-only records return their stored URL unchanged, without
|
|
442
|
-
* checking its availability or extending its original expiration.
|
|
662
|
+
* Signed URLs can expire or become unavailable before their nominal
|
|
663
|
+
* validity. Request this endpoint again for a fresh URL while the output
|
|
664
|
+
* is still available.
|
|
443
665
|
* These URLs are download credentials: keep them private.
|
|
444
666
|
*
|
|
445
667
|
* Errors use the standard JSON error body and stable `errorCode`:
|
|
@@ -452,7 +674,7 @@ class Generations {
|
|
|
452
674
|
* | 404 | `generation_output_unavailable` | No eligible output reference or the selected file is missing; contact support. |
|
|
453
675
|
* | 409 | `generation_not_ready` | Pending or processing; poll Get Generation until COMPLETED. |
|
|
454
676
|
* | 422 | `generation_not_downloadable` | Failed or rejected; inspect the generation error. |
|
|
455
|
-
* | 503 | `generation_download_unavailable` |
|
|
677
|
+
* | 503 | `generation_download_unavailable` | The download URL could not be prepared; retry with backoff. |
|
|
456
678
|
*
|
|
457
679
|
* Authentication also returns 422 for draft organizations. Requesting a
|
|
458
680
|
* download URL does not create a project, incur a generation charge, or
|
|
@@ -486,7 +708,7 @@ class Generations {
|
|
|
486
708
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
487
709
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, `/v2/generations/${encodeURIComponent(id)}/download`),
|
|
488
710
|
method: "GET",
|
|
489
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
711
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.5.0", "User-Agent": "@sync.so/sdk/0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version, "x-sync-accelerate": xSyncAccelerate != null ? xSyncAccelerate : undefined }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
490
712
|
contentType: "application/json",
|
|
491
713
|
queryParameters: _queryParams,
|
|
492
714
|
requestType: "json",
|
|
@@ -538,6 +760,8 @@ class Generations {
|
|
|
538
760
|
});
|
|
539
761
|
}
|
|
540
762
|
/**
|
|
763
|
+
* list sync. labs generations and filter jobs by status or generation id. review authentication, request parameters, response objects, and api errors.
|
|
764
|
+
*
|
|
541
765
|
* @param {Sync.ListGenerationsRequest} request
|
|
542
766
|
* @param {Generations.RequestOptions} requestOptions - Request-specific configuration.
|
|
543
767
|
*
|
|
@@ -577,7 +801,7 @@ class Generations {
|
|
|
577
801
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
578
802
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, "/v2/generations"),
|
|
579
803
|
method: "GET",
|
|
580
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
804
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.5.0", "User-Agent": "@sync.so/sdk/0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
581
805
|
contentType: "application/json",
|
|
582
806
|
queryParameters: _queryParams,
|
|
583
807
|
requestType: "json",
|
|
@@ -650,7 +874,7 @@ class Generations {
|
|
|
650
874
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
651
875
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, "/v2/generations/estimate"),
|
|
652
876
|
method: "POST",
|
|
653
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
877
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.5.0", "User-Agent": "@sync.so/sdk/0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
654
878
|
contentType: "application/json",
|
|
655
879
|
requestType: "json",
|
|
656
880
|
body: request,
|
|
@@ -719,7 +943,7 @@ class Generations {
|
|
|
719
943
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
720
944
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.SyncEnvironment.Default, `/v2/generations/${encodeURIComponent(id)}`),
|
|
721
945
|
method: "DELETE",
|
|
722
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.
|
|
946
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@sync.so/sdk", "X-Fern-SDK-Version": "0.5.0", "User-Agent": "@sync.so/sdk/0.5.0", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
723
947
|
contentType: "application/json",
|
|
724
948
|
requestType: "json",
|
|
725
949
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Sync from "../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {}
|
|
8
|
+
*/
|
|
9
|
+
export interface CountGenerationsRequest {
|
|
10
|
+
/**
|
|
11
|
+
* Filter by status, as a comma-separated list or repeated values.
|
|
12
|
+
*/
|
|
13
|
+
status?: Sync.GenerationStatus[];
|
|
14
|
+
/**
|
|
15
|
+
* Filter by Studio (playground) or API generations.
|
|
16
|
+
*/
|
|
17
|
+
type?: Sync.GenerationCountType;
|
|
18
|
+
/**
|
|
19
|
+
* Filter by source label, as a comma-separated list or repeated values.
|
|
20
|
+
*/
|
|
21
|
+
source?: string[];
|
|
22
|
+
/**
|
|
23
|
+
* Filter by product surface. Older generations without a recorded surface are excluded when this filter is set.
|
|
24
|
+
*/
|
|
25
|
+
generationSource?: Sync.GenerationSource;
|
|
26
|
+
/**
|
|
27
|
+
* Count only generations owned by the current user. Defaults to false.
|
|
28
|
+
*/
|
|
29
|
+
currentUserOnly?: boolean;
|
|
30
|
+
}
|