From a5281d4884857ebf3a28a9bdc7454eb492eda48b Mon Sep 17 00:00:00 2001
From: fern-api <115122769+fern-api[bot]@users.noreply.github.com>
Date: Mon, 30 Jun 2025 10:35:37 +0000
Subject: [PATCH] SDK regeneration
---
pyproject.toml | 2 +-
reference.md | 318 +++----------
src/elevenlabs/__init__.py | 18 +-
src/elevenlabs/base_client.py | 9 +-
src/elevenlabs/conversational_ai/client.py | 10 +-
.../knowledge_base/documents/client.py | 20 +-
.../knowledge_base/documents/raw_client.py | 22 +-
.../phone_numbers/raw_client.py | 4 +-
.../conversational_ai/raw_client.py | 12 +
src/elevenlabs/core/client_wrapper.py | 4 +-
src/elevenlabs/environment.py | 4 +
src/elevenlabs/errors/bad_request_error.py | 3 +-
src/elevenlabs/history/raw_client.py | 9 +-
.../pronunciation_dictionaries/raw_client.py | 8 +-
src/elevenlabs/speech_to_text/client.py | 10 +
src/elevenlabs/speech_to_text/raw_client.py | 10 +
src/elevenlabs/studio/projects/client.py | 14 +-
.../studio/projects/content/client.py | 20 +
.../studio/projects/content/raw_client.py | 20 +
src/elevenlabs/studio/projects/raw_client.py | 14 +-
.../projects_create_request_source_type.py | 2 +-
src/elevenlabs/types/__init__.py | 20 +-
src/elevenlabs/types/add_project_request.py | 7 +-
...se_model.py => auth_connection_locator.py} | 12 +-
...audio_get.py => bad_request_error_body.py} | 8 +-
...oject_v_1_projects_add_post_source_type.py | 2 +-
...nt_v_1_projects_project_id_content_post.py | 10 +
src/elevenlabs/types/breakdown_types.py | 2 +
src/elevenlabs/types/built_in_tools_input.py | 5 +
src/elevenlabs/types/built_in_tools_output.py | 5 +
src/elevenlabs/types/chapter_response.py | 5 +
.../chapter_with_content_response_model.py | 5 +
src/elevenlabs/types/metric_type.py | 5 +-
...onse_model.py => play_dtmf_tool_config.py} | 9 +-
.../types/project_extended_response.py | 4 +-
...ect_extended_response_model_source_type.py | 4 +-
.../project_response_model_source_type.py | 2 +-
.../types/system_tool_config_input_params.py | 14 +
.../types/system_tool_config_output_params.py | 14 +
.../webhook_tool_api_schema_config_input.py | 6 +
.../webhook_tool_api_schema_config_output.py | 6 +
.../types/workspace_group_permission.py | 25 -
.../types/workspace_resource_type.py | 1 +
.../voices/pvc/samples/audio/client.py | 30 +-
.../voices/pvc/samples/audio/raw_client.py | 26 +-
src/elevenlabs/workspace/client.py | 288 ------------
src/elevenlabs/workspace/raw_client.py | 444 ------------------
47 files changed, 395 insertions(+), 1097 deletions(-)
rename src/elevenlabs/types/{workspace_group_response_model.py => auth_connection_locator.py} (66%)
rename src/elevenlabs/types/{body_retrieve_voice_sample_audio_v_1_voices_pvc_voice_id_samples_sample_id_audio_get.py => bad_request_error_body.py} (57%)
rename src/elevenlabs/types/{default_sharing_preferences_response_model.py => play_dtmf_tool_config.py} (64%)
delete mode 100644 src/elevenlabs/types/workspace_group_permission.py
diff --git a/pyproject.toml b/pyproject.toml
index 72a80f40..36cff612 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -3,7 +3,7 @@ name = "elevenlabs"
[tool.poetry]
name = "elevenlabs"
-version = "v2.5.0"
+version = "v2.6.0"
description = ""
readme = "README.md"
authors = []
diff --git a/reference.md b/reference.md
index 0d3637eb..3f418152 100644
--- a/reference.md
+++ b/reference.md
@@ -4649,267 +4649,6 @@ client.pronunciation_dictionaries.list()
-
-
-
-
-## Workspace
-client.workspace.update_user_auto_provisioning(...)
-
--
-
-#### 📝 Description
-
-
--
-
-
--
-
-Update user auto provisioning settings for the workspace.
-
-
-
-
-
-#### 🔌 Usage
-
-
--
-
-
--
-
-```python
-from elevenlabs import ElevenLabs
-
-client = ElevenLabs(
- api_key="YOUR_API_KEY",
-)
-client.workspace.update_user_auto_provisioning(
- enabled=True,
-)
-
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
--
-
-
--
-
-**enabled:** `bool`
-
-
-
-
-
--
-
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
-
-
-
-
-
-
-
-
-
-
-
-client.workspace.get_default_sharing_preferences()
-
--
-
-#### 📝 Description
-
-
--
-
-
--
-
-Get the user's default sharing preferences.
-
-
-
-
-
-#### 🔌 Usage
-
-
--
-
-
--
-
-```python
-from elevenlabs import ElevenLabs
-
-client = ElevenLabs(
- api_key="YOUR_API_KEY",
-)
-client.workspace.get_default_sharing_preferences()
-
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
--
-
-
--
-
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
-
-
-
-
-
-
-
-
-
-
-
-client.workspace.update_default_sharing_preferences(...)
-
--
-
-#### 📝 Description
-
-
--
-
-
--
-
-Update the user's default sharing preferences.
-
-
-
-
-
-#### 🔌 Usage
-
-
--
-
-
--
-
-```python
-from elevenlabs import ElevenLabs
-
-client = ElevenLabs(
- api_key="YOUR_API_KEY",
-)
-client.workspace.update_default_sharing_preferences(
- default_sharing_groups=["default_sharing_groups"],
-)
-
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
--
-
-
--
-
-**default_sharing_groups:** `typing.Sequence[str]` — List of group IDs to share with by default
-
-
-
-
-
--
-
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
-
-
-
-
-
-
-
-
-
-
-
-client.workspace.get_share_options()
-
--
-
-#### 📝 Description
-
-
--
-
-
--
-
-Get the share options for a workspace.
-
-
-
-
-
-#### 🔌 Usage
-
-
--
-
-
--
-
-```python
-from elevenlabs import ElevenLabs
-
-client = ElevenLabs(
- api_key="YOUR_API_KEY",
-)
-client.workspace.get_share_options()
-
-```
-
-
-
-
-
-#### ⚙️ Parameters
-
-
--
-
-
--
-
-**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
-
-
-
-
-
-
-
@@ -5102,6 +4841,14 @@ typing.Optional[core.File]` — See core.File for more documentation
-
+**diarization_threshold:** `typing.Optional[float]` — Diarization threshold to apply during speaker diarization. A higher value means there will be a lower chance of one speaker being diarized as two different speakers but also a higher chance of two different speakers being diarized as one speaker (less total speakers predicted). A low value means there will be a higher chance of one speaker being diarized as two different speakers but also a lower chance of two different speakers being diarized as one speaker (more total speakers predicted). Can only be set when diarize=True and num_speakers=None. Defaults to None, in which case we will choose a threshold based on the model_id (0.22 usually).
+
+
+
+
+
+-
+
**additional_formats:** `typing.Optional[AdditionalFormats]` — A list of additional formats to export the transcript to.
@@ -5292,6 +5039,14 @@ client.conversational_ai.add_to_knowledge_base()
-
+**agent_id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
**name:** `typing.Optional[str]` — A custom, human-readable name for the document.
@@ -9709,6 +9464,14 @@ client.conversational_ai.knowledge_base.documents.get(
-
+**agent_id:** `typing.Optional[str]`
+
+
+
+
+
+-
+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
@@ -11925,7 +11688,14 @@ typing.Optional[core.File]` — See core.File for more documentation
-
-**from_content_json:** `typing.Optional[str]` — An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.
+**from_content_json:** `typing.Optional[str]`
+
+
+ An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.
+
+ Example:
+ [{"name": "Chapter A", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "A", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "B", "type": "tts_node"}]}, {"sub_type": "h1", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "C", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "D", "type": "tts_node"}]}]}, {"name": "Chapter B", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "E", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "F", "type": "tts_node"}]}, {"sub_type": "h2", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "G", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "H", "type": "tts_node"}]}]}]
+
@@ -12584,6 +12354,21 @@ client.studio.projects.content.update(
typing.Optional[core.File]` — See core.File for more documentation
+
+
+
+
+-
+
+**from_content_json:** `typing.Optional[str]`
+
+
+ An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.
+
+ Example:
+ [{"name": "Chapter A", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "A", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "B", "type": "tts_node"}]}, {"sub_type": "h1", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "C", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "D", "type": "tts_node"}]}]}, {"name": "Chapter B", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "E", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "F", "type": "tts_node"}]}, {"sub_type": "h2", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "G", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "H", "type": "tts_node"}]}]}]
+
+
@@ -14572,6 +14357,7 @@ client = ElevenLabs(
client.voices.pvc.samples.audio.get(
voice_id="21m00Tcm4TlvDq8ikWAM",
sample_id="VW7YKqPnjY4h39yTbx2L",
+ remove_background_noise=True,
)
```
@@ -14604,6 +14390,14 @@ client.voices.pvc.samples.audio.get(
-
+**remove_background_noise:** `typing.Optional[bool]` — If set will remove background noise for voice samples using our audio isolation model. If the samples do not include background noise, it can make the quality worse.
+
+
+
+
+
+-
+
**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.
diff --git a/src/elevenlabs/__init__.py b/src/elevenlabs/__init__.py
index 6c3cde73..1059ac6b 100644
--- a/src/elevenlabs/__init__.py
+++ b/src/elevenlabs/__init__.py
@@ -47,8 +47,10 @@
AudioOutput,
AudioOutputMulti,
AudioWithTimestampsResponse,
+ AuthConnectionLocator,
AuthSettings,
AuthorizationMethod,
+ BadRequestErrorBody,
BanReasonType,
BatchCallDetailedResponse,
BatchCallRecipientStatus,
@@ -76,7 +78,6 @@
BodyEditProjectContentV1ProjectsProjectIdContentPost,
BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostAge,
BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender,
- BodyRetrieveVoiceSampleAudioV1VoicesPvcVoiceIdSamplesSampleIdAudioGet,
BodyStreamChapterAudioV1ProjectsProjectIdChaptersChapterIdSnapshotsChapterSnapshotIdStreamPost,
BodyStreamProjectAudioV1ProjectsProjectIdSnapshotsProjectSnapshotIdStreamPost,
BreakdownTypes,
@@ -193,7 +194,6 @@
DashboardCriteriaChartModel,
DashboardDataCollectionChartModel,
DataCollectionResultCommonModel,
- DefaultSharingPreferencesResponseModel,
DeleteChapterRequest,
DeleteChapterResponseModel,
DeleteDubbingResponseModel,
@@ -405,6 +405,7 @@
PdfExportOptions,
PhoneNumberAgentInfo,
PhoneNumberTransfer,
+ PlayDtmfToolConfig,
PodcastBulletinMode,
PodcastBulletinModeData,
PodcastConversationMode,
@@ -539,6 +540,7 @@
SystemToolConfigInputParams,
SystemToolConfigInputParams_EndCall,
SystemToolConfigInputParams_LanguageDetection,
+ SystemToolConfigInputParams_PlayKeypadTouchTone,
SystemToolConfigInputParams_SkipTurn,
SystemToolConfigInputParams_TransferToAgent,
SystemToolConfigInputParams_TransferToNumber,
@@ -546,6 +548,7 @@
SystemToolConfigOutputParams,
SystemToolConfigOutputParams_EndCall,
SystemToolConfigOutputParams_LanguageDetection,
+ SystemToolConfigOutputParams_PlayKeypadTouchTone,
SystemToolConfigOutputParams_SkipTurn,
SystemToolConfigOutputParams_TransferToAgent,
SystemToolConfigOutputParams_TransferToNumber,
@@ -651,8 +654,6 @@
WidgetTextContents,
WorkspaceBatchCallsResponse,
WorkspaceGroupByNameResponseModel,
- WorkspaceGroupPermission,
- WorkspaceGroupResponseModel,
WorkspaceResourceType,
WorkspaceWebhookListResponseModel,
WorkspaceWebhookResponseModel,
@@ -785,9 +786,11 @@
"AudioOutput",
"AudioOutputMulti",
"AudioWithTimestampsResponse",
+ "AuthConnectionLocator",
"AuthSettings",
"AuthorizationMethod",
"BadRequestError",
+ "BadRequestErrorBody",
"BanReasonType",
"BatchCallDetailedResponse",
"BatchCallRecipientStatus",
@@ -828,7 +831,6 @@
"BodyEditProjectContentV1ProjectsProjectIdContentPost",
"BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostAge",
"BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender",
- "BodyRetrieveVoiceSampleAudioV1VoicesPvcVoiceIdSamplesSampleIdAudioGet",
"BodyStreamChapterAudioV1ProjectsProjectIdChaptersChapterIdSnapshotsChapterSnapshotIdStreamPost",
"BodyStreamProjectAudioV1ProjectsProjectIdSnapshotsProjectSnapshotIdStreamPost",
"BodyTextToSpeechStreamingV1TextToSpeechVoiceIdStreamPostApplyTextNormalization",
@@ -949,7 +951,6 @@
"DashboardCriteriaChartModel",
"DashboardDataCollectionChartModel",
"DataCollectionResultCommonModel",
- "DefaultSharingPreferencesResponseModel",
"DeleteChapterRequest",
"DeleteChapterResponseModel",
"DeleteDubbingResponseModel",
@@ -1166,6 +1167,7 @@
"PdfExportOptions",
"PhoneNumberAgentInfo",
"PhoneNumberTransfer",
+ "PlayDtmfToolConfig",
"PodcastBulletinMode",
"PodcastBulletinModeData",
"PodcastConversationMode",
@@ -1312,6 +1314,7 @@
"SystemToolConfigInputParams",
"SystemToolConfigInputParams_EndCall",
"SystemToolConfigInputParams_LanguageDetection",
+ "SystemToolConfigInputParams_PlayKeypadTouchTone",
"SystemToolConfigInputParams_SkipTurn",
"SystemToolConfigInputParams_TransferToAgent",
"SystemToolConfigInputParams_TransferToNumber",
@@ -1319,6 +1322,7 @@
"SystemToolConfigOutputParams",
"SystemToolConfigOutputParams_EndCall",
"SystemToolConfigOutputParams_LanguageDetection",
+ "SystemToolConfigOutputParams_PlayKeypadTouchTone",
"SystemToolConfigOutputParams_SkipTurn",
"SystemToolConfigOutputParams_TransferToAgent",
"SystemToolConfigOutputParams_TransferToNumber",
@@ -1437,8 +1441,6 @@
"WidgetTextContents",
"WorkspaceBatchCallsResponse",
"WorkspaceGroupByNameResponseModel",
- "WorkspaceGroupPermission",
- "WorkspaceGroupResponseModel",
"WorkspaceResourceType",
"WorkspaceWebhookListResponseModel",
"WorkspaceWebhookResponseModel",
diff --git a/src/elevenlabs/base_client.py b/src/elevenlabs/base_client.py
index e6273c95..fdf4afb7 100644
--- a/src/elevenlabs/base_client.py
+++ b/src/elevenlabs/base_client.py
@@ -1,6 +1,5 @@
# This file was auto-generated by Fern from our API Definition.
-import os
import typing
import httpx
@@ -67,7 +66,7 @@ def __init__(
self,
*,
environment: ElevenLabsEnvironment = ElevenLabsEnvironment.PRODUCTION,
- api_key: typing.Optional[str] = os.getenv("ELEVENLABS_API_KEY"),
+ api_key: typing.Optional[str] = None,
timeout: typing.Optional[float] = None,
follow_redirects: typing.Optional[bool] = True,
httpx_client: typing.Optional[httpx.Client] = None,
@@ -101,11 +100,11 @@ def __init__(
self.audio_native = AudioNativeClient(client_wrapper=self._client_wrapper)
self.usage = UsageClient(client_wrapper=self._client_wrapper)
self.pronunciation_dictionaries = PronunciationDictionariesClient(client_wrapper=self._client_wrapper)
- self.workspace = WorkspaceClient(client_wrapper=self._client_wrapper)
self.webhooks = WebhooksClient(client_wrapper=self._client_wrapper)
self.speech_to_text = SpeechToTextClient(client_wrapper=self._client_wrapper)
self.forced_alignment = ForcedAlignmentClient(client_wrapper=self._client_wrapper)
self.conversational_ai = ConversationalAiClient(client_wrapper=self._client_wrapper)
+ self.workspace = WorkspaceClient(client_wrapper=self._client_wrapper)
class AsyncBaseElevenLabs:
@@ -146,7 +145,7 @@ def __init__(
self,
*,
environment: ElevenLabsEnvironment = ElevenLabsEnvironment.PRODUCTION,
- api_key: typing.Optional[str] = os.getenv("ELEVENLABS_API_KEY"),
+ api_key: typing.Optional[str] = None,
timeout: typing.Optional[float] = None,
follow_redirects: typing.Optional[bool] = True,
httpx_client: typing.Optional[httpx.AsyncClient] = None,
@@ -180,8 +179,8 @@ def __init__(
self.audio_native = AsyncAudioNativeClient(client_wrapper=self._client_wrapper)
self.usage = AsyncUsageClient(client_wrapper=self._client_wrapper)
self.pronunciation_dictionaries = AsyncPronunciationDictionariesClient(client_wrapper=self._client_wrapper)
- self.workspace = AsyncWorkspaceClient(client_wrapper=self._client_wrapper)
self.webhooks = AsyncWebhooksClient(client_wrapper=self._client_wrapper)
self.speech_to_text = AsyncSpeechToTextClient(client_wrapper=self._client_wrapper)
self.forced_alignment = AsyncForcedAlignmentClient(client_wrapper=self._client_wrapper)
self.conversational_ai = AsyncConversationalAiClient(client_wrapper=self._client_wrapper)
+ self.workspace = AsyncWorkspaceClient(client_wrapper=self._client_wrapper)
diff --git a/src/elevenlabs/conversational_ai/client.py b/src/elevenlabs/conversational_ai/client.py
index a4a2d363..aadec78f 100644
--- a/src/elevenlabs/conversational_ai/client.py
+++ b/src/elevenlabs/conversational_ai/client.py
@@ -72,6 +72,7 @@ def with_raw_response(self) -> RawConversationalAiClient:
def add_to_knowledge_base(
self,
*,
+ agent_id: typing.Optional[str] = None,
name: typing.Optional[str] = OMIT,
url: typing.Optional[str] = OMIT,
file: typing.Optional[core.File] = OMIT,
@@ -82,6 +83,8 @@ def add_to_knowledge_base(
Parameters
----------
+ agent_id : typing.Optional[str]
+
name : typing.Optional[str]
A custom, human-readable name for the document.
@@ -109,7 +112,7 @@ def add_to_knowledge_base(
client.conversational_ai.add_to_knowledge_base()
"""
_response = self._raw_client.add_to_knowledge_base(
- name=name, url=url, file=file, request_options=request_options
+ agent_id=agent_id, name=name, url=url, file=file, request_options=request_options
)
return _response.data
@@ -295,6 +298,7 @@ def with_raw_response(self) -> AsyncRawConversationalAiClient:
async def add_to_knowledge_base(
self,
*,
+ agent_id: typing.Optional[str] = None,
name: typing.Optional[str] = OMIT,
url: typing.Optional[str] = OMIT,
file: typing.Optional[core.File] = OMIT,
@@ -305,6 +309,8 @@ async def add_to_knowledge_base(
Parameters
----------
+ agent_id : typing.Optional[str]
+
name : typing.Optional[str]
A custom, human-readable name for the document.
@@ -340,7 +346,7 @@ async def main() -> None:
asyncio.run(main())
"""
_response = await self._raw_client.add_to_knowledge_base(
- name=name, url=url, file=file, request_options=request_options
+ agent_id=agent_id, name=name, url=url, file=file, request_options=request_options
)
return _response.data
diff --git a/src/elevenlabs/conversational_ai/knowledge_base/documents/client.py b/src/elevenlabs/conversational_ai/knowledge_base/documents/client.py
index c3bce906..8c03d4bd 100644
--- a/src/elevenlabs/conversational_ai/knowledge_base/documents/client.py
+++ b/src/elevenlabs/conversational_ai/knowledge_base/documents/client.py
@@ -143,7 +143,11 @@ def create_from_text(
return _response.data
def get(
- self, documentation_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ self,
+ documentation_id: str,
+ *,
+ agent_id: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
) -> DocumentsGetResponse:
"""
Get details about a specific documentation making up the agent's knowledge base
@@ -153,6 +157,8 @@ def get(
documentation_id : str
The id of a document from the knowledge base. This is returned on document addition.
+ agent_id : typing.Optional[str]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -172,7 +178,7 @@ def get(
documentation_id="21m00Tcm4TlvDq8ikWAM",
)
"""
- _response = self._raw_client.get(documentation_id, request_options=request_options)
+ _response = self._raw_client.get(documentation_id, agent_id=agent_id, request_options=request_options)
return _response.data
def delete(
@@ -480,7 +486,11 @@ async def main() -> None:
return _response.data
async def get(
- self, documentation_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ self,
+ documentation_id: str,
+ *,
+ agent_id: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
) -> DocumentsGetResponse:
"""
Get details about a specific documentation making up the agent's knowledge base
@@ -490,6 +500,8 @@ async def get(
documentation_id : str
The id of a document from the knowledge base. This is returned on document addition.
+ agent_id : typing.Optional[str]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -517,7 +529,7 @@ async def main() -> None:
asyncio.run(main())
"""
- _response = await self._raw_client.get(documentation_id, request_options=request_options)
+ _response = await self._raw_client.get(documentation_id, agent_id=agent_id, request_options=request_options)
return _response.data
async def delete(
diff --git a/src/elevenlabs/conversational_ai/knowledge_base/documents/raw_client.py b/src/elevenlabs/conversational_ai/knowledge_base/documents/raw_client.py
index a2acdb40..7a1ec7fe 100644
--- a/src/elevenlabs/conversational_ai/knowledge_base/documents/raw_client.py
+++ b/src/elevenlabs/conversational_ai/knowledge_base/documents/raw_client.py
@@ -216,7 +216,11 @@ def create_from_text(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
def get(
- self, documentation_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ self,
+ documentation_id: str,
+ *,
+ agent_id: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[DocumentsGetResponse]:
"""
Get details about a specific documentation making up the agent's knowledge base
@@ -226,6 +230,8 @@ def get(
documentation_id : str
The id of a document from the knowledge base. This is returned on document addition.
+ agent_id : typing.Optional[str]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -238,6 +244,9 @@ def get(
f"v1/convai/knowledge-base/{jsonable_encoder(documentation_id)}",
base_url=self._client_wrapper.get_environment().base,
method="GET",
+ params={
+ "agent_id": agent_id,
+ },
request_options=request_options,
)
try:
@@ -695,7 +704,11 @@ async def create_from_text(
raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
async def get(
- self, documentation_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ self,
+ documentation_id: str,
+ *,
+ agent_id: typing.Optional[str] = None,
+ request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[DocumentsGetResponse]:
"""
Get details about a specific documentation making up the agent's knowledge base
@@ -705,6 +718,8 @@ async def get(
documentation_id : str
The id of a document from the knowledge base. This is returned on document addition.
+ agent_id : typing.Optional[str]
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -717,6 +732,9 @@ async def get(
f"v1/convai/knowledge-base/{jsonable_encoder(documentation_id)}",
base_url=self._client_wrapper.get_environment().base,
method="GET",
+ params={
+ "agent_id": agent_id,
+ },
request_options=request_options,
)
try:
diff --git a/src/elevenlabs/conversational_ai/phone_numbers/raw_client.py b/src/elevenlabs/conversational_ai/phone_numbers/raw_client.py
index b5e028bc..da4de0d6 100644
--- a/src/elevenlabs/conversational_ai/phone_numbers/raw_client.py
+++ b/src/elevenlabs/conversational_ai/phone_numbers/raw_client.py
@@ -268,7 +268,7 @@ def list(
Successful Response
"""
_response = self._client_wrapper.httpx_client.request(
- "v1/convai/phone-numbers/",
+ "v1/convai/phone-numbers",
base_url=self._client_wrapper.get_environment().base,
method="GET",
request_options=request_options,
@@ -546,7 +546,7 @@ async def list(
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
- "v1/convai/phone-numbers/",
+ "v1/convai/phone-numbers",
base_url=self._client_wrapper.get_environment().base,
method="GET",
request_options=request_options,
diff --git a/src/elevenlabs/conversational_ai/raw_client.py b/src/elevenlabs/conversational_ai/raw_client.py
index e3f764f3..42c617b3 100644
--- a/src/elevenlabs/conversational_ai/raw_client.py
+++ b/src/elevenlabs/conversational_ai/raw_client.py
@@ -29,6 +29,7 @@ def __init__(self, *, client_wrapper: SyncClientWrapper):
def add_to_knowledge_base(
self,
*,
+ agent_id: typing.Optional[str] = None,
name: typing.Optional[str] = OMIT,
url: typing.Optional[str] = OMIT,
file: typing.Optional[core.File] = OMIT,
@@ -39,6 +40,8 @@ def add_to_knowledge_base(
Parameters
----------
+ agent_id : typing.Optional[str]
+
name : typing.Optional[str]
A custom, human-readable name for the document.
@@ -60,6 +63,9 @@ def add_to_knowledge_base(
"v1/convai/knowledge-base",
base_url=self._client_wrapper.get_environment().base,
method="POST",
+ params={
+ "agent_id": agent_id,
+ },
data={
"name": name,
"url": url,
@@ -321,6 +327,7 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper):
async def add_to_knowledge_base(
self,
*,
+ agent_id: typing.Optional[str] = None,
name: typing.Optional[str] = OMIT,
url: typing.Optional[str] = OMIT,
file: typing.Optional[core.File] = OMIT,
@@ -331,6 +338,8 @@ async def add_to_knowledge_base(
Parameters
----------
+ agent_id : typing.Optional[str]
+
name : typing.Optional[str]
A custom, human-readable name for the document.
@@ -352,6 +361,9 @@ async def add_to_knowledge_base(
"v1/convai/knowledge-base",
base_url=self._client_wrapper.get_environment().base,
method="POST",
+ params={
+ "agent_id": agent_id,
+ },
data={
"name": name,
"url": url,
diff --git a/src/elevenlabs/core/client_wrapper.py b/src/elevenlabs/core/client_wrapper.py
index 65ded672..ee78d3e7 100644
--- a/src/elevenlabs/core/client_wrapper.py
+++ b/src/elevenlabs/core/client_wrapper.py
@@ -21,10 +21,10 @@ def __init__(
def get_headers(self) -> typing.Dict[str, str]:
headers: typing.Dict[str, str] = {
- "User-Agent": "elevenlabs/v2.5.0",
+ "User-Agent": "elevenlabs/v2.6.0",
"X-Fern-Language": "Python",
"X-Fern-SDK-Name": "elevenlabs",
- "X-Fern-SDK-Version": "v2.5.0",
+ "X-Fern-SDK-Version": "v2.6.0",
}
if self._api_key is not None:
headers["xi-api-key"] = self._api_key
diff --git a/src/elevenlabs/environment.py b/src/elevenlabs/environment.py
index 87216577..8124613b 100644
--- a/src/elevenlabs/environment.py
+++ b/src/elevenlabs/environment.py
@@ -7,6 +7,7 @@ class ElevenLabsEnvironment:
PRODUCTION: ElevenLabsEnvironment
PRODUCTION_US: ElevenLabsEnvironment
PRODUCTION_EU: ElevenLabsEnvironment
+ PRODUCTION_INDIA: ElevenLabsEnvironment
def __init__(self, *, base: str, wss: str):
self.base = base
@@ -22,3 +23,6 @@ def __init__(self, *, base: str, wss: str):
ElevenLabsEnvironment.PRODUCTION_EU = ElevenLabsEnvironment(
base="https://api.eu.residency.elevenlabs.io", wss="wss://api.elevenlabs.io"
)
+ElevenLabsEnvironment.PRODUCTION_INDIA = ElevenLabsEnvironment(
+ base="https://api.in.residency.elevenlabs.io", wss="wss://api.elevenlabs.io"
+)
diff --git a/src/elevenlabs/errors/bad_request_error.py b/src/elevenlabs/errors/bad_request_error.py
index baf5be4f..a4541df3 100644
--- a/src/elevenlabs/errors/bad_request_error.py
+++ b/src/elevenlabs/errors/bad_request_error.py
@@ -3,8 +3,9 @@
import typing
from ..core.api_error import ApiError
+from ..types.bad_request_error_body import BadRequestErrorBody
class BadRequestError(ApiError):
- def __init__(self, body: typing.Optional[typing.Any], headers: typing.Optional[typing.Dict[str, str]] = None):
+ def __init__(self, body: BadRequestErrorBody, headers: typing.Optional[typing.Dict[str, str]] = None):
super().__init__(status_code=400, headers=headers, body=body)
diff --git a/src/elevenlabs/history/raw_client.py b/src/elevenlabs/history/raw_client.py
index 266f4cf0..722f7ce7 100644
--- a/src/elevenlabs/history/raw_client.py
+++ b/src/elevenlabs/history/raw_client.py
@@ -12,6 +12,7 @@
from ..core.unchecked_base_model import construct_type
from ..errors.bad_request_error import BadRequestError
from ..errors.unprocessable_entity_error import UnprocessableEntityError
+from ..types.bad_request_error_body import BadRequestErrorBody
from ..types.delete_history_item_response import DeleteHistoryItemResponse
from ..types.get_speech_history_response import GetSpeechHistoryResponse
from ..types.http_validation_error import HttpValidationError
@@ -314,9 +315,9 @@ def _stream() -> HttpResponse[typing.Iterator[bytes]]:
raise BadRequestError(
headers=dict(_response.headers),
body=typing.cast(
- typing.Optional[typing.Any],
+ BadRequestErrorBody,
construct_type(
- type_=typing.Optional[typing.Any], # type: ignore
+ type_=BadRequestErrorBody, # type: ignore
object_=_response.json(),
),
),
@@ -636,9 +637,9 @@ async def _stream() -> AsyncHttpResponse[typing.AsyncIterator[bytes]]:
raise BadRequestError(
headers=dict(_response.headers),
body=typing.cast(
- typing.Optional[typing.Any],
+ BadRequestErrorBody,
construct_type(
- type_=typing.Optional[typing.Any], # type: ignore
+ type_=BadRequestErrorBody, # type: ignore
object_=_response.json(),
),
),
diff --git a/src/elevenlabs/pronunciation_dictionaries/raw_client.py b/src/elevenlabs/pronunciation_dictionaries/raw_client.py
index 3ce1921d..e63a3cd8 100644
--- a/src/elevenlabs/pronunciation_dictionaries/raw_client.py
+++ b/src/elevenlabs/pronunciation_dictionaries/raw_client.py
@@ -278,7 +278,7 @@ def get(
Successful Response
"""
_response = self._client_wrapper.httpx_client.request(
- f"v1/pronunciation-dictionaries/{jsonable_encoder(pronunciation_dictionary_id)}/",
+ f"v1/pronunciation-dictionaries/{jsonable_encoder(pronunciation_dictionary_id)}",
base_url=self._client_wrapper.get_environment().base,
method="GET",
request_options=request_options,
@@ -344,7 +344,7 @@ def list(
Successful Response
"""
_response = self._client_wrapper.httpx_client.request(
- "v1/pronunciation-dictionaries/",
+ "v1/pronunciation-dictionaries",
base_url=self._client_wrapper.get_environment().base,
method="GET",
params={
@@ -627,7 +627,7 @@ async def get(
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
- f"v1/pronunciation-dictionaries/{jsonable_encoder(pronunciation_dictionary_id)}/",
+ f"v1/pronunciation-dictionaries/{jsonable_encoder(pronunciation_dictionary_id)}",
base_url=self._client_wrapper.get_environment().base,
method="GET",
request_options=request_options,
@@ -693,7 +693,7 @@ async def list(
Successful Response
"""
_response = await self._client_wrapper.httpx_client.request(
- "v1/pronunciation-dictionaries/",
+ "v1/pronunciation-dictionaries",
base_url=self._client_wrapper.get_environment().base,
method="GET",
params={
diff --git a/src/elevenlabs/speech_to_text/client.py b/src/elevenlabs/speech_to_text/client.py
index 577c69b8..092f54ac 100644
--- a/src/elevenlabs/speech_to_text/client.py
+++ b/src/elevenlabs/speech_to_text/client.py
@@ -41,6 +41,7 @@ def convert(
num_speakers: typing.Optional[int] = OMIT,
timestamps_granularity: typing.Optional[SpeechToTextConvertRequestTimestampsGranularity] = OMIT,
diarize: typing.Optional[bool] = OMIT,
+ diarization_threshold: typing.Optional[float] = OMIT,
additional_formats: typing.Optional[AdditionalFormats] = OMIT,
file_format: typing.Optional[SpeechToTextConvertRequestFileFormat] = OMIT,
cloud_storage_url: typing.Optional[str] = OMIT,
@@ -77,6 +78,9 @@ def convert(
diarize : typing.Optional[bool]
Whether to annotate which speaker is currently talking in the uploaded file.
+ diarization_threshold : typing.Optional[float]
+ Diarization threshold to apply during speaker diarization. A higher value means there will be a lower chance of one speaker being diarized as two different speakers but also a higher chance of two different speakers being diarized as one speaker (less total speakers predicted). A low value means there will be a higher chance of one speaker being diarized as two different speakers but also a lower chance of two different speakers being diarized as one speaker (more total speakers predicted). Can only be set when diarize=True and num_speakers=None. Defaults to None, in which case we will choose a threshold based on the model_id (0.22 usually).
+
additional_formats : typing.Optional[AdditionalFormats]
A list of additional formats to export the transcript to.
@@ -120,6 +124,7 @@ def convert(
num_speakers=num_speakers,
timestamps_granularity=timestamps_granularity,
diarize=diarize,
+ diarization_threshold=diarization_threshold,
additional_formats=additional_formats,
file_format=file_format,
cloud_storage_url=cloud_storage_url,
@@ -156,6 +161,7 @@ async def convert(
num_speakers: typing.Optional[int] = OMIT,
timestamps_granularity: typing.Optional[SpeechToTextConvertRequestTimestampsGranularity] = OMIT,
diarize: typing.Optional[bool] = OMIT,
+ diarization_threshold: typing.Optional[float] = OMIT,
additional_formats: typing.Optional[AdditionalFormats] = OMIT,
file_format: typing.Optional[SpeechToTextConvertRequestFileFormat] = OMIT,
cloud_storage_url: typing.Optional[str] = OMIT,
@@ -192,6 +198,9 @@ async def convert(
diarize : typing.Optional[bool]
Whether to annotate which speaker is currently talking in the uploaded file.
+ diarization_threshold : typing.Optional[float]
+ Diarization threshold to apply during speaker diarization. A higher value means there will be a lower chance of one speaker being diarized as two different speakers but also a higher chance of two different speakers being diarized as one speaker (less total speakers predicted). A low value means there will be a higher chance of one speaker being diarized as two different speakers but also a lower chance of two different speakers being diarized as one speaker (more total speakers predicted). Can only be set when diarize=True and num_speakers=None. Defaults to None, in which case we will choose a threshold based on the model_id (0.22 usually).
+
additional_formats : typing.Optional[AdditionalFormats]
A list of additional formats to export the transcript to.
@@ -243,6 +252,7 @@ async def main() -> None:
num_speakers=num_speakers,
timestamps_granularity=timestamps_granularity,
diarize=diarize,
+ diarization_threshold=diarization_threshold,
additional_formats=additional_formats,
file_format=file_format,
cloud_storage_url=cloud_storage_url,
diff --git a/src/elevenlabs/speech_to_text/raw_client.py b/src/elevenlabs/speech_to_text/raw_client.py
index 3aa08f7c..23779f29 100644
--- a/src/elevenlabs/speech_to_text/raw_client.py
+++ b/src/elevenlabs/speech_to_text/raw_client.py
@@ -35,6 +35,7 @@ def convert(
num_speakers: typing.Optional[int] = OMIT,
timestamps_granularity: typing.Optional[SpeechToTextConvertRequestTimestampsGranularity] = OMIT,
diarize: typing.Optional[bool] = OMIT,
+ diarization_threshold: typing.Optional[float] = OMIT,
additional_formats: typing.Optional[AdditionalFormats] = OMIT,
file_format: typing.Optional[SpeechToTextConvertRequestFileFormat] = OMIT,
cloud_storage_url: typing.Optional[str] = OMIT,
@@ -71,6 +72,9 @@ def convert(
diarize : typing.Optional[bool]
Whether to annotate which speaker is currently talking in the uploaded file.
+ diarization_threshold : typing.Optional[float]
+ Diarization threshold to apply during speaker diarization. A higher value means there will be a lower chance of one speaker being diarized as two different speakers but also a higher chance of two different speakers being diarized as one speaker (less total speakers predicted). A low value means there will be a higher chance of one speaker being diarized as two different speakers but also a lower chance of two different speakers being diarized as one speaker (more total speakers predicted). Can only be set when diarize=True and num_speakers=None. Defaults to None, in which case we will choose a threshold based on the model_id (0.22 usually).
+
additional_formats : typing.Optional[AdditionalFormats]
A list of additional formats to export the transcript to.
@@ -108,6 +112,7 @@ def convert(
"num_speakers": num_speakers,
"timestamps_granularity": timestamps_granularity,
"diarize": diarize,
+ "diarization_threshold": diarization_threshold,
"additional_formats": additional_formats,
"file_format": file_format,
"cloud_storage_url": cloud_storage_url,
@@ -163,6 +168,7 @@ async def convert(
num_speakers: typing.Optional[int] = OMIT,
timestamps_granularity: typing.Optional[SpeechToTextConvertRequestTimestampsGranularity] = OMIT,
diarize: typing.Optional[bool] = OMIT,
+ diarization_threshold: typing.Optional[float] = OMIT,
additional_formats: typing.Optional[AdditionalFormats] = OMIT,
file_format: typing.Optional[SpeechToTextConvertRequestFileFormat] = OMIT,
cloud_storage_url: typing.Optional[str] = OMIT,
@@ -199,6 +205,9 @@ async def convert(
diarize : typing.Optional[bool]
Whether to annotate which speaker is currently talking in the uploaded file.
+ diarization_threshold : typing.Optional[float]
+ Diarization threshold to apply during speaker diarization. A higher value means there will be a lower chance of one speaker being diarized as two different speakers but also a higher chance of two different speakers being diarized as one speaker (less total speakers predicted). A low value means there will be a higher chance of one speaker being diarized as two different speakers but also a lower chance of two different speakers being diarized as one speaker (more total speakers predicted). Can only be set when diarize=True and num_speakers=None. Defaults to None, in which case we will choose a threshold based on the model_id (0.22 usually).
+
additional_formats : typing.Optional[AdditionalFormats]
A list of additional formats to export the transcript to.
@@ -236,6 +245,7 @@ async def convert(
"num_speakers": num_speakers,
"timestamps_granularity": timestamps_granularity,
"diarize": diarize,
+ "diarization_threshold": diarization_threshold,
"additional_formats": additional_formats,
"file_format": file_format,
"cloud_storage_url": cloud_storage_url,
diff --git a/src/elevenlabs/studio/projects/client.py b/src/elevenlabs/studio/projects/client.py
index b1363fef..ebc8decb 100644
--- a/src/elevenlabs/studio/projects/client.py
+++ b/src/elevenlabs/studio/projects/client.py
@@ -129,7 +129,12 @@ def create(
See core.File for more documentation
from_content_json : typing.Optional[str]
- An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.
+
+ An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.
+
+ Example:
+ [{"name": "Chapter A", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "A", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "B", "type": "tts_node"}]}, {"sub_type": "h1", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "C", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "D", "type": "tts_node"}]}]}, {"name": "Chapter B", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "E", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "F", "type": "tts_node"}]}, {"sub_type": "h2", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "G", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "H", "type": "tts_node"}]}]}]
+
quality_preset : typing.Optional[str]
Output quality of the generated audio. Must be one of:
@@ -597,7 +602,12 @@ async def create(
See core.File for more documentation
from_content_json : typing.Optional[str]
- An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.
+
+ An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.
+
+ Example:
+ [{"name": "Chapter A", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "A", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "B", "type": "tts_node"}]}, {"sub_type": "h1", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "C", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "D", "type": "tts_node"}]}]}, {"name": "Chapter B", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "E", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "F", "type": "tts_node"}]}, {"sub_type": "h2", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "G", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "H", "type": "tts_node"}]}]}]
+
quality_preset : typing.Optional[str]
Output quality of the generated audio. Must be one of:
diff --git a/src/elevenlabs/studio/projects/content/client.py b/src/elevenlabs/studio/projects/content/client.py
index 171ceae4..4625abb7 100644
--- a/src/elevenlabs/studio/projects/content/client.py
+++ b/src/elevenlabs/studio/projects/content/client.py
@@ -33,6 +33,7 @@ def update(
*,
from_url: typing.Optional[str] = OMIT,
from_document: typing.Optional[core.File] = OMIT,
+ from_content_json: typing.Optional[str] = OMIT,
auto_convert: typing.Optional[bool] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> EditProjectResponseModel:
@@ -50,6 +51,14 @@ def update(
from_document : typing.Optional[core.File]
See core.File for more documentation
+ from_content_json : typing.Optional[str]
+
+ An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.
+
+ Example:
+ [{"name": "Chapter A", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "A", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "B", "type": "tts_node"}]}, {"sub_type": "h1", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "C", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "D", "type": "tts_node"}]}]}, {"name": "Chapter B", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "E", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "F", "type": "tts_node"}]}, {"sub_type": "h2", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "G", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "H", "type": "tts_node"}]}]}]
+
+
auto_convert : typing.Optional[bool]
Whether to auto convert the Studio project to audio or not.
@@ -76,6 +85,7 @@ def update(
project_id,
from_url=from_url,
from_document=from_document,
+ from_content_json=from_content_json,
auto_convert=auto_convert,
request_options=request_options,
)
@@ -103,6 +113,7 @@ async def update(
*,
from_url: typing.Optional[str] = OMIT,
from_document: typing.Optional[core.File] = OMIT,
+ from_content_json: typing.Optional[str] = OMIT,
auto_convert: typing.Optional[bool] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> EditProjectResponseModel:
@@ -120,6 +131,14 @@ async def update(
from_document : typing.Optional[core.File]
See core.File for more documentation
+ from_content_json : typing.Optional[str]
+
+ An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.
+
+ Example:
+ [{"name": "Chapter A", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "A", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "B", "type": "tts_node"}]}, {"sub_type": "h1", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "C", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "D", "type": "tts_node"}]}]}, {"name": "Chapter B", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "E", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "F", "type": "tts_node"}]}, {"sub_type": "h2", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "G", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "H", "type": "tts_node"}]}]}]
+
+
auto_convert : typing.Optional[bool]
Whether to auto convert the Studio project to audio or not.
@@ -154,6 +173,7 @@ async def main() -> None:
project_id,
from_url=from_url,
from_document=from_document,
+ from_content_json=from_content_json,
auto_convert=auto_convert,
request_options=request_options,
)
diff --git a/src/elevenlabs/studio/projects/content/raw_client.py b/src/elevenlabs/studio/projects/content/raw_client.py
index 520ba841..df7a3720 100644
--- a/src/elevenlabs/studio/projects/content/raw_client.py
+++ b/src/elevenlabs/studio/projects/content/raw_client.py
@@ -28,6 +28,7 @@ def update(
*,
from_url: typing.Optional[str] = OMIT,
from_document: typing.Optional[core.File] = OMIT,
+ from_content_json: typing.Optional[str] = OMIT,
auto_convert: typing.Optional[bool] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[EditProjectResponseModel]:
@@ -45,6 +46,14 @@ def update(
from_document : typing.Optional[core.File]
See core.File for more documentation
+ from_content_json : typing.Optional[str]
+
+ An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.
+
+ Example:
+ [{"name": "Chapter A", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "A", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "B", "type": "tts_node"}]}, {"sub_type": "h1", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "C", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "D", "type": "tts_node"}]}]}, {"name": "Chapter B", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "E", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "F", "type": "tts_node"}]}, {"sub_type": "h2", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "G", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "H", "type": "tts_node"}]}]}]
+
+
auto_convert : typing.Optional[bool]
Whether to auto convert the Studio project to audio or not.
@@ -62,6 +71,7 @@ def update(
method="POST",
data={
"from_url": from_url,
+ "from_content_json": from_content_json,
"auto_convert": auto_convert,
},
files={
@@ -108,6 +118,7 @@ async def update(
*,
from_url: typing.Optional[str] = OMIT,
from_document: typing.Optional[core.File] = OMIT,
+ from_content_json: typing.Optional[str] = OMIT,
auto_convert: typing.Optional[bool] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[EditProjectResponseModel]:
@@ -125,6 +136,14 @@ async def update(
from_document : typing.Optional[core.File]
See core.File for more documentation
+ from_content_json : typing.Optional[str]
+
+ An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.
+
+ Example:
+ [{"name": "Chapter A", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "A", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "B", "type": "tts_node"}]}, {"sub_type": "h1", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "C", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "D", "type": "tts_node"}]}]}, {"name": "Chapter B", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "E", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "F", "type": "tts_node"}]}, {"sub_type": "h2", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "G", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "H", "type": "tts_node"}]}]}]
+
+
auto_convert : typing.Optional[bool]
Whether to auto convert the Studio project to audio or not.
@@ -142,6 +161,7 @@ async def update(
method="POST",
data={
"from_url": from_url,
+ "from_content_json": from_content_json,
"auto_convert": auto_convert,
},
files={
diff --git a/src/elevenlabs/studio/projects/raw_client.py b/src/elevenlabs/studio/projects/raw_client.py
index 56cc2035..ac2c5cd4 100644
--- a/src/elevenlabs/studio/projects/raw_client.py
+++ b/src/elevenlabs/studio/projects/raw_client.py
@@ -133,7 +133,12 @@ def create(
See core.File for more documentation
from_content_json : typing.Optional[str]
- An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.
+
+ An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.
+
+ Example:
+ [{"name": "Chapter A", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "A", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "B", "type": "tts_node"}]}, {"sub_type": "h1", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "C", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "D", "type": "tts_node"}]}]}, {"name": "Chapter B", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "E", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "F", "type": "tts_node"}]}, {"sub_type": "h2", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "G", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "H", "type": "tts_node"}]}]}]
+
quality_preset : typing.Optional[str]
Output quality of the generated audio. Must be one of:
@@ -688,7 +693,12 @@ async def create(
See core.File for more documentation
from_content_json : typing.Optional[str]
- An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.
+
+ An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.
+
+ Example:
+ [{"name": "Chapter A", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "A", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "B", "type": "tts_node"}]}, {"sub_type": "h1", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "C", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "D", "type": "tts_node"}]}]}, {"name": "Chapter B", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "E", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "F", "type": "tts_node"}]}, {"sub_type": "h2", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "G", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "H", "type": "tts_node"}]}]}]
+
quality_preset : typing.Optional[str]
Output quality of the generated audio. Must be one of:
diff --git a/src/elevenlabs/studio/projects/types/projects_create_request_source_type.py b/src/elevenlabs/studio/projects/types/projects_create_request_source_type.py
index b2c35e56..263a29a7 100644
--- a/src/elevenlabs/studio/projects/types/projects_create_request_source_type.py
+++ b/src/elevenlabs/studio/projects/types/projects_create_request_source_type.py
@@ -2,4 +2,4 @@
import typing
-ProjectsCreateRequestSourceType = typing.Union[typing.Literal["blank", "book", "article", "genfm"], typing.Any]
+ProjectsCreateRequestSourceType = typing.Union[typing.Literal["blank", "book", "article", "genfm", "video"], typing.Any]
diff --git a/src/elevenlabs/types/__init__.py b/src/elevenlabs/types/__init__.py
index 1a159b81..3712ae42 100644
--- a/src/elevenlabs/types/__init__.py
+++ b/src/elevenlabs/types/__init__.py
@@ -48,8 +48,10 @@
from .audio_output import AudioOutput
from .audio_output_multi import AudioOutputMulti
from .audio_with_timestamps_response import AudioWithTimestampsResponse
+from .auth_connection_locator import AuthConnectionLocator
from .auth_settings import AuthSettings
from .authorization_method import AuthorizationMethod
+from .bad_request_error_body import BadRequestErrorBody
from .ban_reason_type import BanReasonType
from .batch_call_detailed_response import BatchCallDetailedResponse
from .batch_call_recipient_status import BatchCallRecipientStatus
@@ -103,9 +105,6 @@
from .body_generate_a_random_voice_v_1_voice_generation_generate_voice_post_gender import (
BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender,
)
-from .body_retrieve_voice_sample_audio_v_1_voices_pvc_voice_id_samples_sample_id_audio_get import (
- BodyRetrieveVoiceSampleAudioV1VoicesPvcVoiceIdSamplesSampleIdAudioGet,
-)
from .body_stream_chapter_audio_v_1_projects_project_id_chapters_chapter_id_snapshots_chapter_snapshot_id_stream_post import (
BodyStreamChapterAudioV1ProjectsProjectIdChaptersChapterIdSnapshotsChapterSnapshotIdStreamPost,
)
@@ -256,7 +255,6 @@
from .dashboard_criteria_chart_model import DashboardCriteriaChartModel
from .dashboard_data_collection_chart_model import DashboardDataCollectionChartModel
from .data_collection_result_common_model import DataCollectionResultCommonModel
-from .default_sharing_preferences_response_model import DefaultSharingPreferencesResponseModel
from .delete_chapter_request import DeleteChapterRequest
from .delete_chapter_response_model import DeleteChapterResponseModel
from .delete_dubbing_response_model import DeleteDubbingResponseModel
@@ -494,6 +492,7 @@
from .pdf_export_options import PdfExportOptions
from .phone_number_agent_info import PhoneNumberAgentInfo
from .phone_number_transfer import PhoneNumberTransfer
+from .play_dtmf_tool_config import PlayDtmfToolConfig
from .podcast_bulletin_mode import PodcastBulletinMode
from .podcast_bulletin_mode_data import PodcastBulletinModeData
from .podcast_conversation_mode import PodcastConversationMode
@@ -635,6 +634,7 @@
SystemToolConfigInputParams,
SystemToolConfigInputParams_EndCall,
SystemToolConfigInputParams_LanguageDetection,
+ SystemToolConfigInputParams_PlayKeypadTouchTone,
SystemToolConfigInputParams_SkipTurn,
SystemToolConfigInputParams_TransferToAgent,
SystemToolConfigInputParams_TransferToNumber,
@@ -644,6 +644,7 @@
SystemToolConfigOutputParams,
SystemToolConfigOutputParams_EndCall,
SystemToolConfigOutputParams_LanguageDetection,
+ SystemToolConfigOutputParams_PlayKeypadTouchTone,
SystemToolConfigOutputParams_SkipTurn,
SystemToolConfigOutputParams_TransferToAgent,
SystemToolConfigOutputParams_TransferToNumber,
@@ -764,8 +765,6 @@
from .widget_text_contents import WidgetTextContents
from .workspace_batch_calls_response import WorkspaceBatchCallsResponse
from .workspace_group_by_name_response_model import WorkspaceGroupByNameResponseModel
-from .workspace_group_permission import WorkspaceGroupPermission
-from .workspace_group_response_model import WorkspaceGroupResponseModel
from .workspace_resource_type import WorkspaceResourceType
from .workspace_webhook_list_response_model import WorkspaceWebhookListResponseModel
from .workspace_webhook_response_model import WorkspaceWebhookResponseModel
@@ -816,8 +815,10 @@
"AudioOutput",
"AudioOutputMulti",
"AudioWithTimestampsResponse",
+ "AuthConnectionLocator",
"AuthSettings",
"AuthorizationMethod",
+ "BadRequestErrorBody",
"BanReasonType",
"BatchCallDetailedResponse",
"BatchCallRecipientStatus",
@@ -845,7 +846,6 @@
"BodyEditProjectContentV1ProjectsProjectIdContentPost",
"BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostAge",
"BodyGenerateARandomVoiceV1VoiceGenerationGenerateVoicePostGender",
- "BodyRetrieveVoiceSampleAudioV1VoicesPvcVoiceIdSamplesSampleIdAudioGet",
"BodyStreamChapterAudioV1ProjectsProjectIdChaptersChapterIdSnapshotsChapterSnapshotIdStreamPost",
"BodyStreamProjectAudioV1ProjectsProjectIdSnapshotsProjectSnapshotIdStreamPost",
"BreakdownTypes",
@@ -962,7 +962,6 @@
"DashboardCriteriaChartModel",
"DashboardDataCollectionChartModel",
"DataCollectionResultCommonModel",
- "DefaultSharingPreferencesResponseModel",
"DeleteChapterRequest",
"DeleteChapterResponseModel",
"DeleteDubbingResponseModel",
@@ -1174,6 +1173,7 @@
"PdfExportOptions",
"PhoneNumberAgentInfo",
"PhoneNumberTransfer",
+ "PlayDtmfToolConfig",
"PodcastBulletinMode",
"PodcastBulletinModeData",
"PodcastConversationMode",
@@ -1308,6 +1308,7 @@
"SystemToolConfigInputParams",
"SystemToolConfigInputParams_EndCall",
"SystemToolConfigInputParams_LanguageDetection",
+ "SystemToolConfigInputParams_PlayKeypadTouchTone",
"SystemToolConfigInputParams_SkipTurn",
"SystemToolConfigInputParams_TransferToAgent",
"SystemToolConfigInputParams_TransferToNumber",
@@ -1315,6 +1316,7 @@
"SystemToolConfigOutputParams",
"SystemToolConfigOutputParams_EndCall",
"SystemToolConfigOutputParams_LanguageDetection",
+ "SystemToolConfigOutputParams_PlayKeypadTouchTone",
"SystemToolConfigOutputParams_SkipTurn",
"SystemToolConfigOutputParams_TransferToAgent",
"SystemToolConfigOutputParams_TransferToNumber",
@@ -1420,8 +1422,6 @@
"WidgetTextContents",
"WorkspaceBatchCallsResponse",
"WorkspaceGroupByNameResponseModel",
- "WorkspaceGroupPermission",
- "WorkspaceGroupResponseModel",
"WorkspaceResourceType",
"WorkspaceWebhookListResponseModel",
"WorkspaceWebhookResponseModel",
diff --git a/src/elevenlabs/types/add_project_request.py b/src/elevenlabs/types/add_project_request.py
index b3d480e6..c44f47f8 100644
--- a/src/elevenlabs/types/add_project_request.py
+++ b/src/elevenlabs/types/add_project_request.py
@@ -46,7 +46,12 @@ class AddProjectRequest(UncheckedBaseModel):
from_content_json: typing.Optional[str] = pydantic.Field(default=None)
"""
- An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.
+
+ An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.
+
+ Example:
+ [{"name": "Chapter A", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "A", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "B", "type": "tts_node"}]}, {"sub_type": "h1", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "C", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "D", "type": "tts_node"}]}]}, {"name": "Chapter B", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "E", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "F", "type": "tts_node"}]}, {"sub_type": "h2", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "G", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "H", "type": "tts_node"}]}]}]
+
"""
quality_preset: typing.Optional[str] = pydantic.Field(default=None)
diff --git a/src/elevenlabs/types/workspace_group_response_model.py b/src/elevenlabs/types/auth_connection_locator.py
similarity index 66%
rename from src/elevenlabs/types/workspace_group_response_model.py
rename to src/elevenlabs/types/auth_connection_locator.py
index 9d182db1..386cffa8 100644
--- a/src/elevenlabs/types/workspace_group_response_model.py
+++ b/src/elevenlabs/types/auth_connection_locator.py
@@ -5,14 +5,14 @@
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
-from .workspace_group_permission import WorkspaceGroupPermission
-class WorkspaceGroupResponseModel(UncheckedBaseModel):
- name: str
- id: str
- members: typing.List[str]
- permissions: typing.Optional[typing.List[WorkspaceGroupPermission]] = None
+class AuthConnectionLocator(UncheckedBaseModel):
+ """
+ Used to reference an auth connection from the workspace's auth connection store.
+ """
+
+ auth_connection_id: str
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/elevenlabs/types/body_retrieve_voice_sample_audio_v_1_voices_pvc_voice_id_samples_sample_id_audio_get.py b/src/elevenlabs/types/bad_request_error_body.py
similarity index 57%
rename from src/elevenlabs/types/body_retrieve_voice_sample_audio_v_1_voices_pvc_voice_id_samples_sample_id_audio_get.py
rename to src/elevenlabs/types/bad_request_error_body.py
index 9a7221d6..e4025348 100644
--- a/src/elevenlabs/types/body_retrieve_voice_sample_audio_v_1_voices_pvc_voice_id_samples_sample_id_audio_get.py
+++ b/src/elevenlabs/types/bad_request_error_body.py
@@ -7,11 +7,9 @@
from ..core.unchecked_base_model import UncheckedBaseModel
-class BodyRetrieveVoiceSampleAudioV1VoicesPvcVoiceIdSamplesSampleIdAudioGet(UncheckedBaseModel):
- remove_background_noise: typing.Optional[bool] = pydantic.Field(default=None)
- """
- If set will remove background noise for voice samples using our audio isolation model. If the samples do not include background noise, it can make the quality worse.
- """
+class BadRequestErrorBody(UncheckedBaseModel):
+ error: typing.Optional[str] = None
+ message: typing.Optional[str] = None
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
diff --git a/src/elevenlabs/types/body_add_project_v_1_projects_add_post_source_type.py b/src/elevenlabs/types/body_add_project_v_1_projects_add_post_source_type.py
index a8aca7b8..9879b4f0 100644
--- a/src/elevenlabs/types/body_add_project_v_1_projects_add_post_source_type.py
+++ b/src/elevenlabs/types/body_add_project_v_1_projects_add_post_source_type.py
@@ -3,5 +3,5 @@
import typing
BodyAddProjectV1ProjectsAddPostSourceType = typing.Union[
- typing.Literal["blank", "book", "article", "genfm"], typing.Any
+ typing.Literal["blank", "book", "article", "genfm", "video"], typing.Any
]
diff --git a/src/elevenlabs/types/body_edit_project_content_v_1_projects_project_id_content_post.py b/src/elevenlabs/types/body_edit_project_content_v_1_projects_project_id_content_post.py
index a23dc627..8e2f94e4 100644
--- a/src/elevenlabs/types/body_edit_project_content_v_1_projects_project_id_content_post.py
+++ b/src/elevenlabs/types/body_edit_project_content_v_1_projects_project_id_content_post.py
@@ -18,6 +18,16 @@ class BodyEditProjectContentV1ProjectsProjectIdContentPost(UncheckedBaseModel):
An optional .epub, .pdf, .txt or similar file can be provided. If provided, we will initialize the Studio project with its content. If this is set, 'from_url' and 'from_content' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.
"""
+ from_content_json: typing.Optional[str] = pydantic.Field(default=None)
+ """
+
+ An optional content to initialize the Studio project with. If this is set, 'from_url' and 'from_document' must be null. If neither 'from_url', 'from_document', 'from_content' are provided we will initialize the Studio project as blank.
+
+ Example:
+ [{"name": "Chapter A", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "A", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "B", "type": "tts_node"}]}, {"sub_type": "h1", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "C", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "D", "type": "tts_node"}]}]}, {"name": "Chapter B", "blocks": [{"sub_type": "p", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "E", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "F", "type": "tts_node"}]}, {"sub_type": "h2", "nodes": [{"voice_id": "6lCwbsX1yVjD49QmpkT0", "text": "G", "type": "tts_node"}, {"voice_id": "6lCwbsX1yVjD49QmpkT1", "text": "H", "type": "tts_node"}]}]}]
+
+ """
+
auto_convert: typing.Optional[bool] = pydantic.Field(default=None)
"""
Whether to auto convert the Studio project to audio or not.
diff --git a/src/elevenlabs/types/breakdown_types.py b/src/elevenlabs/types/breakdown_types.py
index 53e674d4..920a0fdd 100644
--- a/src/elevenlabs/types/breakdown_types.py
+++ b/src/elevenlabs/types/breakdown_types.py
@@ -15,6 +15,8 @@
"model",
"resource",
"request_queue",
+ "region",
+ "subresource_id",
],
typing.Any,
]
diff --git a/src/elevenlabs/types/built_in_tools_input.py b/src/elevenlabs/types/built_in_tools_input.py
index a9929a33..44e64d13 100644
--- a/src/elevenlabs/types/built_in_tools_input.py
+++ b/src/elevenlabs/types/built_in_tools_input.py
@@ -34,6 +34,11 @@ class BuiltInToolsInput(UncheckedBaseModel):
The skip turn tool
"""
+ play_keypad_touch_tone: typing.Optional[SystemToolConfigInput] = pydantic.Field(default=None)
+ """
+ The play DTMF tool
+ """
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/elevenlabs/types/built_in_tools_output.py b/src/elevenlabs/types/built_in_tools_output.py
index d5d688e7..830946c3 100644
--- a/src/elevenlabs/types/built_in_tools_output.py
+++ b/src/elevenlabs/types/built_in_tools_output.py
@@ -34,6 +34,11 @@ class BuiltInToolsOutput(UncheckedBaseModel):
The skip turn tool
"""
+ play_keypad_touch_tone: typing.Optional[SystemToolConfigOutput] = pydantic.Field(default=None)
+ """
+ The play DTMF tool
+ """
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/elevenlabs/types/chapter_response.py b/src/elevenlabs/types/chapter_response.py
index fed8acdd..92cbd96d 100644
--- a/src/elevenlabs/types/chapter_response.py
+++ b/src/elevenlabs/types/chapter_response.py
@@ -40,6 +40,11 @@ class ChapterResponse(UncheckedBaseModel):
The state of the chapter.
"""
+ has_video: typing.Optional[bool] = pydantic.Field(default=None)
+ """
+ Whether the chapter has a video.
+ """
+
statistics: typing.Optional[ChapterStatisticsResponse] = pydantic.Field(default=None)
"""
The statistics of the chapter.
diff --git a/src/elevenlabs/types/chapter_with_content_response_model.py b/src/elevenlabs/types/chapter_with_content_response_model.py
index eb049370..e1e18bc9 100644
--- a/src/elevenlabs/types/chapter_with_content_response_model.py
+++ b/src/elevenlabs/types/chapter_with_content_response_model.py
@@ -41,6 +41,11 @@ class ChapterWithContentResponseModel(UncheckedBaseModel):
The state of the chapter.
"""
+ has_video: typing.Optional[bool] = pydantic.Field(default=None)
+ """
+ Whether the chapter has a video.
+ """
+
statistics: typing.Optional[ChapterStatisticsResponse] = pydantic.Field(default=None)
"""
The statistics of the chapter.
diff --git a/src/elevenlabs/types/metric_type.py b/src/elevenlabs/types/metric_type.py
index 5263d4b3..71ecdc70 100644
--- a/src/elevenlabs/types/metric_type.py
+++ b/src/elevenlabs/types/metric_type.py
@@ -3,5 +3,8 @@
import typing
MetricType = typing.Union[
- typing.Literal["credits", "minutes_used", "request_count", "ttfb_avg", "ttfb_p95", "fiat_units_spent"], typing.Any
+ typing.Literal[
+ "credits", "minutes_used", "request_count", "ttfb_avg", "ttfb_p95", "fiat_units_spent", "concurrency"
+ ],
+ typing.Any,
]
diff --git a/src/elevenlabs/types/default_sharing_preferences_response_model.py b/src/elevenlabs/types/play_dtmf_tool_config.py
similarity index 64%
rename from src/elevenlabs/types/default_sharing_preferences_response_model.py
rename to src/elevenlabs/types/play_dtmf_tool_config.py
index c8206922..a6648789 100644
--- a/src/elevenlabs/types/default_sharing_preferences_response_model.py
+++ b/src/elevenlabs/types/play_dtmf_tool_config.py
@@ -5,13 +5,14 @@
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2
from ..core.unchecked_base_model import UncheckedBaseModel
-from .workspace_group_response_model import WorkspaceGroupResponseModel
-class DefaultSharingPreferencesResponseModel(UncheckedBaseModel):
- default_sharing_groups: typing.List[WorkspaceGroupResponseModel] = pydantic.Field()
+class PlayDtmfToolConfig(UncheckedBaseModel):
"""
- List of groups that the user shares with by default
+ Allows the agent to play DTMF tones during a phone call.
+
+ This tool can be used to interact with automated phone systems, such as
+ navigating phone menus, entering extensions, or inputting numeric codes.
"""
if IS_PYDANTIC_V2:
diff --git a/src/elevenlabs/types/project_extended_response.py b/src/elevenlabs/types/project_extended_response.py
index bd795ac8..8b35e9ca 100644
--- a/src/elevenlabs/types/project_extended_response.py
+++ b/src/elevenlabs/types/project_extended_response.py
@@ -184,9 +184,9 @@ class ProjectExtendedResponse(UncheckedBaseModel):
Whether text normalization is applied to the project.
"""
- experimental: typing.Dict[str, typing.Optional[typing.Any]] = pydantic.Field()
+ experimental: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]] = pydantic.Field(default=None)
"""
- Experimental features of the project.
+ Experimental features for the project.
"""
if IS_PYDANTIC_V2:
diff --git a/src/elevenlabs/types/project_extended_response_model_source_type.py b/src/elevenlabs/types/project_extended_response_model_source_type.py
index 9abb8c76..5d541ccb 100644
--- a/src/elevenlabs/types/project_extended_response_model_source_type.py
+++ b/src/elevenlabs/types/project_extended_response_model_source_type.py
@@ -2,4 +2,6 @@
import typing
-ProjectExtendedResponseModelSourceType = typing.Union[typing.Literal["blank", "book", "article", "genfm"], typing.Any]
+ProjectExtendedResponseModelSourceType = typing.Union[
+ typing.Literal["blank", "book", "article", "genfm", "video"], typing.Any
+]
diff --git a/src/elevenlabs/types/project_response_model_source_type.py b/src/elevenlabs/types/project_response_model_source_type.py
index 63c40537..4638e799 100644
--- a/src/elevenlabs/types/project_response_model_source_type.py
+++ b/src/elevenlabs/types/project_response_model_source_type.py
@@ -2,4 +2,4 @@
import typing
-ProjectResponseModelSourceType = typing.Union[typing.Literal["blank", "book", "article", "genfm"], typing.Any]
+ProjectResponseModelSourceType = typing.Union[typing.Literal["blank", "book", "article", "genfm", "video"], typing.Any]
diff --git a/src/elevenlabs/types/system_tool_config_input_params.py b/src/elevenlabs/types/system_tool_config_input_params.py
index 10c73c81..d962d2e6 100644
--- a/src/elevenlabs/types/system_tool_config_input_params.py
+++ b/src/elevenlabs/types/system_tool_config_input_params.py
@@ -38,6 +38,19 @@ class Config:
extra = pydantic.Extra.allow
+class SystemToolConfigInputParams_PlayKeypadTouchTone(UncheckedBaseModel):
+ system_tool_type: typing.Literal["play_keypad_touch_tone"] = "play_keypad_touch_tone"
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
class SystemToolConfigInputParams_SkipTurn(UncheckedBaseModel):
system_tool_type: typing.Literal["skip_turn"] = "skip_turn"
@@ -84,6 +97,7 @@ class Config:
typing.Union[
SystemToolConfigInputParams_EndCall,
SystemToolConfigInputParams_LanguageDetection,
+ SystemToolConfigInputParams_PlayKeypadTouchTone,
SystemToolConfigInputParams_SkipTurn,
SystemToolConfigInputParams_TransferToAgent,
SystemToolConfigInputParams_TransferToNumber,
diff --git a/src/elevenlabs/types/system_tool_config_output_params.py b/src/elevenlabs/types/system_tool_config_output_params.py
index bb7b787b..aa4a750d 100644
--- a/src/elevenlabs/types/system_tool_config_output_params.py
+++ b/src/elevenlabs/types/system_tool_config_output_params.py
@@ -38,6 +38,19 @@ class Config:
extra = pydantic.Extra.allow
+class SystemToolConfigOutputParams_PlayKeypadTouchTone(UncheckedBaseModel):
+ system_tool_type: typing.Literal["play_keypad_touch_tone"] = "play_keypad_touch_tone"
+
+ if IS_PYDANTIC_V2:
+ model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
+ else:
+
+ class Config:
+ frozen = True
+ smart_union = True
+ extra = pydantic.Extra.allow
+
+
class SystemToolConfigOutputParams_SkipTurn(UncheckedBaseModel):
system_tool_type: typing.Literal["skip_turn"] = "skip_turn"
@@ -84,6 +97,7 @@ class Config:
typing.Union[
SystemToolConfigOutputParams_EndCall,
SystemToolConfigOutputParams_LanguageDetection,
+ SystemToolConfigOutputParams_PlayKeypadTouchTone,
SystemToolConfigOutputParams_SkipTurn,
SystemToolConfigOutputParams_TransferToAgent,
SystemToolConfigOutputParams_TransferToNumber,
diff --git a/src/elevenlabs/types/webhook_tool_api_schema_config_input.py b/src/elevenlabs/types/webhook_tool_api_schema_config_input.py
index a99ef1ed..6302ba1d 100644
--- a/src/elevenlabs/types/webhook_tool_api_schema_config_input.py
+++ b/src/elevenlabs/types/webhook_tool_api_schema_config_input.py
@@ -7,6 +7,7 @@
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs
from ..core.unchecked_base_model import UncheckedBaseModel
+from .auth_connection_locator import AuthConnectionLocator
from .literal_json_schema_property import LiteralJsonSchemaProperty
from .query_params_json_schema import QueryParamsJsonSchema
from .webhook_tool_api_schema_config_input_method import WebhookToolApiSchemaConfigInputMethod
@@ -52,6 +53,11 @@ class WebhookToolApiSchemaConfigInput(UncheckedBaseModel):
Headers that should be included in the request
"""
+ auth_connection: typing.Optional[AuthConnectionLocator] = pydantic.Field(default=None)
+ """
+ Optional auth connection to use for authentication with this webhook
+ """
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/elevenlabs/types/webhook_tool_api_schema_config_output.py b/src/elevenlabs/types/webhook_tool_api_schema_config_output.py
index c6558c53..a25fd5e6 100644
--- a/src/elevenlabs/types/webhook_tool_api_schema_config_output.py
+++ b/src/elevenlabs/types/webhook_tool_api_schema_config_output.py
@@ -7,6 +7,7 @@
import pydantic
from ..core.pydantic_utilities import IS_PYDANTIC_V2, update_forward_refs
from ..core.unchecked_base_model import UncheckedBaseModel
+from .auth_connection_locator import AuthConnectionLocator
from .literal_json_schema_property import LiteralJsonSchemaProperty
from .query_params_json_schema import QueryParamsJsonSchema
from .webhook_tool_api_schema_config_output_method import WebhookToolApiSchemaConfigOutputMethod
@@ -52,6 +53,11 @@ class WebhookToolApiSchemaConfigOutput(UncheckedBaseModel):
Headers that should be included in the request
"""
+ auth_connection: typing.Optional[AuthConnectionLocator] = pydantic.Field(default=None)
+ """
+ Optional auth connection to use for authentication with this webhook
+ """
+
if IS_PYDANTIC_V2:
model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
else:
diff --git a/src/elevenlabs/types/workspace_group_permission.py b/src/elevenlabs/types/workspace_group_permission.py
deleted file mode 100644
index 8a1f1047..00000000
--- a/src/elevenlabs/types/workspace_group_permission.py
+++ /dev/null
@@ -1,25 +0,0 @@
-# This file was auto-generated by Fern from our API Definition.
-
-import typing
-
-WorkspaceGroupPermission = typing.Union[
- typing.Literal[
- "text_to_speech",
- "speech_to_speech",
- "voice_lab",
- "sound_effects",
- "projects",
- "voiceover_studio",
- "dubbing",
- "audio_native",
- "conversational_ai",
- "voice_isolator",
- "ai_speech_classifier",
- "add_voice_from_voice_library",
- "create_instant_voice_clone",
- "create_professional_voice_clone",
- "create_user_api_key",
- "publish_studio_project",
- ],
- typing.Any,
-]
diff --git a/src/elevenlabs/types/workspace_resource_type.py b/src/elevenlabs/types/workspace_resource_type.py
index 857bd9eb..b8d65ad5 100644
--- a/src/elevenlabs/types/workspace_resource_type.py
+++ b/src/elevenlabs/types/workspace_resource_type.py
@@ -14,6 +14,7 @@
"convai_tools",
"convai_settings",
"convai_secrets",
+ "workspace_auth_connections",
"music_latent",
"convai_phone_numbers",
"convai_mcp_servers",
diff --git a/src/elevenlabs/voices/pvc/samples/audio/client.py b/src/elevenlabs/voices/pvc/samples/audio/client.py
index e9b91787..d13f9371 100644
--- a/src/elevenlabs/voices/pvc/samples/audio/client.py
+++ b/src/elevenlabs/voices/pvc/samples/audio/client.py
@@ -24,7 +24,12 @@ def with_raw_response(self) -> RawAudioClient:
return self._raw_client
def get(
- self, voice_id: str, sample_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ self,
+ voice_id: str,
+ sample_id: str,
+ *,
+ remove_background_noise: typing.Optional[bool] = None,
+ request_options: typing.Optional[RequestOptions] = None,
) -> VoiceSamplePreviewResponseModel:
"""
Retrieve the first 30 seconds of voice sample audio with or without noise removal.
@@ -37,6 +42,9 @@ def get(
sample_id : str
Sample ID to be used
+ remove_background_noise : typing.Optional[bool]
+ If set will remove background noise for voice samples using our audio isolation model. If the samples do not include background noise, it can make the quality worse.
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -55,9 +63,12 @@ def get(
client.voices.pvc.samples.audio.get(
voice_id="21m00Tcm4TlvDq8ikWAM",
sample_id="VW7YKqPnjY4h39yTbx2L",
+ remove_background_noise=True,
)
"""
- _response = self._raw_client.get(voice_id, sample_id, request_options=request_options)
+ _response = self._raw_client.get(
+ voice_id, sample_id, remove_background_noise=remove_background_noise, request_options=request_options
+ )
return _response.data
@@ -77,7 +88,12 @@ def with_raw_response(self) -> AsyncRawAudioClient:
return self._raw_client
async def get(
- self, voice_id: str, sample_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ self,
+ voice_id: str,
+ sample_id: str,
+ *,
+ remove_background_noise: typing.Optional[bool] = None,
+ request_options: typing.Optional[RequestOptions] = None,
) -> VoiceSamplePreviewResponseModel:
"""
Retrieve the first 30 seconds of voice sample audio with or without noise removal.
@@ -90,6 +106,9 @@ async def get(
sample_id : str
Sample ID to be used
+ remove_background_noise : typing.Optional[bool]
+ If set will remove background noise for voice samples using our audio isolation model. If the samples do not include background noise, it can make the quality worse.
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -113,10 +132,13 @@ async def main() -> None:
await client.voices.pvc.samples.audio.get(
voice_id="21m00Tcm4TlvDq8ikWAM",
sample_id="VW7YKqPnjY4h39yTbx2L",
+ remove_background_noise=True,
)
asyncio.run(main())
"""
- _response = await self._raw_client.get(voice_id, sample_id, request_options=request_options)
+ _response = await self._raw_client.get(
+ voice_id, sample_id, remove_background_noise=remove_background_noise, request_options=request_options
+ )
return _response.data
diff --git a/src/elevenlabs/voices/pvc/samples/audio/raw_client.py b/src/elevenlabs/voices/pvc/samples/audio/raw_client.py
index 6b8558a8..29f5952d 100644
--- a/src/elevenlabs/voices/pvc/samples/audio/raw_client.py
+++ b/src/elevenlabs/voices/pvc/samples/audio/raw_client.py
@@ -19,7 +19,12 @@ def __init__(self, *, client_wrapper: SyncClientWrapper):
self._client_wrapper = client_wrapper
def get(
- self, voice_id: str, sample_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ self,
+ voice_id: str,
+ sample_id: str,
+ *,
+ remove_background_noise: typing.Optional[bool] = None,
+ request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[VoiceSamplePreviewResponseModel]:
"""
Retrieve the first 30 seconds of voice sample audio with or without noise removal.
@@ -32,6 +37,9 @@ def get(
sample_id : str
Sample ID to be used
+ remove_background_noise : typing.Optional[bool]
+ If set will remove background noise for voice samples using our audio isolation model. If the samples do not include background noise, it can make the quality worse.
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -44,6 +52,9 @@ def get(
f"v1/voices/pvc/{jsonable_encoder(voice_id)}/samples/{jsonable_encoder(sample_id)}/audio",
base_url=self._client_wrapper.get_environment().base,
method="GET",
+ params={
+ "remove_background_noise": remove_background_noise,
+ },
request_options=request_options,
)
try:
@@ -78,7 +89,12 @@ def __init__(self, *, client_wrapper: AsyncClientWrapper):
self._client_wrapper = client_wrapper
async def get(
- self, voice_id: str, sample_id: str, *, request_options: typing.Optional[RequestOptions] = None
+ self,
+ voice_id: str,
+ sample_id: str,
+ *,
+ remove_background_noise: typing.Optional[bool] = None,
+ request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[VoiceSamplePreviewResponseModel]:
"""
Retrieve the first 30 seconds of voice sample audio with or without noise removal.
@@ -91,6 +107,9 @@ async def get(
sample_id : str
Sample ID to be used
+ remove_background_noise : typing.Optional[bool]
+ If set will remove background noise for voice samples using our audio isolation model. If the samples do not include background noise, it can make the quality worse.
+
request_options : typing.Optional[RequestOptions]
Request-specific configuration.
@@ -103,6 +122,9 @@ async def get(
f"v1/voices/pvc/{jsonable_encoder(voice_id)}/samples/{jsonable_encoder(sample_id)}/audio",
base_url=self._client_wrapper.get_environment().base,
method="GET",
+ params={
+ "remove_background_noise": remove_background_noise,
+ },
request_options=request_options,
)
try:
diff --git a/src/elevenlabs/workspace/client.py b/src/elevenlabs/workspace/client.py
index 89d6e58a..e896af3c 100644
--- a/src/elevenlabs/workspace/client.py
+++ b/src/elevenlabs/workspace/client.py
@@ -1,20 +1,12 @@
# This file was auto-generated by Fern from our API Definition.
-import typing
-
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from ..core.request_options import RequestOptions
-from ..types.default_sharing_preferences_response_model import DefaultSharingPreferencesResponseModel
-from ..types.share_option_response_model import ShareOptionResponseModel
from .groups.client import AsyncGroupsClient, GroupsClient
from .invites.client import AsyncInvitesClient, InvitesClient
from .members.client import AsyncMembersClient, MembersClient
from .raw_client import AsyncRawWorkspaceClient, RawWorkspaceClient
from .resources.client import AsyncResourcesClient, ResourcesClient
-# this is used as the default value for optional parameters
-OMIT = typing.cast(typing.Any, ...)
-
class WorkspaceClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
@@ -38,129 +30,6 @@ def with_raw_response(self) -> RawWorkspaceClient:
"""
return self._raw_client
- def update_user_auto_provisioning(
- self, *, enabled: bool, request_options: typing.Optional[RequestOptions] = None
- ) -> typing.Optional[typing.Any]:
- """
- Update user auto provisioning settings for the workspace.
-
- Parameters
- ----------
- enabled : bool
-
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- typing.Optional[typing.Any]
- Successful Response
-
- Examples
- --------
- from elevenlabs import ElevenLabs
-
- client = ElevenLabs(
- api_key="YOUR_API_KEY",
- )
- client.workspace.update_user_auto_provisioning(
- enabled=True,
- )
- """
- _response = self._raw_client.update_user_auto_provisioning(enabled=enabled, request_options=request_options)
- return _response.data
-
- def get_default_sharing_preferences(
- self, *, request_options: typing.Optional[RequestOptions] = None
- ) -> DefaultSharingPreferencesResponseModel:
- """
- Get the user's default sharing preferences.
-
- Parameters
- ----------
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- DefaultSharingPreferencesResponseModel
- Successful Response
-
- Examples
- --------
- from elevenlabs import ElevenLabs
-
- client = ElevenLabs(
- api_key="YOUR_API_KEY",
- )
- client.workspace.get_default_sharing_preferences()
- """
- _response = self._raw_client.get_default_sharing_preferences(request_options=request_options)
- return _response.data
-
- def update_default_sharing_preferences(
- self, *, default_sharing_groups: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None
- ) -> typing.Optional[typing.Any]:
- """
- Update the user's default sharing preferences.
-
- Parameters
- ----------
- default_sharing_groups : typing.Sequence[str]
- List of group IDs to share with by default
-
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- typing.Optional[typing.Any]
- Successful Response
-
- Examples
- --------
- from elevenlabs import ElevenLabs
-
- client = ElevenLabs(
- api_key="YOUR_API_KEY",
- )
- client.workspace.update_default_sharing_preferences(
- default_sharing_groups=["default_sharing_groups"],
- )
- """
- _response = self._raw_client.update_default_sharing_preferences(
- default_sharing_groups=default_sharing_groups, request_options=request_options
- )
- return _response.data
-
- def get_share_options(
- self, *, request_options: typing.Optional[RequestOptions] = None
- ) -> typing.List[ShareOptionResponseModel]:
- """
- Get the share options for a workspace.
-
- Parameters
- ----------
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- typing.List[ShareOptionResponseModel]
- Successful Response
-
- Examples
- --------
- from elevenlabs import ElevenLabs
-
- client = ElevenLabs(
- api_key="YOUR_API_KEY",
- )
- client.workspace.get_share_options()
- """
- _response = self._raw_client.get_share_options(request_options=request_options)
- return _response.data
-
class AsyncWorkspaceClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
@@ -183,160 +52,3 @@ def with_raw_response(self) -> AsyncRawWorkspaceClient:
AsyncRawWorkspaceClient
"""
return self._raw_client
-
- async def update_user_auto_provisioning(
- self, *, enabled: bool, request_options: typing.Optional[RequestOptions] = None
- ) -> typing.Optional[typing.Any]:
- """
- Update user auto provisioning settings for the workspace.
-
- Parameters
- ----------
- enabled : bool
-
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- typing.Optional[typing.Any]
- Successful Response
-
- Examples
- --------
- import asyncio
-
- from elevenlabs import AsyncElevenLabs
-
- client = AsyncElevenLabs(
- api_key="YOUR_API_KEY",
- )
-
-
- async def main() -> None:
- await client.workspace.update_user_auto_provisioning(
- enabled=True,
- )
-
-
- asyncio.run(main())
- """
- _response = await self._raw_client.update_user_auto_provisioning(
- enabled=enabled, request_options=request_options
- )
- return _response.data
-
- async def get_default_sharing_preferences(
- self, *, request_options: typing.Optional[RequestOptions] = None
- ) -> DefaultSharingPreferencesResponseModel:
- """
- Get the user's default sharing preferences.
-
- Parameters
- ----------
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- DefaultSharingPreferencesResponseModel
- Successful Response
-
- Examples
- --------
- import asyncio
-
- from elevenlabs import AsyncElevenLabs
-
- client = AsyncElevenLabs(
- api_key="YOUR_API_KEY",
- )
-
-
- async def main() -> None:
- await client.workspace.get_default_sharing_preferences()
-
-
- asyncio.run(main())
- """
- _response = await self._raw_client.get_default_sharing_preferences(request_options=request_options)
- return _response.data
-
- async def update_default_sharing_preferences(
- self, *, default_sharing_groups: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None
- ) -> typing.Optional[typing.Any]:
- """
- Update the user's default sharing preferences.
-
- Parameters
- ----------
- default_sharing_groups : typing.Sequence[str]
- List of group IDs to share with by default
-
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- typing.Optional[typing.Any]
- Successful Response
-
- Examples
- --------
- import asyncio
-
- from elevenlabs import AsyncElevenLabs
-
- client = AsyncElevenLabs(
- api_key="YOUR_API_KEY",
- )
-
-
- async def main() -> None:
- await client.workspace.update_default_sharing_preferences(
- default_sharing_groups=["default_sharing_groups"],
- )
-
-
- asyncio.run(main())
- """
- _response = await self._raw_client.update_default_sharing_preferences(
- default_sharing_groups=default_sharing_groups, request_options=request_options
- )
- return _response.data
-
- async def get_share_options(
- self, *, request_options: typing.Optional[RequestOptions] = None
- ) -> typing.List[ShareOptionResponseModel]:
- """
- Get the share options for a workspace.
-
- Parameters
- ----------
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- typing.List[ShareOptionResponseModel]
- Successful Response
-
- Examples
- --------
- import asyncio
-
- from elevenlabs import AsyncElevenLabs
-
- client = AsyncElevenLabs(
- api_key="YOUR_API_KEY",
- )
-
-
- async def main() -> None:
- await client.workspace.get_share_options()
-
-
- asyncio.run(main())
- """
- _response = await self._raw_client.get_share_options(request_options=request_options)
- return _response.data
diff --git a/src/elevenlabs/workspace/raw_client.py b/src/elevenlabs/workspace/raw_client.py
index 90263396..b33dafd0 100644
--- a/src/elevenlabs/workspace/raw_client.py
+++ b/src/elevenlabs/workspace/raw_client.py
@@ -1,457 +1,13 @@
# This file was auto-generated by Fern from our API Definition.
-import typing
-from json.decoder import JSONDecodeError
-
-from ..core.api_error import ApiError
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
-from ..core.http_response import AsyncHttpResponse, HttpResponse
-from ..core.request_options import RequestOptions
-from ..core.unchecked_base_model import construct_type
-from ..errors.unprocessable_entity_error import UnprocessableEntityError
-from ..types.default_sharing_preferences_response_model import DefaultSharingPreferencesResponseModel
-from ..types.http_validation_error import HttpValidationError
-from ..types.share_option_response_model import ShareOptionResponseModel
-
-# this is used as the default value for optional parameters
-OMIT = typing.cast(typing.Any, ...)
class RawWorkspaceClient:
def __init__(self, *, client_wrapper: SyncClientWrapper):
self._client_wrapper = client_wrapper
- def update_user_auto_provisioning(
- self, *, enabled: bool, request_options: typing.Optional[RequestOptions] = None
- ) -> HttpResponse[typing.Optional[typing.Any]]:
- """
- Update user auto provisioning settings for the workspace.
-
- Parameters
- ----------
- enabled : bool
-
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- HttpResponse[typing.Optional[typing.Any]]
- Successful Response
- """
- _response = self._client_wrapper.httpx_client.request(
- "v1/workspace/user-auto-provisioning",
- base_url=self._client_wrapper.get_environment().base,
- method="POST",
- json={
- "enabled": enabled,
- },
- headers={
- "content-type": "application/json",
- },
- request_options=request_options,
- omit=OMIT,
- )
- try:
- if _response is None or not _response.text.strip():
- return HttpResponse(response=_response, data=None)
- if 200 <= _response.status_code < 300:
- _data = typing.cast(
- typing.Optional[typing.Any],
- construct_type(
- type_=typing.Optional[typing.Any], # type: ignore
- object_=_response.json(),
- ),
- )
- return HttpResponse(response=_response, data=_data)
- if _response.status_code == 422:
- raise UnprocessableEntityError(
- headers=dict(_response.headers),
- body=typing.cast(
- HttpValidationError,
- construct_type(
- type_=HttpValidationError, # type: ignore
- object_=_response.json(),
- ),
- ),
- )
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
-
- def get_default_sharing_preferences(
- self, *, request_options: typing.Optional[RequestOptions] = None
- ) -> HttpResponse[DefaultSharingPreferencesResponseModel]:
- """
- Get the user's default sharing preferences.
-
- Parameters
- ----------
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- HttpResponse[DefaultSharingPreferencesResponseModel]
- Successful Response
- """
- _response = self._client_wrapper.httpx_client.request(
- "v1/workspace/default-sharing-preferences",
- base_url=self._client_wrapper.get_environment().base,
- method="GET",
- request_options=request_options,
- )
- try:
- if 200 <= _response.status_code < 300:
- _data = typing.cast(
- DefaultSharingPreferencesResponseModel,
- construct_type(
- type_=DefaultSharingPreferencesResponseModel, # type: ignore
- object_=_response.json(),
- ),
- )
- return HttpResponse(response=_response, data=_data)
- if _response.status_code == 422:
- raise UnprocessableEntityError(
- headers=dict(_response.headers),
- body=typing.cast(
- HttpValidationError,
- construct_type(
- type_=HttpValidationError, # type: ignore
- object_=_response.json(),
- ),
- ),
- )
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
-
- def update_default_sharing_preferences(
- self, *, default_sharing_groups: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None
- ) -> HttpResponse[typing.Optional[typing.Any]]:
- """
- Update the user's default sharing preferences.
-
- Parameters
- ----------
- default_sharing_groups : typing.Sequence[str]
- List of group IDs to share with by default
-
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- HttpResponse[typing.Optional[typing.Any]]
- Successful Response
- """
- _response = self._client_wrapper.httpx_client.request(
- "v1/workspace/default-sharing-preferences",
- base_url=self._client_wrapper.get_environment().base,
- method="POST",
- json={
- "default_sharing_groups": default_sharing_groups,
- },
- headers={
- "content-type": "application/json",
- },
- request_options=request_options,
- omit=OMIT,
- )
- try:
- if _response is None or not _response.text.strip():
- return HttpResponse(response=_response, data=None)
- if 200 <= _response.status_code < 300:
- _data = typing.cast(
- typing.Optional[typing.Any],
- construct_type(
- type_=typing.Optional[typing.Any], # type: ignore
- object_=_response.json(),
- ),
- )
- return HttpResponse(response=_response, data=_data)
- if _response.status_code == 422:
- raise UnprocessableEntityError(
- headers=dict(_response.headers),
- body=typing.cast(
- HttpValidationError,
- construct_type(
- type_=HttpValidationError, # type: ignore
- object_=_response.json(),
- ),
- ),
- )
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
-
- def get_share_options(
- self, *, request_options: typing.Optional[RequestOptions] = None
- ) -> HttpResponse[typing.List[ShareOptionResponseModel]]:
- """
- Get the share options for a workspace.
-
- Parameters
- ----------
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- HttpResponse[typing.List[ShareOptionResponseModel]]
- Successful Response
- """
- _response = self._client_wrapper.httpx_client.request(
- "v1/workspace/share-options",
- base_url=self._client_wrapper.get_environment().base,
- method="GET",
- request_options=request_options,
- )
- try:
- if 200 <= _response.status_code < 300:
- _data = typing.cast(
- typing.List[ShareOptionResponseModel],
- construct_type(
- type_=typing.List[ShareOptionResponseModel], # type: ignore
- object_=_response.json(),
- ),
- )
- return HttpResponse(response=_response, data=_data)
- if _response.status_code == 422:
- raise UnprocessableEntityError(
- headers=dict(_response.headers),
- body=typing.cast(
- HttpValidationError,
- construct_type(
- type_=HttpValidationError, # type: ignore
- object_=_response.json(),
- ),
- ),
- )
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
-
class AsyncRawWorkspaceClient:
def __init__(self, *, client_wrapper: AsyncClientWrapper):
self._client_wrapper = client_wrapper
-
- async def update_user_auto_provisioning(
- self, *, enabled: bool, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[typing.Optional[typing.Any]]:
- """
- Update user auto provisioning settings for the workspace.
-
- Parameters
- ----------
- enabled : bool
-
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- AsyncHttpResponse[typing.Optional[typing.Any]]
- Successful Response
- """
- _response = await self._client_wrapper.httpx_client.request(
- "v1/workspace/user-auto-provisioning",
- base_url=self._client_wrapper.get_environment().base,
- method="POST",
- json={
- "enabled": enabled,
- },
- headers={
- "content-type": "application/json",
- },
- request_options=request_options,
- omit=OMIT,
- )
- try:
- if _response is None or not _response.text.strip():
- return AsyncHttpResponse(response=_response, data=None)
- if 200 <= _response.status_code < 300:
- _data = typing.cast(
- typing.Optional[typing.Any],
- construct_type(
- type_=typing.Optional[typing.Any], # type: ignore
- object_=_response.json(),
- ),
- )
- return AsyncHttpResponse(response=_response, data=_data)
- if _response.status_code == 422:
- raise UnprocessableEntityError(
- headers=dict(_response.headers),
- body=typing.cast(
- HttpValidationError,
- construct_type(
- type_=HttpValidationError, # type: ignore
- object_=_response.json(),
- ),
- ),
- )
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
-
- async def get_default_sharing_preferences(
- self, *, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[DefaultSharingPreferencesResponseModel]:
- """
- Get the user's default sharing preferences.
-
- Parameters
- ----------
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- AsyncHttpResponse[DefaultSharingPreferencesResponseModel]
- Successful Response
- """
- _response = await self._client_wrapper.httpx_client.request(
- "v1/workspace/default-sharing-preferences",
- base_url=self._client_wrapper.get_environment().base,
- method="GET",
- request_options=request_options,
- )
- try:
- if 200 <= _response.status_code < 300:
- _data = typing.cast(
- DefaultSharingPreferencesResponseModel,
- construct_type(
- type_=DefaultSharingPreferencesResponseModel, # type: ignore
- object_=_response.json(),
- ),
- )
- return AsyncHttpResponse(response=_response, data=_data)
- if _response.status_code == 422:
- raise UnprocessableEntityError(
- headers=dict(_response.headers),
- body=typing.cast(
- HttpValidationError,
- construct_type(
- type_=HttpValidationError, # type: ignore
- object_=_response.json(),
- ),
- ),
- )
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
-
- async def update_default_sharing_preferences(
- self, *, default_sharing_groups: typing.Sequence[str], request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[typing.Optional[typing.Any]]:
- """
- Update the user's default sharing preferences.
-
- Parameters
- ----------
- default_sharing_groups : typing.Sequence[str]
- List of group IDs to share with by default
-
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- AsyncHttpResponse[typing.Optional[typing.Any]]
- Successful Response
- """
- _response = await self._client_wrapper.httpx_client.request(
- "v1/workspace/default-sharing-preferences",
- base_url=self._client_wrapper.get_environment().base,
- method="POST",
- json={
- "default_sharing_groups": default_sharing_groups,
- },
- headers={
- "content-type": "application/json",
- },
- request_options=request_options,
- omit=OMIT,
- )
- try:
- if _response is None or not _response.text.strip():
- return AsyncHttpResponse(response=_response, data=None)
- if 200 <= _response.status_code < 300:
- _data = typing.cast(
- typing.Optional[typing.Any],
- construct_type(
- type_=typing.Optional[typing.Any], # type: ignore
- object_=_response.json(),
- ),
- )
- return AsyncHttpResponse(response=_response, data=_data)
- if _response.status_code == 422:
- raise UnprocessableEntityError(
- headers=dict(_response.headers),
- body=typing.cast(
- HttpValidationError,
- construct_type(
- type_=HttpValidationError, # type: ignore
- object_=_response.json(),
- ),
- ),
- )
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)
-
- async def get_share_options(
- self, *, request_options: typing.Optional[RequestOptions] = None
- ) -> AsyncHttpResponse[typing.List[ShareOptionResponseModel]]:
- """
- Get the share options for a workspace.
-
- Parameters
- ----------
- request_options : typing.Optional[RequestOptions]
- Request-specific configuration.
-
- Returns
- -------
- AsyncHttpResponse[typing.List[ShareOptionResponseModel]]
- Successful Response
- """
- _response = await self._client_wrapper.httpx_client.request(
- "v1/workspace/share-options",
- base_url=self._client_wrapper.get_environment().base,
- method="GET",
- request_options=request_options,
- )
- try:
- if 200 <= _response.status_code < 300:
- _data = typing.cast(
- typing.List[ShareOptionResponseModel],
- construct_type(
- type_=typing.List[ShareOptionResponseModel], # type: ignore
- object_=_response.json(),
- ),
- )
- return AsyncHttpResponse(response=_response, data=_data)
- if _response.status_code == 422:
- raise UnprocessableEntityError(
- headers=dict(_response.headers),
- body=typing.cast(
- HttpValidationError,
- construct_type(
- type_=HttpValidationError, # type: ignore
- object_=_response.json(),
- ),
- ),
- )
- _response_json = _response.json()
- except JSONDecodeError:
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response.text)
- raise ApiError(status_code=_response.status_code, headers=dict(_response.headers), body=_response_json)