client.tts.audio.speech(...)
-
-
-
Gets the speech data for the given input
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.audio.speech( input="input", voice_id="voice_id", )
-
-
-
input:
strPlain 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-baseandsimba-turboare deprecated.simba-3.0is 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(...)
-
-
-
Gets the stream speech for the given input
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.audio.stream( accept="audio/mpeg", input="input", voice_id="voice_id", )
-
-
-
accept:
StreamAudioRequestAccept
-
input:
strPlain 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-baseandsimba-turboare deprecated.simba-3.0is 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 aschunk_size, and more to customize the request and response.
-
-
client.tts.auth.create_access_token(...)
-
-
-
WARNING: This endpoint is deprecated. Create a new API token for the logged in user.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.auth.create_access_token( grant_type="client_credentials", )
-
-
-
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.
-
-
client.tts.voices.list()
-
-
-
Gets the list of voices available for the user
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.voices.list()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.voices.create(...)
-
-
-
Create a personal (cloned) voice for the user
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.voices.create( name="name", gender="male", consent="consent", )
-
-
-
name:
str— Name of the personal voice
-
gender:
CreateVoicesRequestGenderGender 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:
strA 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(...)
-
-
-
Delete a personal (cloned) voice
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.voices.delete( id="id", )
-
-
-
id:
str— The ID of the voice to delete
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.voices.download_sample(...)
-
-
-
Download a personal (cloned) voice sample
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.voices.download_sample( id="id", )
-
-
-
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 aschunk_size, and more to customize the request and response.
-
-
client.tts.agents.list()
-
-
-
List voice agents owned by the caller.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.list()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.create(...)
-
-
-
Create a voice agent.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.create( name="name", voice_id="voice_id", )
-
-
-
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(...)
-
-
-
Retrieve a voice agent by ID.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.get( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.delete(...)
-
-
-
Delete a voice agent. Conversations and attached tools remain.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.delete( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.update(...)
-
-
-
Update a voice agent. Only fields present on the request body are changed.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.update( id="id", )
-
-
-
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(...)
-
-
-
List tools currently attached to the agent.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.list_tools( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.attach_tool(...)
-
-
-
Attach an existing tool to the agent so the LLM can call it.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.attach_tool( id="id", tool_id="toolId", )
-
-
-
id:
str
-
tool_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.detach_tool(...)
-
-
-
Detach a tool from the agent.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.detach_tool( id="id", tool_id="toolId", )
-
-
-
id:
str
-
tool_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.get_evaluation_config(...)
-
-
-
Retrieve the agent's post-call evaluation criteria + data-collection config.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.get_evaluation_config( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.update_evaluation_config(...)
-
-
-
Replace the agent's evaluation criteria + data-collection fields.
-
-
-
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", ) ], )
-
-
-
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(...)
-
-
-
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.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.get_dynamic_variables( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.update_dynamic_variables(...)
-
-
-
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 reservedsystem__prefix.
-
-
-
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.", ), ], )
-
-
-
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(...)
-
-
-
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_variablesto supply per-session values that override the agent's stored variable defaults for this one conversation. Keys in thesystem__namespace are rejected at this boundary.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.create_conversation( id="id", )
-
-
-
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(...)
-
-
-
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 = trueAND the request'sOriginheader matchesagent.allowed_origins(or that list is empty). Whenagent.hostname_allowlistis non-empty, theOriginhostname must additionally be a member of that list. Used directly by the<speechify-agent>web component.
Responds with the same
CreateConversationResponseascreateConversation.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.create_session( id="id", )
-
-
-
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 (astringtype expects a JSON string,numberexpects a JSON number, etc.).
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.list_agent_knowledge_bases(...)
-
-
-
List knowledge bases attached to an agent.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.list_agent_knowledge_bases( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.attach_knowledge_base(...)
-
-
-
Attach a knowledge base to an agent. The
search_knowledgetool is auto-registered on the next conversation and can only query the attached knowledge bases.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.attach_knowledge_base( id="id", kb_id="kbId", )
-
-
-
id:
str
-
kb_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.detach_knowledge_base(...)
-
-
-
Detach a knowledge base from an agent.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.detach_knowledge_base( id="id", kb_id="kbId", )
-
-
-
id:
str
-
kb_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.list_memories(...)
-
-
-
List per-caller memories extracted for an agent. Memories are written post-call by the built-in extractor when
memory_enabledis true on the agent; the list is sorted newest-first.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.list_memories( id="id", )
-
-
-
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 withlimitto page through older memories.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.delete_memories_by_caller(...)
-
-
-
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.
-
-
-
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", )
-
-
-
id:
str
-
agent_id:
str
-
caller_identity:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.list_tests(...)
-
-
-
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.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.list_tests( id="id", )
-
-
-
id:
str— Agent ID.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.create_test(...)
-
-
-
Create a new test for the agent.
-
-
-
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?"], ), )
-
-
-
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 giventype.
-
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
DynamicVariablekeys.
-
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(...)
-
-
-
Enqueue runs for every test on the agent concurrently. Up to 50 tests are dispatched in one call. Each returned run starts in
queuedstatus; pollGET /v1/test-runs/{id}for the terminal result.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.run_all_tests( id="id", )
-
-
-
id:
str— Agent ID.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.get_test(...)
-
-
-
Retrieve a test by ID.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.get_test( id="id", )
-
-
-
id:
str— Test ID.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.delete_test(...)
-
-
-
Delete a test and all its run history.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.delete_test( id="id", )
-
-
-
id:
str— Test ID.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.update_test(...)
-
-
-
Update a test. Only fields present on the request body are changed.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.update_test( id="id", )
-
-
-
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(...)
-
-
-
List the run history for a test, newest first.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.list_test_runs( id="id", )
-
-
-
id:
str— Test ID.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.run_test(...)
-
-
-
Enqueue a single run of the test. The returned run starts in
queuedstatus. PollGET /v1/test-runs/{id}until the status reaches a terminal state (passed,failed, orerror).
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.run_test( id="id", )
-
-
-
id:
str— Test ID.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.get_test_run(...)
-
-
-
Retrieve a single test run by ID. Poll this endpoint until
statusreaches a terminal state (passed,failed, orerror). Theresultfield is populated on terminal states.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.get_test_run( id="id", )
-
-
-
id:
str— Test run ID.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.list_all_tests(...)
-
-
-
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.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.list_all_tests()
-
-
-
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(...)
-
-
-
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.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.get_test_stats()
-
-
-
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(...)
-
-
-
Queue runs for every (test, agent) pair in the body. Entries without an
agent_idfan 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; pollGET /v1/test-runs/{id}for each.
-
-
-
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", ) ], )
-
-
-
entries:
typing.Sequence[BatchRunEntry]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.list_test_attachments(...)
-
-
-
List every agent a test is attached to.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.list_test_attachments( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.attach_test(...)
-
-
-
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.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.attach_test( id="id", agent_id="agentId", )
-
-
-
id:
str
-
agent_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.detach_test(...)
-
-
-
Detach a test from an agent. The owner agent (the agent the test was authored against) cannot be detached; delete the test instead.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.detach_test( id="id", agent_id="agentId", )
-
-
-
id:
str
-
agent_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.move_test(...)
-
-
-
Move a test into a folder. Pass
folder_id: nullfor root.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.move_test( id="id", )
-
-
-
id:
str
-
folder_id:
typing.Optional[str]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.list_test_folders()
-
-
-
List every test folder the caller owns. Flat list; build the tree client-side.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.list_test_folders()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.create_test_folder(...)
-
-
-
Create a test folder. Max depth is 3.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.create_test_folder( name="name", )
-
-
-
name:
str
-
parent_folder_id:
typing.Optional[str]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.delete_test_folder(...)
-
-
-
Soft-delete a folder. Child tests drop back to root.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.delete_test_folder( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.agents.update_test_folder(...)
-
-
-
Rename or reparent a test folder. Cycles are rejected.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.agents.update_test_folder( id="id", )
-
-
-
id:
str
-
name:
typing.Optional[str]
-
parent_folder_id:
typing.Optional[str]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.tools.list()
-
-
-
List tools owned by the caller.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.tools.list()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.tools.create(...)
-
-
-
Create a tool. For webhook tools, the response includes the HMAC
webhook_secretexactly once — store it immediately; subsequent reads return a masked placeholder.
-
-
-
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", ), )
-
-
-
name:
str
-
description:
str
-
kind:
ToolKind
-
config:
CreateToolRequestConfig
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.tools.get(...)
-
-
-
Retrieve a tool by ID. Webhook secrets are always masked here.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.tools.get( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.tools.delete(...)
-
-
-
Delete a tool. Agents that had it attached get a soft-detach.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.tools.delete( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.tools.update(...)
-
-
-
Update a tool. Tool kind is immutable — create a new tool to change it.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.tools.update( id="id", )
-
-
-
id:
str
-
name:
typing.Optional[str]
-
description:
typing.Optional[str]
-
config:
typing.Optional[UpdateToolRequestConfig]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.conversations.list()
-
-
-
List conversations owned by the caller, ordered by most recent.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.conversations.list()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.conversations.stats()
-
-
-
Aggregated counts and averages over the caller's conversations, scoped by the same filters as the list endpoint.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.conversations.stats()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.conversations.get(...)
-
-
-
Retrieve a conversation by ID.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.conversations.get( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.conversations.list_messages(...)
-
-
-
Retrieve the full transcript for a conversation, in order.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.conversations.list_messages( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.conversations.list_evaluations(...)
-
-
-
Retrieve post-call evaluation results for a conversation.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.conversations.list_evaluations( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.conversations.list_memories(...)
-
-
-
List memories extracted from a specific conversation.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.conversations.list_memories( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.knowledge_bases.list()
-
-
-
List knowledge bases owned by the caller.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.knowledge_bases.list()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.knowledge_bases.create(...)
-
-
-
Create a new knowledge base.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.knowledge_bases.create( name="name", )
-
-
-
name:
str— Human-readable label.
-
description:
typing.Optional[str]— Optional description.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.knowledge_bases.get(...)
-
-
-
Retrieve a knowledge base by ID.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.knowledge_bases.get( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.knowledge_bases.delete(...)
-
-
-
Soft-delete a knowledge base. Documents and chunks are cascaded.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.knowledge_bases.delete( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.knowledge_bases.update(...)
-
-
-
Update a knowledge base.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.knowledge_bases.update( id="id", )
-
-
-
id:
str
-
name:
typing.Optional[str]
-
description:
typing.Optional[str]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.knowledge_bases.list_documents(...)
-
-
-
List documents ingested into a knowledge base.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.knowledge_bases.list_documents( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.knowledge_bases.upload_document(...)
-
-
-
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.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.knowledge_bases.upload_document( id="id", )
-
-
-
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(...)
-
-
-
Retrieve a document by ID.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.knowledge_bases.get_document( doc_id="docId", )
-
-
-
doc_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.knowledge_bases.delete_document(...)
-
-
-
Delete a document and all its chunks.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.knowledge_bases.delete_document( doc_id="docId", )
-
-
-
doc_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.knowledge_bases.list_chunks(...)
-
-
-
List the chunks for a document.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.knowledge_bases.list_chunks( doc_id="docId", )
-
-
-
doc_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.knowledge_bases.search(...)
-
-
-
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.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.knowledge_bases.search( query="query", kb_ids=["kb_ids"], )
-
-
-
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.
-
-
client.tts.memories.delete(...)
-
-
-
Soft-delete one memory row.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.memories.delete( memory_id="memoryId", )
-
-
-
memory_id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.phone_numbers.list()
-
-
-
List all phone numbers in the caller's workspace.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.phone_numbers.list()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.phone_numbers.import_(...)
-
-
-
Import a phone number into the workspace. The
sourcefield 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.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.phone_numbers.import_( request={"key": "value"}, )
-
-
-
request:
typing.Optional[typing.Any]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.phone_numbers.get(...)
-
-
-
Retrieve a phone number by ID.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.phone_numbers.get( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.phone_numbers.delete(...)
-
-
-
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.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.phone_numbers.delete( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.phone_numbers.update(...)
-
-
-
Update a phone number. Only
labelandagent_idare mutable;sourceande164are immutable after import. Passnullforagent_idto unbind the number from its current agent.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.phone_numbers.update( id="id", request={"key": "value"}, )
-
-
-
id:
str
-
request:
typing.Optional[typing.Any]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.sip_trunks.list()
-
-
-
List all SIP trunks in the caller's workspace.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.sip_trunks.list()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.sip_trunks.create(...)
-
-
-
Create a SIP trunk. For
kind=byocsupplysip_addressplus optional digest credentials and IP allowlist. Forkind=twiliouseImportPhoneNumberwith atwiliospec instead - trunk creation is handled automatically. Returns 402 when the workspace has reached the 20-trunk cap.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.sip_trunks.create( request={"key": "value"}, )
-
-
-
request:
typing.Optional[typing.Any]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.sip_trunks.get(...)
-
-
-
Retrieve a SIP trunk by ID.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.sip_trunks.get( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.sip_trunks.delete(...)
-
-
-
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.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.sip_trunks.delete( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.outbound_calls.create(...)
-
-
-
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:pending→active(answered) →completed.Requires a Twilio or BYOC trunk. LiveKit-native numbers are inbound-only.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.outbound_calls.create( request={"key": "value"}, )
-
-
-
request:
typing.Optional[typing.Any]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.workspaces.list()
-
-
-
List every workspace the authenticated user belongs to. Powers the workspace switcher.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.workspaces.list()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.workspaces.create(...)
-
-
-
Create a new workspace with the authenticated user as owner. The caller must switch their active workspace client-side via the
X-Tenant-IDheader to act on the new tenant.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.workspaces.create()
-
-
-
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()
-
-
-
Retrieve the workspace currently selected by the caller (via
X-Tenant-IDor auto-resolved).
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.workspaces.get_current()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.workspaces.update_current(...)
-
-
-
Rename the current workspace. Owner or admin only.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.workspaces.update_current( name="name", )
-
-
-
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()
-
-
-
List every member of the current workspace. Any member may call this.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.workspaces.list_members()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.workspaces.leave()
-
-
-
Remove the authenticated caller from the current workspace. Refused with 409 when the caller is the last owner — promote another member to owner first.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.workspaces.leave()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.workspaces.remove_member(...)
-
-
-
Remove a member from the current workspace. Owner or admin only. The caller cannot remove themselves — use
POST /v1/tenants/current/members/leaveinstead.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.workspaces.remove_member( user_uid="user_uid", )
-
-
-
user_uid:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.workspaces.update_member_role(...)
-
-
-
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.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.workspaces.update_member_role( user_uid="user_uid", role="owner", )
-
-
-
user_uid:
str
-
role:
MemberRole
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.workspaces.list_invites()
-
-
-
List outstanding invites for the current workspace. Invite tokens are redacted.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.workspaces.list_invites()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.workspaces.create_invite(...)
-
-
-
Create an invite to the current workspace. Owner or admin only. The response contains the invite token ONCE — subsequent list calls redact it.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.workspaces.create_invite( email="email", )
-
-
-
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(...)
-
-
-
Revoke an outstanding invite. Owner or admin only. Idempotent.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.workspaces.revoke_invite( id="id", )
-
-
-
id:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.workspaces.accept_invite(...)
-
-
-
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.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.workspaces.accept_invite( token="token", )
-
-
-
token:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.workspaces.preview_invite(...)
-
-
-
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.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.workspaces.preview_invite( token="token", )
-
-
-
token:
str
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.tts.workspaces.transfer_workspace_owner(...)
-
-
-
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.
-
-
-
from speechify import Speechify client = Speechify( token="YOUR_TOKEN", ) client.tts.workspaces.transfer_workspace_owner( user_uid="user_uid", )
-
-
-
user_uid:
str— Firebase UID of the member who will become the new owner.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-