Skip to content

Latest commit

 

History

History
7408 lines (5185 loc) · 85.6 KB

File metadata and controls

7408 lines (5185 loc) · 85.6 KB

Reference

Tts Audio

client.tts.audio.speech(...)

📝 Description

Gets the speech data for the given input

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.audio.speech(
    input="input",
    voice_id="voice_id",
)

⚙️ Parameters

input: str

Plain text or SSML to be synthesized to speech. Refer to https://docs.speechify.ai/docs/api-limits for the input size limits. Emotion, Pitch and Speed Rate are configured in the ssml input, please refer to the ssml documentation for more information: https://docs.speechify.ai/docs/ssml#prosody

voice_id: str — Id of the voice to be used for synthesizing speech. Refer to /v1/voices endpoint for available voices

audio_format: typing.Optional[GetSpeechRequestAudioFormat] — The format for the output audio. Note, that the current default is "wav", but there's no guarantee it will not change in the future. We recommend always passing the specific param you expect.

language: typing.Optional[str]

Language of the input. Follow the format of an ISO 639-1 language code and an ISO 3166-1 region code, separated by a hyphen, e.g. en-US. Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support.

model: typing.Optional[GetSpeechRequestModel]

Model used for audio synthesis. simba-base and simba-turbo are deprecated. simba-3.0 is the new streaming-native model with lower TTFB and richer expressivity. Currently English only; multilingual coming soon. Non-English voices return 400 until multilingual support ships.

options: typing.Optional[GetSpeechOptionsRequest]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.audio.stream(...)

📝 Description

Gets the stream speech for the given input

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.audio.stream(
    accept="audio/mpeg",
    input="input",
    voice_id="voice_id",
)

⚙️ Parameters

accept: StreamAudioRequestAccept

input: str

Plain text or SSML to be synthesized to speech. Refer to https://docs.speechify.ai/docs/api-limits for the input size limits. Emotion, Pitch and Speed Rate are configured in the ssml input, please refer to the ssml documentation for more information: https://docs.speechify.ai/docs/ssml#prosody

voice_id: str — Id of the voice to be used for synthesizing speech. Refer to /v1/voices endpoint for available voices

language: typing.Optional[str]

Language of the input. Follow the format of an ISO 639-1 language code and an ISO 3166-1 region code, separated by a hyphen, e.g. en-US. Please refer to the list of the supported languages and recommendations regarding this parameter: https://docs.speechify.ai/docs/language-support.

model: typing.Optional[GetStreamRequestModel]

Model used for audio synthesis. simba-base and simba-turbo are deprecated. simba-3.0 is the new streaming-native model with lower TTFB and richer expressivity. Currently English only; multilingual coming soon. Non-English voices return 400 until multilingual support ships.

options: typing.Optional[GetStreamOptionsRequest]

request_options: typing.Optional[RequestOptions] — Request-specific configuration. You can pass in configuration such as chunk_size, and more to customize the request and response.

Tts Auth

client.tts.auth.create_access_token(...)

📝 Description

WARNING: This endpoint is deprecated. Create a new API token for the logged in user.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.auth.create_access_token(
    grant_type="client_credentials",
)

⚙️ Parameters

grant_type: CreateAccessTokenRequestGrantType — in: body

scope: typing.Optional[CreateAccessTokenRequestScope]

The scope, or a space-delimited list of scopes the token is requested for in: body

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Tts Voices

client.tts.voices.list()

📝 Description

Gets the list of voices available for the user

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.voices.list()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.voices.create(...)

📝 Description

Create a personal (cloned) voice for the user

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.voices.create(
    name="name",
    gender="male",
    consent="consent",
)

⚙️ Parameters

name: str — Name of the personal voice

gender: CreateVoicesRequestGender

Gender marker for the personal voice male GenderMale female GenderFemale notSpecified GenderNotSpecified

sample: `from future import annotations

core.File` — See core.File for more documentation

consent: str

A string representing the user consent information in JSON format This should include the fullName and email of the consenting individual. For example, {"fullName": "John Doe", "email": "john@example.com"}

locale: typing.Optional[str] — Native language (locale) of the personal voice (e.g. en-US, es-ES, etc.)

avatar: `from future import annotations

typing.Optional[core.File]` — See core.File for more documentation

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.voices.delete(...)

📝 Description

Delete a personal (cloned) voice

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.voices.delete(
    id="id",
)

⚙️ Parameters

id: str — The ID of the voice to delete

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.voices.download_sample(...)

📝 Description

Download a personal (cloned) voice sample

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.voices.download_sample(
    id="id",
)

⚙️ Parameters

id: str — The ID of the voice to download sample for

request_options: typing.Optional[RequestOptions] — Request-specific configuration. You can pass in configuration such as chunk_size, and more to customize the request and response.

Tts Agents

client.tts.agents.list()

📝 Description

List voice agents owned by the caller.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.list()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.create(...)

📝 Description

Create a voice agent.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.create(
    name="name",
    voice_id="voice_id",
)

⚙️ Parameters

name: str

voice_id: str — Voice slug from the VMS catalog (see GET /v1/voices). Required — the server rejects writes with an unknown or empty slug.

slug: typing.Optional[str] — Optional. Server derives slug from name with a random suffix when omitted; if you supply your own, a collision returns 400 'slug already taken'.

prompt: typing.Optional[str]

first_message: typing.Optional[str] — Spoken verbatim at session start — no LLM round trip.

language: typing.Optional[str]

llm_model: typing.Optional[str] — Optional chat model slug. Leave empty to use the Speechify default.

temperature: typing.Optional[float]

config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]

is_public: typing.Optional[bool]

allowed_origins: typing.Optional[typing.Sequence[str]]

hostname_allowlist: typing.Optional[typing.Sequence[str]] — Optional per-agent hostname allowlist (see Agent schema).

memory_enabled: typing.Optional[bool]

memory_retention_days: typing.Optional[int]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.get(...)

📝 Description

Retrieve a voice agent by ID.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.get(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.delete(...)

📝 Description

Delete a voice agent. Conversations and attached tools remain.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.delete(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.update(...)

📝 Description

Update a voice agent. Only fields present on the request body are changed.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.update(
    id="id",
)

⚙️ Parameters

id: str

name: typing.Optional[str]

prompt: typing.Optional[str]

first_message: typing.Optional[str]

language: typing.Optional[str]

llm_model: typing.Optional[str]

voice_id: typing.Optional[str]

temperature: typing.Optional[float]

config: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]

is_public: typing.Optional[bool]

allowed_origins: typing.Optional[typing.Sequence[str]]

hostname_allowlist: typing.Optional[typing.Sequence[str]]

When supplied, replaces the stored list. Pass an empty array to clear enforcement (public agent is open again). Omit the field to leave the existing value unchanged.

memory_enabled: typing.Optional[bool]

memory_retention_days: typing.Optional[int]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.list_tools(...)

📝 Description

List tools currently attached to the agent.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.list_tools(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.attach_tool(...)

📝 Description

Attach an existing tool to the agent so the LLM can call it.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.attach_tool(
    id="id",
    tool_id="toolId",
)

⚙️ Parameters

id: str

tool_id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.detach_tool(...)

📝 Description

Detach a tool from the agent.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.detach_tool(
    id="id",
    tool_id="toolId",
)

⚙️ Parameters

id: str

tool_id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.get_evaluation_config(...)

📝 Description

Retrieve the agent's post-call evaluation criteria + data-collection config.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.get_evaluation_config(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.update_evaluation_config(...)

📝 Description

Replace the agent's evaluation criteria + data-collection fields.

🔌 Usage

from speechify import Speechify
from speechify.tts import DataCollectionField, EvaluationCriterion

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.update_evaluation_config(
    id="id",
    criteria=[
        EvaluationCriterion(
            id="id",
            name="name",
            description="description",
        )
    ],
    data_collection=[
        DataCollectionField(
            key="key",
            description="description",
            type="string",
        )
    ],
)

⚙️ Parameters

id: str

criteria: typing.Sequence[EvaluationCriterion]

data_collection: typing.Sequence[DataCollectionField]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.get_dynamic_variables(...)

📝 Description

Retrieve the agent's customer-scope dynamic variables and the read-only catalogue of reserved system__* keys. The system variables list is provided so editor UIs can render the reference list without maintaining a client-side copy of the catalogue.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.get_dynamic_variables(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.update_dynamic_variables(...)

📝 Description

Replace the agent's customer-scope dynamic variable definitions. The supplied list overwrites the stored list wholesale (same semantics as updateEvaluationConfig). Pass an empty array to clear all variables. Up to 20 variables per agent. Keys must match [a-zA-Z0-9_]+ and must not start with the reserved system__ prefix.

🔌 Usage

from speechify import Speechify
from speechify.tts import DynamicVariable

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.update_dynamic_variables(
    id="id",
    variables=[
        DynamicVariable(
            key="product_name",
            type="string",
            default="Speechify",
            description="Product the agent is supporting.",
        ),
        DynamicVariable(
            key="support_tier",
            type="number",
            default=1,
        ),
        DynamicVariable(
            key="account_metadata",
            type="json",
            description="Arbitrary account context injected into tool bodies.",
        ),
    ],
)

⚙️ Parameters

id: str

variables: typing.Sequence[DynamicVariable] — The new variable list. Replaces the existing list entirely.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.create_conversation(...)

📝 Description

Start a new voice conversation with the agent. Returns a realtime voice session + short-lived client token so the caller can connect the audio pipeline directly. The agent is dispatched server-side; no additional client action required.

Pass dynamic_variables to supply per-session values that override the agent's stored variable defaults for this one conversation. Keys in the system__ namespace are rejected at this boundary.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.create_conversation(
    id="id",
)

⚙️ Parameters

id: str

transport: typing.Optional[str] — Transport hint. Omit to use the agent's default.

dynamic_variables: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]

Per-session variable overrides that merge on top of the agent's stored variable defaults for this one conversation. Keys in the reserved system__ namespace are rejected. Values must match the declared type of the corresponding variable definition on the agent.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.create_session(...)

📝 Description

Mint a realtime voice session for the given agent. Widget-friendly counterpart to createConversation — same response shape, dual authentication:

  • Authenticated (Bearer): works for any agent the caller owns. Typical server-to-server flow where the embedding site's backend mints a token and hands it to the browser so the API key never reaches the client.
  • Unauthenticated: works only when agent.is_public = true AND the request's Origin header matches agent.allowed_origins (or that list is empty). When agent.hostname_allowlist is non-empty, the Origin hostname must additionally be a member of that list. Used directly by the <speechify-agent> web component.

Responds with the same CreateConversationResponse as createConversation.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.create_session(
    id="id",
)

⚙️ Parameters

id: str

user_identity: typing.Optional[str] — Opaque identifier for the end-user (e.g. your app's user ID). Stamped onto the conversation. Optional - defaults to an anonymous per-session ID.

dynamic_variables: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]

Per-session variable overrides that merge on top of the agent's stored variable defaults for this one session. Keys in the reserved system__ namespace are rejected at this boundary. Values must match the declared type of the corresponding variable definition on the agent (a string type expects a JSON string, number expects a JSON number, etc.).

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.list_agent_knowledge_bases(...)

📝 Description

List knowledge bases attached to an agent.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.list_agent_knowledge_bases(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.attach_knowledge_base(...)

📝 Description

Attach a knowledge base to an agent. The search_knowledge tool is auto-registered on the next conversation and can only query the attached knowledge bases.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.attach_knowledge_base(
    id="id",
    kb_id="kbId",
)

⚙️ Parameters

id: str

kb_id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.detach_knowledge_base(...)

📝 Description

Detach a knowledge base from an agent.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.detach_knowledge_base(
    id="id",
    kb_id="kbId",
)

⚙️ Parameters

id: str

kb_id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.list_memories(...)

📝 Description

List per-caller memories extracted for an agent. Memories are written post-call by the built-in extractor when memory_enabled is true on the agent; the list is sorted newest-first.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.list_memories(
    id="id",
)

⚙️ Parameters

id: str

limit: typing.Optional[int] — Maximum rows to return. Defaults to 100, capped at 200.

offset: typing.Optional[int] — Number of rows to skip. Combine with limit to page through older memories.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.delete_memories_by_caller(...)

📝 Description

Delete every memory ever extracted for a specific caller on this agent. Privacy / GDPR surface. Returns the count of rows soft-deleted; rows become permanently unreachable immediately and are hard-deleted by the retention job after the tenant's configured retention window.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.delete_memories_by_caller(
    id="id",
    agent_id="agent_id",
    caller_identity="caller_identity",
)

⚙️ Parameters

id: str

agent_id: str

caller_identity: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.list_tests(...)

📝 Description

List all tests configured for the agent. Each entry includes the most recent run so the console can render pass/fail badges without an extra round-trip.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.list_tests(
    id="id",
)

⚙️ Parameters

id: str — Agent ID.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.create_test(...)

📝 Description

Create a new test for the agent.

🔌 Usage

from speechify import Speechify
from speechify.tts import ScenarioConfig

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.create_test(
    id="id",
    name="Greet the caller by name",
    description="Agent should greet the caller using their name when provided.",
    type="scenario",
    config=ScenarioConfig(
        context="The caller says: Hi, I'm Alice.",
        success_criteria="The agent greets Alice by name.",
        success_examples=["Hi Alice! How can I help you today?"],
        failure_examples=["Hello! How can I help you?"],
    ),
)

⚙️ Parameters

id: str — Agent ID.

name: str — Short human-readable label for the test.

type: TestType

config: CreateAgentTestRequestConfig — Type-specific configuration. Must match the shape for the given type.

description: typing.Optional[str] — Optional longer description of what this test verifies.

tool_mock_config: typing.Optional[ToolMockConfig] — Optional tool-mocking config applied during every run of this test.

variables: typing.Optional[typing.Dict[str, typing.Optional[typing.Any]]]

Per-test variable values substituted into string fields of the config at run-start. Keys use the same rules as agent-level DynamicVariable keys.

folder_id: typing.Optional[str] — Folder to place the test in. Omit for root.

attached_agent_ids: typing.Optional[typing.Sequence[str]]

Optional list of additional agents this test should also run against. The owner agent (path param) is always attached implicitly.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.run_all_tests(...)

📝 Description

Enqueue runs for every test on the agent concurrently. Up to 50 tests are dispatched in one call. Each returned run starts in queued status; poll GET /v1/test-runs/{id} for the terminal result.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.run_all_tests(
    id="id",
)

⚙️ Parameters

id: str — Agent ID.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.get_test(...)

📝 Description

Retrieve a test by ID.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.get_test(
    id="id",
)

⚙️ Parameters

id: str — Test ID.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.delete_test(...)

📝 Description

Delete a test and all its run history.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.delete_test(
    id="id",
)

⚙️ Parameters

id: str — Test ID.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.update_test(...)

📝 Description

Update a test. Only fields present on the request body are changed.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.update_test(
    id="id",
)

⚙️ Parameters

id: str — Test ID.

name: typing.Optional[str]

description: typing.Optional[str]

config: typing.Optional[UpdateAgentTestRequestConfig] — Replaces the test config when present.

tool_mock_config: typing.Optional[ToolMockConfig] — Replaces the tool-mock config when present.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.list_test_runs(...)

📝 Description

List the run history for a test, newest first.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.list_test_runs(
    id="id",
)

⚙️ Parameters

id: str — Test ID.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.run_test(...)

📝 Description

Enqueue a single run of the test. The returned run starts in queued status. Poll GET /v1/test-runs/{id} until the status reaches a terminal state (passed, failed, or error).

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.run_test(
    id="id",
)

⚙️ Parameters

id: str — Test ID.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.get_test_run(...)

📝 Description

Retrieve a single test run by ID. Poll this endpoint until status reaches a terminal state (passed, failed, or error). The result field is populated on terminal states.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.get_test_run(
    id="id",
)

⚙️ Parameters

id: str — Test run ID.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.list_all_tests(...)

📝 Description

Workspace-wide list of tests across every agent the caller owns. Supports filters (agent, type, last-run status, folder), full-text search on name/description, and cursor pagination. Each row carries its newest run and attached agent IDs so the list renders without N+1 round-trips.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.list_all_tests()

⚙️ Parameters

agent_id: typing.Optional[str] — Comma-separated agent IDs to filter on.

type: typing.Optional[str] — Comma-separated test types (scenario|tool|simulation).

status: typing.Optional[str] — Comma-separated last-run statuses.

folder_id: typing.Optional[str] — Folder ID to filter on, or "root" for unfiled tests.

updated_after: typing.Optional[str] — Only return tests updated after this RFC3339 timestamp.

q: typing.Optional[str] — Substring match on name or description.

limit: typing.Optional[int] — Max tests per page (default 50, max 200).

cursor: typing.Optional[str] — Opaque pagination cursor from a previous response.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.get_test_stats(...)

📝 Description

Aggregate pass-rate metrics over the last N days. Returns dense daily buckets (one entry per day, zero-filled) plus totals and a per-type breakdown. Powers the header chart on the global tests page. Default window is 30 days, max 90.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.get_test_stats()

⚙️ Parameters

window_days: typing.Optional[int] — Trailing window in days (default 30, max 90).

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.run_tests_batch(...)

📝 Description

Queue runs for every (test, agent) pair in the body. Entries without an agent_id fan out to every agent the test is attached to. Total expanded runs are capped at 100 per call. Each entry in the response is a queued run; poll GET /v1/test-runs/{id} for each.

🔌 Usage

from speechify import Speechify
from speechify.tts import BatchRunEntry

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.run_tests_batch(
    entries=[
        BatchRunEntry(
            test_id="test_id",
        )
    ],
)

⚙️ Parameters

entries: typing.Sequence[BatchRunEntry]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.list_test_attachments(...)

📝 Description

List every agent a test is attached to.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.list_test_attachments(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.attach_test(...)

📝 Description

Attach a test to an additional agent. After this call, the test will also run as part of that agent's regression suite (and against its prompt + tool config when invoked with agent_id = {agentId}). Idempotent.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.attach_test(
    id="id",
    agent_id="agentId",
)

⚙️ Parameters

id: str

agent_id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.detach_test(...)

📝 Description

Detach a test from an agent. The owner agent (the agent the test was authored against) cannot be detached; delete the test instead.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.detach_test(
    id="id",
    agent_id="agentId",
)

⚙️ Parameters

id: str

agent_id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.move_test(...)

📝 Description

Move a test into a folder. Pass folder_id: null for root.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.move_test(
    id="id",
)

⚙️ Parameters

id: str

folder_id: typing.Optional[str]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.list_test_folders()

📝 Description

List every test folder the caller owns. Flat list; build the tree client-side.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.list_test_folders()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.create_test_folder(...)

📝 Description

Create a test folder. Max depth is 3.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.create_test_folder(
    name="name",
)

⚙️ Parameters

name: str

parent_folder_id: typing.Optional[str]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.delete_test_folder(...)

📝 Description

Soft-delete a folder. Child tests drop back to root.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.delete_test_folder(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.agents.update_test_folder(...)

📝 Description

Rename or reparent a test folder. Cycles are rejected.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.agents.update_test_folder(
    id="id",
)

⚙️ Parameters

id: str

name: typing.Optional[str]

parent_folder_id: typing.Optional[str]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Tts Tools

client.tts.tools.list()

📝 Description

List tools owned by the caller.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.tools.list()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.tools.create(...)

📝 Description

Create a tool. For webhook tools, the response includes the HMAC webhook_secret exactly once — store it immediately; subsequent reads return a masked placeholder.

🔌 Usage

from speechify import Speechify
from speechify.tts import SystemToolConfig

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.tools.create(
    name="name",
    description="description",
    kind="system",
    config=SystemToolConfig(
        builtin="end_call",
    ),
)

⚙️ Parameters

name: str

description: str

kind: ToolKind

config: CreateToolRequestConfig

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.tools.get(...)

📝 Description

Retrieve a tool by ID. Webhook secrets are always masked here.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.tools.get(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.tools.delete(...)

📝 Description

Delete a tool. Agents that had it attached get a soft-detach.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.tools.delete(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.tools.update(...)

📝 Description

Update a tool. Tool kind is immutable — create a new tool to change it.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.tools.update(
    id="id",
)

⚙️ Parameters

id: str

name: typing.Optional[str]

description: typing.Optional[str]

config: typing.Optional[UpdateToolRequestConfig]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Tts Conversations

client.tts.conversations.list()

📝 Description

List conversations owned by the caller, ordered by most recent.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.conversations.list()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.conversations.stats()

📝 Description

Aggregated counts and averages over the caller's conversations, scoped by the same filters as the list endpoint.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.conversations.stats()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.conversations.get(...)

📝 Description

Retrieve a conversation by ID.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.conversations.get(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.conversations.list_messages(...)

📝 Description

Retrieve the full transcript for a conversation, in order.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.conversations.list_messages(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.conversations.list_evaluations(...)

📝 Description

Retrieve post-call evaluation results for a conversation.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.conversations.list_evaluations(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.conversations.list_memories(...)

📝 Description

List memories extracted from a specific conversation.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.conversations.list_memories(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Tts KnowledgeBases

client.tts.knowledge_bases.list()

📝 Description

List knowledge bases owned by the caller.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.knowledge_bases.list()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.knowledge_bases.create(...)

📝 Description

Create a new knowledge base.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.knowledge_bases.create(
    name="name",
)

⚙️ Parameters

name: str — Human-readable label.

description: typing.Optional[str] — Optional description.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.knowledge_bases.get(...)

📝 Description

Retrieve a knowledge base by ID.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.knowledge_bases.get(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.knowledge_bases.delete(...)

📝 Description

Soft-delete a knowledge base. Documents and chunks are cascaded.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.knowledge_bases.delete(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.knowledge_bases.update(...)

📝 Description

Update a knowledge base.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.knowledge_bases.update(
    id="id",
)

⚙️ Parameters

id: str

name: typing.Optional[str]

description: typing.Optional[str]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.knowledge_bases.list_documents(...)

📝 Description

List documents ingested into a knowledge base.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.knowledge_bases.list_documents(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.knowledge_bases.upload_document(...)

📝 Description

Upload a document (PDF, plain text, markdown, or HTML) to a knowledge base. The document is extracted, chunked, embedded, and indexed synchronously; expect a few seconds per MB of input. Maximum 10 MB per upload.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.knowledge_bases.upload_document(
    id="id",
)

⚙️ Parameters

id: str

file: `from future import annotations

core.File` — See core.File for more documentation

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.knowledge_bases.get_document(...)

📝 Description

Retrieve a document by ID.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.knowledge_bases.get_document(
    doc_id="docId",
)

⚙️ Parameters

doc_id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.knowledge_bases.delete_document(...)

📝 Description

Delete a document and all its chunks.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.knowledge_bases.delete_document(
    doc_id="docId",
)

⚙️ Parameters

doc_id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.knowledge_bases.list_chunks(...)

📝 Description

List the chunks for a document.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.knowledge_bases.list_chunks(
    doc_id="docId",
)

⚙️ Parameters

doc_id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.knowledge_bases.search(...)

📝 Description

Semantic search across a caller-owned list of knowledge bases. Returns ranked chunks with source filename and a cosine-similarity score. Limited to 50 results per request.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.knowledge_bases.search(
    query="query",
    kb_ids=["kb_ids"],
)

⚙️ Parameters

query: str — Natural-language search query.

kb_ids: typing.Sequence[str] — Knowledge bases to search across. Results scoped to caller-owned entries; unknown IDs are silently ignored.

top_k: typing.Optional[int] — Max hits to return (default 5, capped at 50).

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Tts Memories

client.tts.memories.delete(...)

📝 Description

Soft-delete one memory row.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.memories.delete(
    memory_id="memoryId",
)

⚙️ Parameters

memory_id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Tts PhoneNumbers

client.tts.phone_numbers.list()

📝 Description

List all phone numbers in the caller's workspace.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.phone_numbers.list()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.phone_numbers.import_(...)

📝 Description

Import a phone number into the workspace. The source field determines the provisioning path:

  • livekit - LiveKit purchases the number on your behalf. US inbound only. Quickest path for local testing.
  • twilio - Provide your Twilio Account SID, Auth Token, and the E.164 number you already own. We provision an Elastic SIP Trunk on your Twilio account automatically.
  • byoc - Provide an existing SIP trunk ID. The number is registered against that trunk.

Returns 402 when the workspace has reached the 100-number cap.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.phone_numbers.import_(
    request={"key": "value"},
)

⚙️ Parameters

request: typing.Optional[typing.Any]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.phone_numbers.get(...)

📝 Description

Retrieve a phone number by ID.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.phone_numbers.get(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.phone_numbers.delete(...)

📝 Description

Delete a phone number from the workspace. For Twilio and LiveKit numbers this also deprovisions the backing SIP trunk and dispatch rule on LiveKit Cloud.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.phone_numbers.delete(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.phone_numbers.update(...)

📝 Description

Update a phone number. Only label and agent_id are mutable; source and e164 are immutable after import. Pass null for agent_id to unbind the number from its current agent.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.phone_numbers.update(
    id="id",
    request={"key": "value"},
)

⚙️ Parameters

id: str

request: typing.Optional[typing.Any]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Tts SipTrunks

client.tts.sip_trunks.list()

📝 Description

List all SIP trunks in the caller's workspace.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.sip_trunks.list()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.sip_trunks.create(...)

📝 Description

Create a SIP trunk. For kind=byoc supply sip_address plus optional digest credentials and IP allowlist. For kind=twilio use ImportPhoneNumber with a twilio spec instead - trunk creation is handled automatically. Returns 402 when the workspace has reached the 20-trunk cap.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.sip_trunks.create(
    request={"key": "value"},
)

⚙️ Parameters

request: typing.Optional[typing.Any]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.sip_trunks.get(...)

📝 Description

Retrieve a SIP trunk by ID.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.sip_trunks.get(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.sip_trunks.delete(...)

📝 Description

Delete a SIP trunk. This also removes the backing LiveKit inbound trunk, outbound trunk, and dispatch rule if they were provisioned by us. Phone numbers attached to this trunk are left in place but become non-functional until rebound to a new trunk.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.sip_trunks.delete(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Tts OutboundCalls

client.tts.outbound_calls.create(...)

📝 Description

Place an outbound call from an agent to a phone number. LiveKit originates the SIP INVITE through the outbound trunk bound to the agent's workspace; the agent worker is dispatched into the room automatically.

The response is returned as soon as LiveKit accepts the INVITE. Poll GET /v1/conversations/{conversation_id} for status transitions: pendingactive (answered) → completed.

Requires a Twilio or BYOC trunk. LiveKit-native numbers are inbound-only.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.outbound_calls.create(
    request={"key": "value"},
)

⚙️ Parameters

request: typing.Optional[typing.Any]

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

Tts Workspaces

client.tts.workspaces.list()

📝 Description

List every workspace the authenticated user belongs to. Powers the workspace switcher.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.workspaces.list()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.workspaces.create(...)

📝 Description

Create a new workspace with the authenticated user as owner. The caller must switch their active workspace client-side via the X-Tenant-ID header to act on the new tenant.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.workspaces.create()

⚙️ Parameters

name: typing.Optional[str] — Display name for the new workspace. Trimmed; must be 120 characters or fewer.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.workspaces.get_current()

📝 Description

Retrieve the workspace currently selected by the caller (via X-Tenant-ID or auto-resolved).

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.workspaces.get_current()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.workspaces.update_current(...)

📝 Description

Rename the current workspace. Owner or admin only.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.workspaces.update_current(
    name="name",
)

⚙️ Parameters

name: str — New display name. Required; must be 120 characters or fewer.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.workspaces.list_members()

📝 Description

List every member of the current workspace. Any member may call this.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.workspaces.list_members()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.workspaces.leave()

📝 Description

Remove the authenticated caller from the current workspace. Refused with 409 when the caller is the last owner — promote another member to owner first.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.workspaces.leave()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.workspaces.remove_member(...)

📝 Description

Remove a member from the current workspace. Owner or admin only. The caller cannot remove themselves — use POST /v1/tenants/current/members/leave instead.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.workspaces.remove_member(
    user_uid="user_uid",
)

⚙️ Parameters

user_uid: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.workspaces.update_member_role(...)

📝 Description

Change a member's role. Owner only — admins may add or remove members but may not change roles. Refused with 409 when demoting the last remaining owner.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.workspaces.update_member_role(
    user_uid="user_uid",
    role="owner",
)

⚙️ Parameters

user_uid: str

role: MemberRole

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.workspaces.list_invites()

📝 Description

List outstanding invites for the current workspace. Invite tokens are redacted.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.workspaces.list_invites()

⚙️ Parameters

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.workspaces.create_invite(...)

📝 Description

Create an invite to the current workspace. Owner or admin only. The response contains the invite token ONCE — subsequent list calls redact it.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.workspaces.create_invite(
    email="email",
)

⚙️ Parameters

email: str — Email of the person to invite. Validated as an RFC 5322 address.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.workspaces.revoke_invite(...)

📝 Description

Revoke an outstanding invite. Owner or admin only. Idempotent.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.workspaces.revoke_invite(
    id="id",
)

⚙️ Parameters

id: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.workspaces.accept_invite(...)

📝 Description

Accept a workspace invite. The authenticated caller is joined to the invite's workspace as a member. Expired, revoked, or already-accepted tokens return 404 to avoid token enumeration.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.workspaces.accept_invite(
    token="token",
)

⚙️ Parameters

token: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.workspaces.preview_invite(...)

📝 Description

Preview a workspace invite without authenticating. Returns the workspace name, inviter details, and expiry so the /join/{token} page can render before the recipient signs in. Anyone with the token can already accept, so this endpoint deliberately surfaces the same information a caller would see after accepting. Invalid tokens (unknown, expired, revoked, already-accepted, or pointing at a soft-deleted workspace) collapse to a single 404 to prevent enumeration.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.workspaces.preview_invite(
    token="token",
)

⚙️ Parameters

token: str

request_options: typing.Optional[RequestOptions] — Request-specific configuration.

client.tts.workspaces.transfer_workspace_owner(...)

📝 Description

Transfer ownership of the current workspace atomically. Promotes the target member to owner and demotes the caller to admin in a single transaction. Owner-only; admins cannot hand off a role they were never granted. Prefer this over two PATCH calls to /v1/tenants/current/members/{user_uid}: a sole-owner caller cannot demote themselves first without tripping the last-owner guard, which this endpoint sidesteps by promoting before demoting.

🔌 Usage

from speechify import Speechify

client = Speechify(
    token="YOUR_TOKEN",
)
client.tts.workspaces.transfer_workspace_owner(
    user_uid="user_uid",
)

⚙️ Parameters

user_uid: str — Firebase UID of the member who will become the new owner.

request_options: typing.Optional[RequestOptions] — Request-specific configuration.