client.audio.speech(...) -> GetSpeechResponse
-
-
-
Synthesize speech audio from text or SSML. Returns the complete audio file plus billing and speech-mark metadata in a single JSON response. For low-latency playback or long-form text, use POST /v1/audio/stream. Set
output_formatfor explicit sample-rate/bitrate control (e.g.pcm_16000orulaw_8000for telephony).
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.audio.speech( audio_format="mp3", input="Hello! This is the Speechify text-to-speech API.", model="simba-3.5", voice_id="geffen_32", )
-
-
-
input:
strPlain text or SSML to be synthesized to speech. Up to 2,000 characters of spoken text, the characters the request is billed for: SSML tags do not count. The input as sent, markup included, may be up to 20,000 characters. Refer to https://docs.speechify.ai/docs/api-limits for the input size limits. SSML sets pauses (
<break>), speaking rate, pitch and volume (<prosody>) and pronunciation (<sub alias>): see https://docs.speechify.ai/build/guides/text-to-speech/ssml for each tag. Emotion styles and emphasis are applied only by the Simba 1.6 models, until 2026-11-21;simba-3.0,simba-3.2andsimba-3.5accept those tags without applying them.
-
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. Defaults to
simba-3.0, which is streaming-native and multilingual: it officially supports English plusde-DE,es-ES,es-MX,fr-FR,it-ITandpt-BR, and routes each request to its English or its multilingual training based onlanguage(falling back to the voice's locale whenlanguageis omitted).simba-3.2is the streaming-native model with the lowest TTFB and richest expressivity; it is English only, so a non-English voice returns 400.simba-3.5is the recommended model: streaming-native, covering 48 languages under one id, English included, routed bylanguagelikesimba-3.0; every voice works on it, cloned voices included.The legacy Simba 1.6 models
simba-englishandsimba-multilingualare retired from API version2026-09-21: naming one returns 400model_retired. Pinning your API version to a date before2026-09-21keeps them on their Simba 1.6 training until 2026-11-21; from then both ids are served by our current models on every API version that can still name them. Migrate tosimba-3.2(English),simba-3.0orsimba-3.5before then; call GET /v1/audio/models to see the set your workspace can select today.
-
options:
typing.Optional[GetSpeechOptionsRequest]
-
output_format:
typing.Optional[AudioOutputFormat]— The output audio format as acodec_sampleRate_bitratestring. Takes precedence overaudio_formatwhen set.
-
pronunciations:
typing.Optional[Pronunciations]
-
safety_identifier:
typing.Optional[SafetyIdentifier]— Optional. A stable, opaque identifier for the end user this request is made for: a hash of your own user id or an opaque id, never an email address or other personal data. It is recorded with the request even under zero data retention, and your workspace can be given per-end-user limits and a block list keyed on it. See https://docs.speechify.ai/build/guides/concepts/safety-identifiers.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.audio.stream(...) -> typing.Iterator[bytes]
-
-
-
Synthesize speech and stream the audio back as it is generated, for low-latency playback. Set
output_formatin the body for explicit codec/sample-rate/bitrate control (e.g.pcm_16000orulaw_8000for telephony), or fall back to the Accept header for the container; the response is raw audio bytes (HTTP chunked). For Base64-encoded audio with speech-mark metadata in a single JSON response, use POST /v1/audio/speech.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.audio.stream( input="input", voice_id="voice_id", )
-
-
-
request:
GetStreamRequest
-
accept:
typing.Optional[StreamAudioRequestAccept]Selects the audio container/codec for the streamed response when
output_formatis not set in the request body. The response Content-Type echoes this value, exceptaudio/pcmreturnsaudio/L16with rate and channels parameters (raw 16-bit linear PCM, 24 kHz mono, little-endian). For explicit sample-rate/bitrate control (e.g.pcm_16000,ulaw_8000), setoutput_formatin the body instead; it takes precedence over this header.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.audio.stream_with_timestamps(...) -> typing.Iterator[bytes]
-
-
-
Synthesize speech and stream it back together with word-level speech marks, for text highlighting, captions and audio-text synchronization while the audio is still arriving.
The response is a Server-Sent Events stream. Each
speech.chunkevent carries a Base64-encoded run of audio, the speech marks that became final with it, or both - a chunk may carry only one of the two, and the last chunk of a stream is often marks-only. A terminalspeech.doneevent ends the stream; there is no[DONE]sentinel. Ignore any event type you do not recognize, so that new event types do not break your integration.Speech-mark times are absolute milliseconds from the start of the synthesis, so concatenate the audio chunks into one stream and apply the marks against that single timeline. Which chunk a mark arrives on is a delivery detail and carries no meaning. Times stay correct for every
output_format: changing the codec or sample rate does not change the duration.Every model this route accepts produces speech marks here. The default
simba-3.0,simba-3.2andsimba-3.5stream marks word by word alongside the audio. The legacysimba-englishandsimba-multilingualmodels, still selectable on a workspace pinned before API version2026-09-21, synthesize a sentence at a time, so their marks arrive a sentence at a time with that sentence's audio; from that version on they return 400model_retiredon every synthesis route, and from 2026-11-21 both ids are served by our current models. For Base64-encoded audio and speech marks in one non-streamed JSON response, use POST /v1/audio/speech.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.audio.stream_with_timestamps( input="Streaming long-form audio with the Speechify API.", model="simba-3.5", voice_id="geffen_32", )
-
-
-
request:
GetStreamRequest
-
accept:
typing.Optional[StreamWithTimestampsAudioRequestAccept]Selects the audio container/codec carried inside the events when
output_formatis not set in the request body. The selected media type is echoed on theSpeechify-Audio-Content-Typeresponse header, since the response's own Content-Type istext/event-stream.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.models.list() -> ModelsResponse
-
-
-
List the text-to-speech models available for synthesis. Drive a model picker from this response, then pass a model
idas themodelparameter to POST /v1/audio/speech or /v1/audio/stream. The response marks the default model (used when a request omitsmodel), the routes each model may be passed to, and which voices it accepts. Multi-speaker models arrive in a separatedialogue_modelsarray because they are valid only on POST /v1/audio/dialogue. Returns the full set in a single response: the model catalog is static platform reference data, so it is intentionally not paginated.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.models.list()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.voices.list(...) -> ListVoicesResponse
-
-
-
Lists the voices available to the caller - the shared voice catalog plus the cloned voices they can reach, whichever member or service-account key created them. A clone filed under a project is listed only for a caller who can reach that project; a clone no project filed is shared with the whole workspace and is listed for everyone in it. The list is paged: a request without
limitreturns the first 50 voices, andlimitraises that to at most 200. Passcursorfrom the previous response to fetch the next page whilehas_moreis true. API versions before 2026-07-16 returned the whole catalogue whenlimitwas omitted. Narrow the list with thetypeandlocalefilters.A page can come back with fewer than
limitvoices, and a short page - an empty one included - is not the end of the list. Keep followingnext_cursorwhilehas_moreis true.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.voices.list( locale="en", model="simba-3.2", project_id="proj_01arz3ndektsv4rrffq69g5fav", )
-
-
-
cursor:
typing.Optional[str]— Opaque pagination cursor from a previous response.
-
limit:
typing.Optional[int]— Max items per page (default 50, max 200).
-
type:
typing.Optional[ListVoicesRequestType]Filter by voice type:
personal(the workspace's cloned voices) orshared(the public catalogue). Omit to return both.
-
locale:
typing.Optional[str]Filter to voices whose locale matches this BCP-47 language range, prefix-matched:
enmatchesen-USanden-GB;en-USmatches onlyen-US. Case-insensitive. Omit to return all locales.
-
gender:
typing.Optional[ListVoicesRequestGender]— Filter by voice gender. Omit to return all genders.
-
model:
typing.Optional[str]Filter to voices that support this model (as listed in each voice's
models[]), e.g.simba-3.2. Omit to return voices for all models.
-
project_id:
typing.Optional[str]Filter cloned voices by workspace project: omit for every voice you can reach, pass the literal
sharedfor the clones no project filed, or aproj_...id for the clones filed under that project. The shared catalog carries no project and is returned either way.A clone is filed under a project when a project-pinned key created it. A clone with no project is shared with the whole workspace rather than sitting in a Default project, so the literal here is
shared, neverdefault- passingdefaultis a 400. Returns 404 project_not_found for a malformed id and for any project outside your reach: a project-pinned key reaches only its pinned project, and a member holding project grants reaches only the granted ones. That 404 is the same in every case and does not reveal whether such a project exists.sharedis always inside your reach.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.voices.create(...) -> GetVoice
-
-
-
Create a cloned voice for the workspace from a 10-30 second audio sample, with verified consent from the speaker.
Cloning requires proof that the speaker agreed to it. Create a consent challenge with
POST /v1/voices/consent-challenges, show the returnedphraseto the speaker, record them reading it aloud, and send that recording here asconsent_recordingtogether with the challenge'sconsent_challenge_id. Speechify transcribes the recording, checks it against the phrase it issued, checks that its speaker is the speaker in yoursample, and keeps it as the consent record for the voice. The person consenting therefore has to be the person being cloned. A challenge is single use and short-lived, so record and submit in one sitting.The clone belongs to the workspace rather than the member who created it, and access follows the caller's workspace role and API-key scopes exactly as for any other voice: voices scopes to list it, audio scopes to synthesize with it, and the content-management permission plus a write scope on the key to delete it. Cloned voices are usable self-serve on
simba-3.0(and, on a workspace pinned before API version2026-09-21, on the retiredsimba-englishandsimba-multilingual, which from 2026-11-21 are served by our current models and still take cloned voices).simba-3.2andsimba-3.5also serve cloned voices.The previous flow, a
consentform field carrying the speaker's name and email as a JSON string, was switched off on 2026-09-23 for every API version: a create that sendsconsentand noconsent_challenge_idreturns 400consent_verification_required.Voice cloning is not available in some jurisdictions. A request from one returns 403
voice_cloning_unavailable_in_regionbefore consent verification runs, so it does not spend the challenge. The location is read from the IP address that sends the request, which is your server's when your backend calls the API; a location header in the request is ignored.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.voices.create( idempotency_key="a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d", sample="example_sample", avatar="example_avatar", consent_recording="example_consent_recording", name="name", gender="male", consent_challenge_id="consent_challenge_id", )
-
-
-
name:
str— Name of the personal voice
-
gender:
CreateVoicesRequestGenderGender marker for the personal voice male GenderMale female GenderFemale not_specified GenderNotSpecified
-
sample:
core.File— Audio sample of the voice to clone, 10-30 seconds of clean speech.
-
consent_challenge_id:
strThe
idof the consent challenge this create consumes, fromPOST /v1/voices/consent-challenges. Single use: once a create has consumed it, whether or not that create succeeded, it cannot be used again.
-
consent_recording:
core.FileRecording of the speaker reading the challenge's
phrasealoud. This is the consent record for the voice, not a second voice sample: it must be the same person as insample, and it is retained as evidence. 5-30 seconds, at most 25 MB, in any common audio container.
-
idempotency_key:
typing.Optional[str]A client-generated key (an opaque string, max 255 chars) that makes a side-effect POST safe to retry: the server runs the operation exactly once and replays the first response (its status and body) for 24 hours. Reusing a key with a different request body, or while the first request is still in flight, returns
409 idempotency_conflict. A replayed response carries theIdempotent-Replayed: trueheader.
-
locale:
typing.Optional[str]— Native language (locale) of the personal voice (e.g. en-US, es-ES, etc.)
-
avatar:
typing.Optional[core.File]— Avatar image file
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.voices.get(...) -> GetVoice
-
-
-
Fetch a single voice by id - a shared catalogue voice or one of the workspace's cloned voices. A cloned voice that belongs to another workspace returns 404, identical to an unknown id, so voice inventory is never enumerable across tenants.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.voices.get( voice_id="voice_id", )
-
-
-
voice_id:
str— The ID of the voice to fetch
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.voices.delete(...)
-
-
-
Delete one of the workspace's cloned voices. Requires the
content.managepermission (owner, admin, or member); a service-account key is authorized by its scopes instead.A voice that is also a member's personal voice (one cloned before workspaces owned voices and adopted into this workspace) is removed from the workspace only; the person keeps it.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.voices.delete( voice_id="voice_id", )
-
-
-
voice_id:
str— The ID of the voice to delete
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.voices.download_sample(...) -> typing.Iterator[bytes]
-
-
-
Download a personal (cloned) voice sample
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.voices.download_sample( voice_id="voice_id", )
-
-
-
voice_id:
str— The ID of the voice to download sample for
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.projects.list(...) -> ListProjectsResponse
-
-
-
List the workspace's projects, newest first. The implicit Default project is not a row and is never listed; resources with no
project_idlive in it. Archived projects are hidden unlessinclude_archived=true, and purged ones unlessinclude_purged=true. Cursor-paginated: omitcursorfor the first page; walk pages whilehas_moreis true (default page size 50, max 200).
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.projects.list()
-
-
-
cursor:
typing.Optional[str]— Opaque pagination cursor from a previous response.
-
limit:
typing.Optional[int]— Max items per page (default 50, max 200).
-
include_archived:
typing.Optional[bool]Include archived projects. Defaults to
false, so the list shows only live projects; archived ones stay readable by id.
-
include_purged:
typing.Optional[bool]Include purged projects that are still inside their 30-day restore window, each carrying the
purged_atstamp its deadline is measured from. Defaults tofalse, so the list shows only projects that still exist. This is the only read that returns a purged project: the by-id read answers 404 for one, and a project past its window is never listed, because it is awaiting permanent deletion and a restore would refuse it. Independent ofinclude_archived: a purge runs only from the archived state, so asking for purged projects never means asking for every archived one as well.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.projects.create(...) -> Project
-
-
-
Create a project in the caller's workspace. Names are unique per workspace (case-insensitive). A workspace holds at most 100 live projects; at the cap the create refuses with
409 project_limit_reacheduntil one is deleted.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.projects.create( name="Production", )
-
-
-
name:
strProject name; unique per workspace (case-insensitive), surrounding whitespace is trimmed.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.projects.get(...) -> Project
-
-
-
Fetch one project by id, scoped to the caller's workspace. Returns 404 for missing or foreign-workspace projects — project existence is never leaked across workspaces.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.projects.get( project_id="proj_01jqr8x9zg5k2m3n4p5q6r7s8t", )
-
-
-
project_id:
str— Project id (prefixed external id,proj_...).
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.projects.delete(...)
-
-
-
Delete a project. With no body it deletes a project that holds nothing, and refuses one that does;
modeis how you say what should happen to what it holds.Empty (no body): the project is removed only while it holds no resources. A project that holds any is refused with 409
project_not_empty, and the refusal enumerates what is inside:error.details.resource_countis the total, anderror.details.contentsnames each kind with a count and up to five names. Every project row also carries that total asresource_count, so an application can find the projects it may delete in one list call. Records of work never hold a project open and are not counted.Detach (
mode: detach): only the grouping row is removed; every resource in the project moves to the implicit Default project, where it stays readable and is listed by?project_id=default. Refused with 409project_has_scoped_credentialswhile an API key, service account, vault credential, webhook endpoint, member grant or pending invite is scoped to the project, because detaching any of those would silently widen it.Purge (
mode: purgewithconfirmequal to the project's name): available only on an ARCHIVED project, because a teardown needs a state you can sit in and reverse first; a live project is refused with the coded409 project_not_archived. Archive the project, confirm it is the one you mean, then purge. The project is removed WITH its contents in one transaction: the resources it holds and its scoped webhook endpoints and vault credentials are deleted, API keys and service accounts pinned to the project are revoked, and member grants and pending-invite scopes on the project are cleared. Resources with a lifecycle and a delete of their own, such as stores, hosted APIs and files, are not removed: they move to the Default project, and because they do hold a project open, an unqualified delete refuses while any of them is in the project. Refused with 409 while a resource that must be released first is still attached (the refusal names it), while a member's only project grant is this one, or while a live invite carries only this project (clearing either would widen that person to the whole workspace, the invite one acceptance earlier).A purge is recoverable for 30 days. The project disappears from every list and read immediately, and its name is freed for reuse, but the project and its resources are kept and permanently deleted only once the window closes.
POST /v1/projects/{project_id}/restorebrings the project and its resources back inside that window; the credentials the purge revoked and the grants it cleared stay that way.The 409 carries the blockers under
error.details.blockers(kind, typedid,name, and theblocksmodes each refuses), their total undererror.details.blocker_count, and, for existing clients, the same rows undererror.details.credentials. The lists are capped at 50 rows; the counts are not, and the refusal is decided on the count.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.projects.delete( project_id="proj_01jqr8x9zg5k2m3n4p5q6r7s8t", mode="purge", confirm="Staging", )
-
-
-
project_id:
str— Project id (prefixed external id,proj_...).
-
mode:
typing.Optional[DeleteProjectRequestMode]detachremoves the grouping row only and moves every resource to the Default project;purgeremoves the project with its contents. Omitted, the delete removes only an empty project.
-
confirm:
typing.Optional[str]Required for
purge: the project's name, exactly as returned by GET. A mismatch answers 400validation_failednaming this field.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.projects.update(...) -> Project
-
-
-
Edit a project in place - its name, its monthly spend limit, or its capacity ceilings - keeping the same id so every grouped resource follows the edit with no re-pointing. Names are unique per workspace (case-insensitive). The limit fields require
billing.manage; a capacity ceiling above the workspace's own is refused, since it could never apply.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.projects.update( project_id="proj_01jqr8x9zg5k2m3n4p5q6r7s8t", )
-
-
-
project_id:
str— Project id (prefixed external id,proj_...).
-
max_requests_per_minute:
typing.Optional[int]Sets the project's request-rate ceiling in requests per minute;
nullremoves it. Must be a positive integer at or below the workspace's widest per-surface request rate over a minute, otherwise the request is refused with400 validation_failednaming the field and the ceiling. Requires thebilling.managepermission. Takes effect on the next request from a credential pinned to the project.
-
name:
typing.Optional[str]New project name; unique per workspace (case-insensitive), surrounding whitespace is trimmed.
-
monthly_budget:
typing.Optional[float]Edits the project's MONTHLY spend limit in US dollars: omit to leave it unchanged, send a positive value to set or change it, or an explicit
0to remove it. Amounts are whole cents written as a plain decimal; a finer value, or exponent notation, is refused rather than rounded. Requires thebilling.managepermission (owners/admins), like the workspace budget — a spend ceiling is a billing control, not a grouping edit. Once the project's billed spend within the current calendar month (UTC) reaches the limit, new billable work attributed to that project is refused with the coded402 project_spend_limit_exceededuntil the month resets or the limit is raised.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.projects.archive(...)
-
-
-
Archive a project. From then on nothing new starts or bills inside it: requests on a credential pinned to the project, and every new piece of work attributed to it, are refused with the coded
409 project_archived. Work already in flight is left to finish. Everything in the project stays readable and its configuration stays editable, and the project still answers by id.Idempotent: archiving an archived project is a no-op. Reverse it with the unarchive operation.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.projects.archive( project_id="proj_01jqr8x9zg5k2m3n4p5q6r7s8t", )
-
-
-
project_id:
str— Project id (prefixed external id,proj_...).
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.projects.unarchive(...)
-
-
-
Lift a project's archive so work and spend resume inside it. Idempotent: unarchiving a live project is a no-op.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.projects.unarchive( project_id="proj_01jqr8x9zg5k2m3n4p5q6r7s8t", )
-
-
-
project_id:
str— Project id (prefixed external id,proj_...).
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.projects.restore(...) -> ProjectRestore
-
-
-
Walk back a purge. A purged project is recoverable for 30 days: its row and its contents are kept, hidden from every list and read, and permanently deleted only once the window expires.
What comes back: the project and exactly the resources the purge removed. A resource you had deleted yourself before the purge stays deleted.
What does NOT come back, on purpose: every credential the purge revoked stays revoked, and every grant it cleared stays cleared. API keys and service accounts pinned to the project are not re-issued, vault credentials and webhook endpoints scoped to it are not undeleted, and member grants and pending-invite scopes are not restored. Bringing a credential or a grant back would re-grant access somebody deliberately ended, so the restore reports them under
still_revokedinstead. Re-create the credentials and re-grant the members the project still needs.The project returns ARCHIVED, the state it was purged from, so nothing dispatches or bills inside it until you unarchive it.
Refused with
409 project_not_purgedwhen the project was never purged,409 project_restore_window_expiredonce the 30 days have passed, and409 project_name_takenwhen another project has taken this one's name since the purge (a purge frees the name immediately- rename the project holding it, then restore).
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.projects.restore( project_id="proj_01jqr8x9zg5k2m3n4p5q6r7s8t", )
-
-
-
project_id:
str— Project id (prefixed external id,proj_...).
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.projects.audit(...) -> ProjectAuditResponse
-
-
-
Who changed this project's access or its lifecycle state, and when. Newest first. Covers the last 90 days; paginate by passing
cursorfrom the previous response.Each entry names the SUBJECT (whose access changed) and the ACTOR (who changed it), with the role the actor held at the time. When a change was made by Speechify support acting on the workspace's behalf, the entry also carries that admin's email, so a support-initiated change never reads as one a colleague made.
Requires
members.manage_project_scope(owner or admin): who widened a member's access is a stronger fact than who currently holds it. Returns 404 for missing or foreign-workspace projects.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.projects.audit( project_id="proj_01jqr8x9zg5k2m3n4p5q6r7s8t", )
-
-
-
project_id:
str— Project id (prefixed external id,proj_...).
-
cursor:
typing.Optional[str]— Opaque pagination cursor from a previous response.
-
limit:
typing.Optional[int]— Max items per page (default 50, max 200).
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.projects.list_members(...) -> ProjectMembersResponse
-
-
-
List the workspace members granted access to this project, oldest grant first. Paginate by passing
cursorfrom the previous response.A member with no grants anywhere is workspace-wide and does not appear here: this lists people who have been narrowed to specific projects, not everyone who can reach this one.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.projects.list_members( project_id="proj_01jqr8x9zg5k2m3n4p5q6r7s8t", )
-
-
-
project_id:
str— Project ID.
-
cursor:
typing.Optional[str]— Opaque pagination cursor from a previous response.
-
limit:
typing.Optional[int]— Max items per page (default 50, max 200).
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.projects.grant_member(...)
-
-
-
Grant a workspace member access to this project. Once a member holds any grant, they see and touch only the projects they have been granted.
Requires
members.manage_project_scope(owner or admin). An owner or billing admin cannot be scoped: both already hold workspace-wide access that a project scope would contradict without restricting anything. Idempotent: granting a project the member already holds is a no-op.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.projects.grant_member( project_id="proj_01jqr8x9zg5k2m3n4p5q6r7s8t", user_id="user_kb3fim3yjnyto3kxli4g4ysdmyzgiuttjrudswlkgbawk", )
-
-
-
project_id:
str— Project ID.
-
user_id:
str— The prefixed user id of the workspace member to grant.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.projects.revoke_member(...)
-
-
-
Remove a member's access to this project.
A member who loses their last grant is not locked out - they return to workspace-wide access, because holding no grants is the unrestricted state. To restrict someone, grant them the projects they should keep rather than revoking everything. Requires
members.manage_project_scope.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.projects.revoke_member( project_id="proj_01jqr8x9zg5k2m3n4p5q6r7s8t", user_id="user_kb3fim3yjnyto3kxli4g4ysdmyzgiuttjrudswlkgbawk", )
-
-
-
project_id:
str— Project ID.
-
user_id:
str— The member's prefixed user id, as returned by the members list.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.workspaces.get_entitlements() -> EntitlementsResponse
-
-
-
The per-tier entitlements catalog plus the caller's RESOLVED entitlements for the current workspace (tier defaults composed with any per-tenant override). Readable with an API key as well as a console session: it is how an integration learns what it may use before a feature endpoint answers
402. Branch oncurrent.voice_cloningandcurrent.hosted_apis_access, and size traffic fromcurrent.tts_requests_per_secondandcurrent.tts_concurrency. The console renders quota affordances and upgrade-card limits from the same single server-authoritative source instead of a hardcoded mirror.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.workspaces.get_entitlements()
-
-
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.audio.watermark.detect(...) -> WatermarkDetectionResponse
-
-
-
Check whether a clip carries the watermark Speechify seals into audio it generates. Upload the audio as
audio; nothing about it is stored, and no voice is read or written.Read the answer carefully in one direction. A
watermarked: trueis positive evidence that the audio came from Speechify synthesis. Awatermarked: falseis NOT proof that it did not: only models redeployed since the watermark shipped mark their output, the detector needs at least three seconds of clear speech to judge, and re-encoding or changing the speed of a clip degrades the mark. Treat a negative as the absence of evidence rather than as evidence of absence.Checks are rate-limited well below the synthesis budget: this is a forensic question, not a data-plane call.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.audio.watermark.detect( audio="example_audio", )
-
-
-
audio:
core.FileThe clip to check, at most 25MB. Give the detector at least three seconds of clear speech; below that its confidence is not worth acting on, and below half a second it always reports zero.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.audio.watermark.verify(...) -> WatermarkVerificationResponse
-
-
-
The public AI detection tool. Ask whether a clip carries the watermark Speechify seals into audio it generates, with no account, no API key and no credential of any kind.
verifyanswers;detectmeasures. This route returns a bare yes or no, the way verifying a signature does. Its siblingPOST /v1/audio/watermark/detecttakes an API key and returns the detector's confidence alongside the verdict.This is the programmatic half of the tool published at https://speechify.ai/detect, and it exists so the tool can be invoked without visiting our website, as California's AI Transparency Act (BPC 22757.2) requires. Nothing about the clip is stored, and nothing identifying about you is collected or retained.
The answer is a bare verdict.
watermarked: trueis positive evidence that the audio came from Speechify synthesis.watermarked: falseis NOT proof that it did not: only models redeployed since the watermark shipped mark their output, the detector needs at least three seconds of clear speech to judge, and re-encoding or changing the speed of a clip degrades the mark. Treat a negative as the absence of evidence rather than as evidence of absence.Because the tool takes no credential, it is rate-limited per client address and shares a platform-wide budget: expect a 429 under sustained automated use, and retry after the interval the response advertises. Use
POST /v1/audio/watermark/detectwith an API key for the detector's confidence score and a per-workspace allowance of its own.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.audio.watermark.verify( audio="example_audio", )
-
-
-
audio:
core.FileThe clip to check, at most 25MB. Give the detector at least three seconds of clear speech; below that its answer is not worth acting on.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.voices.consent_challenges.create(...) -> ConsentChallenge
-
-
-
Start the consent check for a voice clone.
Returns a
phrasefor the speaker to read aloud and anidthat identifies this challenge. Show the phrase to the speaker exactly as returned, record them reading it, then send the recording and theidtoPOST /v1/voices, which verifies the recording against the phrase and against the voice sample being cloned, then keeps it as the consent record.A challenge is single use, is bound to the workspace that created it, and expires at
expires_at- it is proof that a speaker was in front of a microphone just now, so create it when you are ready to record, not at the start of your flow. If it expires, create another one and record again.Challenge creation is rate limited per workspace at a few dozen per hour, far more tightly than the rest of the voice surface, because each one precedes a person recording themselves - mint it when your speaker is ready, not speculatively. Read the live ceiling off
RateLimit-*rather than hard-coding it. On a429, always honourRetry-Afterrather than a fixed backoff of your own: the wait is measured in minutes and can run to most of an hour.RateLimit-*are omitted rather than reporting a bucket that is not the one refusing.Like
POST /v1/voices, a challenge requested from a jurisdiction where voice cloning is not available returns 403voice_cloning_unavailable_in_regionand issues no phrase. The location is read from the IP address that sends the request, which is your server's when your backend calls the API.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.voices.consent_challenges.create( idempotency_key="a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d", full_name="Jane Doe", )
-
-
-
full_name:
strFull name of the person consenting to have their voice cloned. Speechify binds it to the challenge and stores it with the consent record, so the create that consumes the challenge does not carry it and cannot change it.
At most 120 bytes once UTF-8 encoded, which is 120 characters of Latin script but around 40 of Chinese, Japanese or Korean. Stated in bytes rather than as a
maxLengthbecause the two only agree on single-byte scripts, and a character count that never over-accepts would have to refuse Latin names at 30. A name over the limit comes back asvalidation_failedreporting its measured length.
-
idempotency_key:
typing.Optional[str]A client-generated key (an opaque string, max 255 chars) that makes a side-effect POST safe to retry: the server runs the operation exactly once and replays the first response (its status and body) for 24 hours. Reusing a key with a different request body, or while the first request is still in flight, returns
409 idempotency_conflict. A replayed response carries theIdempotent-Replayed: trueheader.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.webhooks.endpoints.list(...) -> ListWebhookEndpointsResponse
-
-
-
The caller's workspace's registered webhook endpoints. Cursor-paginated: omit
cursorfor the first page; walk pages whilehas_moreis true (default page size 50, max 200). The signingsecretis never returned here — it is shown only when an endpoint is created or its secret is rotated. Filter by delivery scope withproject_id.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.webhooks.endpoints.list( project_id="proj_01arz3ndektsv4rrffq69g5fav", )
-
-
-
cursor:
typing.Optional[str]— Opaque pagination cursor from a previous response.
-
limit:
typing.Optional[int]— Max items per page (default 50, max 200).
-
project_id:
typing.Optional[str]Filter endpoints by project scope: omit for everything the caller may see, pass the literal
sharedfor workspace-wide endpoints only, or aproj_...id for endpoints scoped to that project. Endpoints have no Default project - a nullproject_idmeans workspace-wide, so the literal here isshared, neverdefault. Returns 404 project_not_found for a malformed id and for any project outside your reach: a project-pinned API key or service-account key reaches only its pinned project, and a member holding project grants reaches only the granted projects. That 404 is the same in every case and does not reveal whether such a project exists - outside your reach a project is answered as nonexistent, never as forbidden.sharedis always inside your reach. Inside it, a well-formed id that matches nothing yields an empty page.
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.webhooks.endpoints.create(...) -> WebhookEndpoint
-
-
-
Register a webhook endpoint. Speechify mints an HMAC signing secret and returns it in the response
secretfield — exactly once. Store it then; subsequent reads omit it (rotate it with the rotate-secret action if lost). Select events viaenabled_events: a list of catalog event names or["*"]for every event. Optionally scope delivery to one project withproject_id; omit it for a workspace-wide endpoint that receives every project's events. Limited to 50 endpoints per workspace.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.webhooks.endpoints.create( url="https://example.com/speechify/webhooks", enabled_events=[ "project.spend_budget.warning" ], description="Example description.", )
-
-
-
url:
strHTTPS destination for event deliveries. Must be a publicly reachable host: loopback, private, link-local, and cloud-metadata addresses (and reserved hostnames like
localhost) are rejected.
-
enabled_events:
typing.List[str]— Catalog event names to subscribe to, or["*"]for all events.
-
project_id:
typing.Optional[str]Optionally scope the endpoint to one project (prefixed
proj_...id): a scoped endpoint receives only that project's events. Omit (or null) for workspace-wide - it receives every project's events. An unknown id returns 404 project_not_found. A project-pinned API key creates into its own project and cannot name the workspace-wide tier.
-
include:
typing.Optional[typing.List[str]]Optional payload-shaping keys (see
WebhookEndpoint.include). Omit for the lean default.
-
api_version:
typing.Optional[datetime.date]Optionally pin the endpoint's payload shape to a dated version (
YYYY-MM-DD, seeWebhookEndpoint.api_version). Omit to use the workspace's current version. An unknown version is rejected.
-
description:
typing.Optional[str]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.webhooks.endpoints.get(...) -> WebhookEndpoint
-
-
-
Fetch a webhook endpoint by id. The signing secret is never returned.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.webhooks.endpoints.get( webhook_endpoint_id="whe_01jqr8x9zg5k2m3n4p5q6r7s8t", )
-
-
-
webhook_endpoint_id:
str— Webhook endpoint id (prefixedwhe_…).
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.webhooks.endpoints.delete(...)
-
-
-
Delete a webhook endpoint. In-flight deliveries stop; returns 204 on success.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.webhooks.endpoints.delete( webhook_endpoint_id="whe_01jqr8x9zg5k2m3n4p5q6r7s8t", )
-
-
-
webhook_endpoint_id:
str— Webhook endpoint id (prefixedwhe_…).
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.webhooks.endpoints.update(...) -> WebhookEndpoint
-
-
-
Partial update; omitted fields are left unchanged. Set
disabledto pause delivery without deleting the endpoint.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.webhooks.endpoints.update( webhook_endpoint_id="whe_01jqr8x9zg5k2m3n4p5q6r7s8t", url="https://example.com/webhook", enabled_events=[ "example" ], description="Example description.", disabled=False, )
-
-
-
webhook_endpoint_id:
str— Webhook endpoint id (prefixedwhe_…).
-
url:
typing.Optional[str]HTTPS destination for event deliveries. Must be a publicly reachable host: loopback, private, link-local, and cloud-metadata addresses (and reserved hostnames like
localhost) are rejected.
-
project_id:
typing.Optional[str]Re-scope the endpoint: a
proj_...id narrows it to that project's events, an explicit null makes it workspace-wide (every project's events), omitted leaves it unchanged. The signing secret and delivery history are untouched, so re-scoping never requires redeploying your receiver. An unknown id returns 404 project_not_found. A project-pinned API key may only scope an endpoint to its own project.
-
enabled_events:
typing.Optional[typing.List[str]]
-
include:
typing.Optional[typing.List[str]]Payload-shaping keys (see
WebhookEndpoint.include). Send[]to clear back to the lean default.
-
api_version:
typing.Optional[datetime.date]Opt the endpoint into a different (typically newer) payload shape (
YYYY-MM-DD, seeWebhookEndpoint.api_version). Omit to leave it unchanged. An unknown version is rejected.
-
description:
typing.Optional[str]
-
disabled:
typing.Optional[bool]
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.webhooks.endpoints.rotate_secret(...) -> WebhookEndpoint
-
-
-
Mint a new HMAC signing secret for the endpoint and return it in the response
secretfield (shown exactly once). The previous secret stops signing immediately, so accept both during your cutover window.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.webhooks.endpoints.rotate_secret( webhook_endpoint_id="whe_01jqr8x9zg5k2m3n4p5q6r7s8t", )
-
-
-
webhook_endpoint_id:
str— Webhook endpoint id (prefixedwhe_…).
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-
client.webhooks.endpoints.list_deliveries(...) -> ListWebhookEndpointDeliveriesResponse
-
-
-
Delivery attempts for one webhook endpoint, newest first. One row per (endpoint, event, resource), updated in place across retries. Each row includes the exact request payload and signed headers Speechify sent (
request_body,request_headers) and the response your server returned (last_status_code,last_response_body,last_response_headers), so you can verify the signature and debug failures. Cursor-paginated: omitcursorfor the first page; walk pages whilehas_moreis true (default page size 50, max 200).An endpoint that was not a target of an event has no row for it: a project-scoped endpoint records nothing for another project's events. An empty list therefore means either nothing matched or nothing happened. To tell them apart, check the project's own activity first: activity there with no delivery here is a defect to report; none there means there was nothing to deliver.
-
-
-
from speechify import Speechify from speechify.environment import SpeechifyEnvironment client = Speechify( token="<token>", environment=SpeechifyEnvironment.DEFAULT, ) client.webhooks.endpoints.list_deliveries( webhook_endpoint_id="whe_01jqr8x9zg5k2m3n4p5q6r7s8t", )
-
-
-
webhook_endpoint_id:
str— Webhook endpoint id (prefixedwhe_…).
-
cursor:
typing.Optional[str]— Opaque pagination cursor from a previous response.
-
limit:
typing.Optional[int]— Max items per page (default 50, max 200).
-
request_options:
typing.Optional[RequestOptions]— Request-specific configuration.
-
-