Speech to Text

Cancel job

Stop the files of a job that haven't started yet.

POST/v1/stt/jobs/{id}/cancel

Cancels every file that is still queued and releases the credits held for them immediately. Files already being transcribed finish normally and are charged; canceled files are never charged. When the running files finish, a job with any canceled file ends with status canceled, and its webhook (if any) is sent. Requires an API key with all permission.

from wistfareai import WistfareAI

client = WistfareAI()  # reads WISTFARE_API_KEY

job = client.speech_to_text.jobs.cancel("sttjob_k3n8q2x7d1v9m4b6c0zt")
print(job.totals)

Path parameters

ParameterTypeDescription
idstringThe job id, sttjob_….

Response

200 OK with the updated job object. Canceled files have status: "canceled"; files that were already running are still running and finish on their own.

Errors

StatusCodeMeaning
401unauthorizedMissing, invalid or revoked API key.
403read_only_keyThe key is read-only.
404not_foundNo job with this id in the key's project.
409job_finishedThe job has already finished (completed, partial, failed or canceled). The SDKs raise ConflictError.

On this page