feat:Overhaul ElevenLabs dubbing API spec: new POST and endpoint updates#77
feat:Overhaul ElevenLabs dubbing API spec: new POST and endpoint updates#77
Conversation
WalkthroughThe OpenAPI specification for the ElevenLabs dubbing API has been overhauled. A new POST endpoint Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant API
participant DubbingService
Client->>API: POST /v1/dubbing (multipart/form-data)
API->>DubbingService: Process dubbing request
DubbingService-->>API: DoDubbingResponseModel
API-->>Client: Return response with status/error codes
sequenceDiagram
participant Client
participant API
participant LanguageService
Client->>API: POST /v1/dubbing/resource/{dubbing_id}/language
API->>LanguageService: Add language to dubbing resource
LanguageService-->>API: DubbingMetadataResponse
API-->>Client: Return response confirming language addition
Suggested reviewers
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/libs/ElevenLabs/openapi.yaml (2)
3883-3905: Subtitle Format Query Parameter
Adding theformat_typequery parameter—with allowed values ofsrtandwebvttand a default value ofsrt—is a thoughtful enhancement that standardizes subtitle output. Consider refining the repetitive description for brevity.
8038-8100: Addition of New Component Schemas
Several new component schemas, such asBatchCallResponse,BatchCallStatus, andBody_Add_a_language_to_the_resource_v1_dubbing_resource__dubbing_id__language_post, have been introduced. Please ensure these components integrate seamlessly with the rest of the API and adhere to the established naming conventions.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (40)
src/libs/ElevenLabs/Generated/ElevenLabs.Models.BatchCallResponse.Json.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.BatchCallResponse.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.BatchCallStatus.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.BodySubmitABatchCallRequestV1ConvaiBatchCallingSubmitPost.Json.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.BodySubmitABatchCallRequestV1ConvaiBatchCallingSubmitPost.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallClientDetails.Json.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallClientDetails.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallClientDetailsType.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallCommonModel.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallCommonModelToolDetailsDiscriminator.Json.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallCommonModelToolDetailsDiscriminator.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallCommonModelToolDetailsDiscriminatorType.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallWebhookDetails.Json.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallWebhookDetails.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallWebhookDetailsHeaders.Json.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallWebhookDetailsHeaders.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallWebhookDetailsPathParams.Json.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallWebhookDetailsPathParams.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallWebhookDetailsQueryParams.Json.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallWebhookDetailsQueryParams.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallWebhookDetailsType.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.OutboundCallRecipient.Json.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.OutboundCallRecipient.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.SampleResponseModel.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.ToolDetails.Json.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.ToolDetails.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.WorkspaceBatchCallsResponse.Json.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.WorkspaceBatchCallsResponse.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.WorkspaceResourceType.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/JsonConverters.BatchCallStatus.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/JsonConverters.BatchCallStatusNullable.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/JsonConverters.ConversationHistoryTranscriptToolCallClientDetailsType.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/JsonConverters.ConversationHistoryTranscriptToolCallClientDetailsTypeNullable.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/JsonConverters.ConversationHistoryTranscriptToolCallCommonModelToolDetailsDiscriminatorType.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/JsonConverters.ConversationHistoryTranscriptToolCallCommonModelToolDetailsDiscriminatorTypeNullable.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/JsonConverters.ConversationHistoryTranscriptToolCallWebhookDetailsType.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/JsonConverters.ConversationHistoryTranscriptToolCallWebhookDetailsTypeNullable.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/JsonConverters.ToolDetails.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/JsonSerializerContext.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/JsonSerializerContextTypes.g.csis excluded by!**/generated/**
📒 Files selected for processing (1)
src/libs/ElevenLabs/openapi.yaml(28 hunks)
🔇 Additional comments (26)
src/libs/ElevenLabs/openapi.yaml (26)
3681-3694: New POST Endpoint for Dubbing
The addition of the/v1/dubbingPOST endpoint to handle audio/video dubbing requests is well structured. The operation IDDub_a_video_or_an_audio_file_v1_dubbing_postand concise summary accurately communicate its intent.
3697-3727: Multipart Request Handling and GET Endpoint Update
The incorporation of arequestBodyfor multipart/form-data—with its schema reference toBody_Dub_a_video_or_an_audio_file_v1_dubbing_post—ensures proper handling of file uploads. Additionally, the detailed parameter descriptions, including the optionalxi-api-key, enhance clarity. Please verify that the referenced schema is defined as expected.
3741-3767: Enhanced Metadata Retrieval and Deletion Endpoint
The GET endpoint revision now returns metadata viaDubbingMetadataResponseand uses thex-fern-sdk-method-nameget_dubbing_project_metadata. The addition of a DELETE operation for dubbing projects is clear and consistent in style. It is advisable to double-check that appropriate permission checks are in place for delete operations.
3779-3806: Dubbed File Streaming Endpoint Update
The update to the/v1/dubbing/{dubbing_id}/audio/{language_code}GET endpoint provides a clear summary and proper binary response formats (audio in MP3 and video in MP4). The operation IDget_dubbed_file_v1_dubbing__dubbing_id__audio__language_code__getadheres to the project’s naming conventions.
3810-3821: Path Parameter for Language Code
The explicit definition of thelanguage_codeparameter—with its detailed title, type, and description—adds valuable clarity. This should help clients provide valid language codes consistently.
3826-3879: Transcript Retrieval Endpoint Enhancements
The GET endpoint for/v1/dubbing/{dubbing_id}/transcript/{language_code}now supports multiple content types and provides clear examples for error cases such as permission issues and a “dubbing not ready” status. The updated operation ID and comprehensive response definitions improve client handling of transcripts.
3916-3951: Robust Response Definitions for Transcript
The expanded response block covering both JSON and plain text (with detailed error examples for codes like 403, 404, and 425) offers precise guidance for client-side error handling. This thoroughness is highly commendable.
3976-4005: Resource Retrieval and Language Addition
The GET endpoint at/v1/dubbing/resource/{dubbing_id}now returns a response conforming to theDubbingResourceschema, and the subsequent POST endpoint for adding a language is clearly detailed—with the new operation IDAdd_a_language_to_the_resource_v1_dubbing_resource__dubbing_id__language_post. Please ensure that theLanguageAddedResponseschema appropriately reflects the API’s requirements.
4021-4052: Segment Creation for Speaker
The introduction of the POST endpoint for creating a segment for a speaker (under/v1/dubbing/resource/{dubbing_id}/speaker/{speaker_id}/segment) is well articulated. Request and response definitions usingSegmentCreatePayloadandSegmentCreateResponseare clear, aiding consistent client integration.
4056-4069: Detailed Parameter Addition for Segment Creation
Including a robust definition for thespeaker_idparameter—with proper schema validation and detailed description—ensures precise identification within the endpoint. This works seamlessly alongside the existingdubbing_idandxi-api-keyparameters.
4076-4107: Combined Definition for Segment Creation and Modification
This hunk not only details the request payload for creating a segment but also introduces the PATCH endpoint for modifying a segment's specific language. The separation between creation (usingSegmentCreatePayload/SegmentCreateResponse) and modification (with its own operation ID) is clear and maintains consistency.
4111-4132: Comprehensive Parameter Definitions for Segment Modification
The PATCH endpoint now explicitly defines all necessary parameters—such asdubbing_id,segment_id, andlanguage—with detailed schemas. This ensures that update operations can be performed precisely and predictably by client applications.
4139-4159: Patch Request and Deletion Endpoint for Segments
The definitions for modifying a segment, including the requestBody (referencingSegmentUpdatePayload) and expected response (SegmentUpdateResponse), are thorough. The subsequent DELETE operation for segments is also clearly described, maintaining consistent error handling practices.
4190-4217: Segment Deletion and Transcription Endpoints
The DELETE operation to remove a segment and the POST endpoint to trigger transcription (with response schemas likeSegmentDeleteResponseandSegmentTranscriptionResponse) are well integrated. Please verify that all necessary error scenarios are addressed uniformly.
4231-4255: Transcribe Segments Endpoint
The new endpoint for transcribing segments is carefully defined with a required requestBody schema and consistent success/error responses. The naming convention (transcribe_segments) aligns with the rest of the API, promoting intuitive usage.
4278-4313: Translation and Dub Endpoints Integration
The POST endpoint for translating segments now includes a detailed requestBody and response structure (usingSegmentTranslationResponse). The immediate follow-up with the dubs endpoint is logically sequenced. Ensure that the input validation for the dubs operation meets overall API standards.
4325-4349: Dubs All or Some Segments Endpoint
The dubs endpoint is now clearly defined with an explicit requestBody (referencingBody_Dubs_all_or_some_segments_and_languages_v1_dubbing_resource__dubbing_id__dub_post) and an expected response (SegmentDubResponse). The operation IDdub_segmentssuccinctly expresses its purpose.
4364-4377: Rendering Endpoint Parameters
The parameter definitions for the render endpoint (/v1/dubbing/resource/{dubbing_id}/render/{language}) are clear and concise. The explicit description for thelanguageparameter (“Render this language”) eliminates ambiguity.
4380-4404: Render Audio/Video Endpoint Details
This endpoint now specifies its requestBody via the appropriate schema (Body_Render_audio_or_video_for_the_given_language_v1_dubbing_resource__dubbing_id__render__language__post) and returns a response in line with theDubbingRenderResponseModel. Error handling is consistent with other endpoints.
9868-9902: Schema Enhancements for Batch Calls and Audio Conversion
Updates to component definitions—including those underBody_Submit_a_batch_call_request__v1_convai_batch_calling_submit_postand array constraints likemaxItems: 10000—appear robust. It is recommended to review these constraints to ensure they align with real-world usage scenarios.
11339-11357: Conversation History Transcript Tool - Client Details
The updated schema forConversationHistoryTranscriptToolCallClientDetailsnow requires aparametersproperty and sets a defaulttypeofclient. This level of detail supports better client-side processing and validation.
11379-11394: Discriminator Setup for Transcript Tool Call Details
The addition of theConversationHistoryTranscriptToolCallWebhookDetailsschema and the implementation of a discriminator ontool_detailseffectively differentiates between client and webhook details. This polymorphic approach is strong and should improve API clarity.
14543-14557: Outbound Call Recipient and Settings Patch Schemas
The new definitions forOutboundCallRecipientandPatchConvAISettingsRequestare straightforward and integrate well with the existing component structure. Ensure that any required properties are correctly enforced in downstream processing.
16185-16198: Audio/Video Trimming and Speaker Separation Updates
Updates to properties liketrim_start,trim_end, andspeaker_separationare clear, with appropriate type definitions and nullable options. The provided example further clarifies how these fields are intended to be used.
18944-18968: Workspace Batch Calls Pagination Schema
TheWorkspaceBatchCallsResponseschema now includes pagination-related properties (next_docandhas_more), which supports scalable data retrieval. The descriptions and default values are well defined.
19008-19014: Resource Types Description Update
The clarifications in the resource types section—ensuring that shared resource names match collection names—improve consistency. Verify that these changes are uniformly reflected throughout the documentation and implementation.
Summary by CodeRabbit
New Features
Improvements