Skip to navigation

UploadStaticClip

View as Markdown

Upload a static voice clip (your own recording, sent as is) for a STATIC voice step, as a multipart file part whose own Content-Type is the audio’s MIME type. The clip may be at most 50 seconds long and 25 MiB large. Returns the clipId to use in the sequence step, the measured duration and a best-effort transcript. Never clones a voice. The optional name part is not stored yet; identify a clip by its clipId.

Quality findings (no detected speech, clipping) come back as warnings with a null clipId and s3Key, and nothing is stored; re-submit the same audio with ignoreSoftWarnings=true to store it. transcriptStatus and transcriptFailureReason say why a transcript is absent; the clip is stored either way.

Errors

  • 400 VOICE_AUDIO_MISSING, VOICE_AUDIO_TOO_LARGE, VOICE_AUDIO_UNSUPPORTED or VOICE_AUDIO_DURATION_OUT_OF_RANGE: change the file.
  • 403 NO_ACTIVE_SUBSCRIPTION or VOICE_NOTES_NOT_ENABLED.
  • 503 VOICE_AUDIO_PROCESSING_UNAVAILABLE: the audio could not be processed on our side. Transient, so retry the same file in a few minutes.

Headers

X-API-KEYstringOptional

API key header using this scheme. Example: “X-API-KEY: {API_KEY}”

Query parameters

ignoreSoftWarningsbooleanOptional
Set to true to store the clip despite the warnings a previous call returned for the same audio. Defaults to false.

Request

This endpoint expects a multipart form containing a file.
filefileRequired

The clip, at most 50 seconds and 25 MiB. The part’s own Content-Type must be the audio’s MIME type.

namestringOptional
Not stored yet.

Response

OK
clipIdinteger or null

The stored clip’s id, for staticClipId in a sequence step. Null on a warning response.

durationMsinteger
transcriptStatusenum

DONE, NO_SPEECH or FAILED for a stored clip; NONE on a warning response.

Allowed values:
warningslist of objects

Soft findings: NO_SPEECH or LOW_QUALITY.

s3Keystring or nullOptional

Storage key. Null on a warning response; never needed by API callers.

transcriptstring or nullOptional
transcriptFailureReasonstring or nullOptional

Set only when transcriptStatus is FAILED: PROVIDER_ERROR, NOT_CONFIGURED, OUT_OF_CREDITS, TEMPORARILY_UNAVAILABLE or AUDIO_REJECTED.

Errors

400
Upload Static Clip Voice Request Bad Request Error
403
Upload Static Clip Voice Request Forbidden Error
503
Upload Static Clip Voice Request Service Unavailable Error