Developers / Speech to Text
Download a completed STT job as TXT, SRT or JSON
https://api.echonova.ai/v1/speech-to-text/jobs/{jobId}/exportReturns the transcript of a completed API job of this key's workspace as a file: txt is the transcription text, srt is subtitles of at most 7 seconds and two 42-character lines per cue, each prefixed with its speaker label when speakers were identified, and json carries the text, speakers and timed segments. lang sets the language of the speaker labels. A job that has not completed answers 400; a job of another workspace answers 404. Needs Speech to Text access on the key.
Headers
Bearer, a space, then your API key, which starts with ek_. Create keys in the portal under Developers, API Keys.
Path parameters
The jobId the API returned when the job was created.
Query parameters
txt: the transcript text. srt: subtitles, one cue per few seconds, each tagged with its speaker when known. json: text, speakers and timed segments.
Language of the speaker labels: en gives "Speaker 1", ar gives "المتحدث 1".
Response
200 text/plain, application/x-subrip, application/json The body is the file itself, not the envelope, with Content-Disposition: attachment and its file name. Errors still use the envelope.
Errors
Same envelope, with success false and data null. All errors
When. jobId is not a 24-character hexadecimal id.
Fix. Use the id exactly as the create call returned it.
When. The format query parameter is missing or is not txt, srt or json.
Fix. Send format=txt, format=srt or format=json.
When. The lang query parameter is something other than en or ar.
Fix. Send lang=en or lang=ar, or leave it out for en.
When. The job is pending, processing or failed; only a completed job has a transcript to download.
Fix. Wait for the job.completed webhook or poll GET /v1/speech-to-text/jobs/{jobId} until status is completed.
When. The body or query carries a field the endpoint does not define.
Fix. Remove the field.
When. The Authorization header is missing or is not Bearer ek_..., no key matches the token, or the key is deleted, disabled or its account is closed.
Fix. Send Authorization: Bearer ek_... with an enabled key from this environment.
When. The workspace that owns the key has no subscription.
Fix. Check the workspace's plan in the portal.
When. The subscription is in a state other than active or trial.
Fix. Renew the subscription.
When. The key is restricted and Speech to Text is not among its services.
Fix. Edit the key and grant Speech to Text, or use another key.
When. The job id is unknown, or the job belongs to another workspace or was made in the portal.
Fix. Use a jobId from this workspace's API jobs.
When. The key made more than 100 requests to one endpoint in 60 seconds, or one IP address made more than 100 requests to one endpoint in 60 seconds (the IP limit is counted before the key is checked, so it can answer with no key at all); a Retry-After header carries the seconds to wait.
Fix. Wait Retry-After seconds, then retry.
When. An error the API did not classify.
Fix. Check the request, then retry after a short wait; contact support if it persists.
When. A transient outage inside the API.
Fix. Retry after a short wait.
When. A transient timeout inside the API.
Fix. Retry after a short wait.
curl "https://api.echonova.ai/v1/speech-to-text/jobs/{jobId}/export?format=srt" \
-H "Authorization: Bearer YOUR_API_KEY" \
-o download.srtالسلام عليكم، كيف حالك؟ بخير، الحمد لله.