feat:Update OpenAPI spec with streaming endpoint and new optional fields#135
feat:Update OpenAPI spec with streaming endpoint and new optional fields#135
Conversation
WalkthroughThe OpenAPI specification for the ElevenLabs API was updated to add a streaming endpoint for voice previews, clarify the behavior of the batch call retry endpoint, and introduce new optional fields for podcast creation and voice design requests. These changes expand API capabilities and refine request and response models. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant API
participant VoiceEngine
Client->>API: GET /v1/text-to-voice/{generated_voice_id}/stream
API->>VoiceEngine: Request streaming audio for generated_voice_id
VoiceEngine-->>API: Stream audio/mpeg data
API-->>Client: Stream audio/mpeg data
Poem
✨ Finishing Touches🧪 Generate unit tests
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:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. 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: 1
♻️ Duplicate comments (1)
src/libs/ElevenLabs/openapi.yaml (1)
12235-12255: See earlier comment: DRY out repeated properties
Same three properties duplicated here. Please factor them out into a common component to avoid divergence in future edits.
🧹 Nitpick comments (3)
src/libs/ElevenLabs/openapi.yaml (3)
1486-1488: Fix grammatical typo in endpoint description
Small copy-editing nit: “Stream a the voice preview” → “Stream the voice preview”.- description: Stream a the voice preview for a generated voice as it is being generated. + description: Stream the voice preview for a generated voice as it is being generated.
1510-1515: Consider hinting streaming semantics in the media-type
For long-lived byte streams many clients leveragetext/event-streamor settransfer-encoding: chunked. You already mark the operation withx-fern-streaming: true; consider also addingheaders: Transfer-Encoding: schema: type: string enum: [chunked]or a vendor extension such as
x-streaming-media: trueto improve SDK generation & docs clarity.
9095-9095: Minor wording tweak for clarity
“calling failed and no-response recipients again” → “calling recipients that failed or had no response again”.- description: 'Retry a batch call, calling failed and no-response recipients again.' + description: 'Retry a batch call, calling recipients that failed or had no response again.'
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (11)
src/libs/ElevenLabs/Generated/ElevenLabs.ConversationalAIClient.CreateConvaiBatchCallingByBatchIdRetry.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.IConversationalAIClient.CreateConvaiBatchCallingByBatchIdRetry.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.IStudioClient.CreateStudioPodcasts.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.ITextToVoiceClient.CreateTextToVoiceDesign.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.ITextToVoiceClient.GetTextToVoiceByGeneratedVoiceIdStream.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.BodyCreatePodcastV1ProjectsPodcastCreatePost.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.BodyCreatePodcastV1StudioPodcastsPost.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.Models.VoiceDesignRequestModel.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.StudioClient.CreateStudioPodcasts.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.TextToVoiceClient.CreateTextToVoiceDesign.g.csis excluded by!**/generated/**src/libs/ElevenLabs/Generated/ElevenLabs.TextToVoiceClient.GetTextToVoiceByGeneratedVoiceIdStream.g.csis excluded by!**/generated/**
📒 Files selected for processing (1)
src/libs/ElevenLabs/openapi.yaml(5 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Test / Build, test and publish
🔇 Additional comments (2)
src/libs/ElevenLabs/openapi.yaml (2)
1499-1507: Declare header requirement explicitly for consistency
Most paths in this spec markxi-api-keyas eitherrequired: trueornullable: trueandrequired: false.
Here onlynullableis set. Tools that rely on therequiredflag (e.g. strict generators, request validators) will treat this header as optional, which may not match server behaviour.If the key is mandatory (as the description suggests), add
required: true; if optional, keepnullable: trueand addrequired: falsefor clarity.
23581-23586: Validate property interaction & naming
stream_previewstoggles preview inclusion; ensure no existing flag (e.g.include_previews,return_previews) already covers this to avoid API confusion. Also verify server honours the defaultfalse.
| intro: | ||
| title: Intro | ||
| maxLength: 1500 | ||
| type: string | ||
| description: The intro text that will always be added to the beginning of the podcast. | ||
| nullable: true | ||
| example: Welcome to the podcast. | ||
| outro: | ||
| title: Outro | ||
| maxLength: 1500 | ||
| type: string | ||
| description: The outro text that will always be added to the end of the podcast. | ||
| nullable: true | ||
| example: Thank you for listening! | ||
| instructions_prompt: | ||
| title: Instructions Prompt | ||
| maxLength: 3000 | ||
| type: string | ||
| description: Additional instructions prompt for the podcast generation used to adjust the podcast's style and tone. | ||
| nullable: true | ||
| example: 'Ensure the podcast remains factual, accurate and appropriate for all audiences.' |
There was a problem hiding this comment.
🛠️ Refactor suggestion
Duplicate field definitions – extract a shared component
intro, outro, and instructions_prompt are introduced here and re-defined verbatim in the next schema (lines 12235-12255). Keeping two copies invites drift.
Create a small reusable schema – e.g. PodcastIntroOutro – and $ref it from both request bodies.
🤖 Prompt for AI Agents
In src/libs/ElevenLabs/openapi.yaml around lines 12128 to 12148, the fields
intro, outro, and instructions_prompt are duplicated verbatim in another schema
at lines 12235-12255. To fix this, create a reusable schema component named
PodcastIntroOutro that includes these three fields, then replace the inline
definitions in both request bodies with a $ref to this new component to avoid
duplication and potential drift.
Summary by CodeRabbit
New Features
Improvements