Skip to content

feat:Overhaul ElevenLabs dubbing API spec: new POST and endpoint updates#77

Merged
HavenDV merged 1 commit intomainfrom
bot/update-openapi_202504140921
Apr 14, 2025
Merged

feat:Overhaul ElevenLabs dubbing API spec: new POST and endpoint updates#77
HavenDV merged 1 commit intomainfrom
bot/update-openapi_202504140921

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Apr 14, 2025

Summary by CodeRabbit

  • New Features

    • Added a new endpoint to process dubbing of audio and video files using modern request formats.
    • Enabled the removal of dubbing projects and enhanced language management for media.
  • Improvements

    • Updated and streamlined existing endpoints for content retrieval and segment modifications.
    • Introduced refined response messaging and error handling for a smoother user experience.

@coderabbitai
Copy link

coderabbitai bot commented Apr 14, 2025

Walkthrough

The OpenAPI specification for the ElevenLabs dubbing API has been overhauled. A new POST endpoint /v1/dubbing now accepts multipart/form-data for audio/video dubbing, replacing the obsolete GET endpoint. Multiple endpoints have been restructured and updated, including those for retrieving dubbed content, adding languages, modifying segments, and handling transcription, translation, deletion, and rendering. Response schemas, operation IDs, and error handling have also been revised to improve clarity and functionality.

Changes

File(s) Changed Summary of Changes
src/libs/ElevenLabs/openapi.yaml - Removed /v1/dubbing/resource/{dubbing_id}; added new POST /v1/dubbing for dubbing requests.
- Updated GET, POST, DELETE, and PATCH endpoints for resource management (language addition, dubbing, transcription, translation, segment modification, rendering).
- Revised response schemas and error codes.

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
Loading
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
Loading

Suggested reviewers

  • github-actions

Poem

In a meadow of code, I hop with glee,
New endpoints bloom, wild and free.
A POST here, a PATCH there, so spry,
APIs sing under the open sky.
With each change, my bunny heart does soar!
🐇🌸


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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@HavenDV HavenDV merged commit 54684fe into main Apr 14, 2025
3 of 4 checks passed
@HavenDV HavenDV deleted the bot/update-openapi_202504140921 branch April 14, 2025 09:22
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Overhaul ElevenLabs dubbing API spec: new POST and endpoint updates Apr 14, 2025
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
src/libs/ElevenLabs/openapi.yaml (2)

3883-3905: Subtitle Format Query Parameter
Adding the format_type query parameter—with allowed values of srt and webvtt and a default value of srt—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 as BatchCallResponse, BatchCallStatus, and Body_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

📥 Commits

Reviewing files that changed from the base of the PR and between 3215aa8 and 4318aac.

⛔ Files ignored due to path filters (40)
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.BatchCallResponse.Json.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.BatchCallResponse.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.BatchCallStatus.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.BodySubmitABatchCallRequestV1ConvaiBatchCallingSubmitPost.Json.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.BodySubmitABatchCallRequestV1ConvaiBatchCallingSubmitPost.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallClientDetails.Json.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallClientDetails.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallClientDetailsType.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallCommonModel.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallCommonModelToolDetailsDiscriminator.Json.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallCommonModelToolDetailsDiscriminator.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallCommonModelToolDetailsDiscriminatorType.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallWebhookDetails.Json.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallWebhookDetails.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallWebhookDetailsHeaders.Json.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallWebhookDetailsHeaders.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallWebhookDetailsPathParams.Json.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallWebhookDetailsPathParams.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallWebhookDetailsQueryParams.Json.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallWebhookDetailsQueryParams.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.ConversationHistoryTranscriptToolCallWebhookDetailsType.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.OutboundCallRecipient.Json.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.OutboundCallRecipient.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.SampleResponseModel.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.ToolDetails.Json.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.ToolDetails.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.WorkspaceBatchCallsResponse.Json.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.WorkspaceBatchCallsResponse.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/ElevenLabs.Models.WorkspaceResourceType.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/JsonConverters.BatchCallStatus.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/JsonConverters.BatchCallStatusNullable.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/JsonConverters.ConversationHistoryTranscriptToolCallClientDetailsType.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/JsonConverters.ConversationHistoryTranscriptToolCallClientDetailsTypeNullable.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/JsonConverters.ConversationHistoryTranscriptToolCallCommonModelToolDetailsDiscriminatorType.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/JsonConverters.ConversationHistoryTranscriptToolCallCommonModelToolDetailsDiscriminatorTypeNullable.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/JsonConverters.ConversationHistoryTranscriptToolCallWebhookDetailsType.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/JsonConverters.ConversationHistoryTranscriptToolCallWebhookDetailsTypeNullable.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/JsonConverters.ToolDetails.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/JsonSerializerContext.g.cs is excluded by !**/generated/**
  • src/libs/ElevenLabs/Generated/JsonSerializerContextTypes.g.cs is 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/dubbing POST endpoint to handle audio/video dubbing requests is well structured. The operation ID Dub_a_video_or_an_audio_file_v1_dubbing_post and concise summary accurately communicate its intent.


3697-3727: Multipart Request Handling and GET Endpoint Update
The incorporation of a requestBody for multipart/form-data—with its schema reference to Body_Dub_a_video_or_an_audio_file_v1_dubbing_post—ensures proper handling of file uploads. Additionally, the detailed parameter descriptions, including the optional xi-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 via DubbingMetadataResponse and uses the x-fern-sdk-method-name get_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 ID get_dubbed_file_v1_dubbing__dubbing_id__audio__language_code__get adheres to the project’s naming conventions.


3810-3821: Path Parameter for Language Code
The explicit definition of the language_code parameter—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 the DubbingResource schema, and the subsequent POST endpoint for adding a language is clearly detailed—with the new operation ID Add_a_language_to_the_resource_v1_dubbing_resource__dubbing_id__language_post. Please ensure that the LanguageAddedResponse schema 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 using SegmentCreatePayload and SegmentCreateResponse are clear, aiding consistent client integration.


4056-4069: Detailed Parameter Addition for Segment Creation
Including a robust definition for the speaker_id parameter—with proper schema validation and detailed description—ensures precise identification within the endpoint. This works seamlessly alongside the existing dubbing_id and xi-api-key parameters.


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 (using SegmentCreatePayload/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 as dubbing_id, segment_id, and language—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 (referencing SegmentUpdatePayload) 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 like SegmentDeleteResponse and SegmentTranscriptionResponse) 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 (using SegmentTranslationResponse). 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 (referencing Body_Dubs_all_or_some_segments_and_languages_v1_dubbing_resource__dubbing_id__dub_post) and an expected response (SegmentDubResponse). The operation ID dub_segments succinctly 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 the language parameter (“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 the DubbingRenderResponseModel. Error handling is consistent with other endpoints.


9868-9902: Schema Enhancements for Batch Calls and Audio Conversion
Updates to component definitions—including those under Body_Submit_a_batch_call_request__v1_convai_batch_calling_submit_post and array constraints like maxItems: 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 for ConversationHistoryTranscriptToolCallClientDetails now requires a parameters property and sets a default type of client. This level of detail supports better client-side processing and validation.


11379-11394: Discriminator Setup for Transcript Tool Call Details
The addition of the ConversationHistoryTranscriptToolCallWebhookDetails schema and the implementation of a discriminator on tool_details effectively 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 for OutboundCallRecipient and PatchConvAISettingsRequest are 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 like trim_start, trim_end, and speaker_separation are 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
The WorkspaceBatchCallsResponse schema now includes pagination-related properties (next_doc and has_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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant