The Speak AI API exposes 4 exports endpoints under the base URL https://api.speakai.co/v1. Every request needs the x-speakai-key and x-access-token headers described in Authentication.
Export collection enables export of media (audio, video + text) details: transcript, analytics and insights.
What can you do with the exports endpoints?
Speak AI groups these 4 endpoints under the exports resource. Each entry below links to the full reference for that endpoint further down this page.
Export a media file
/media/export/{mediaId}/{fileType}Export one audio or video file from Speak AI as a document, a caption file, or its source file.
Which formats can you export?
Pass the format as the fileType path parameter. Speak AI documents PDF, TXT, DOCX, SRT, VTT, and the source file itself as MP4.
Which formats are unsupported?
Not every format fits every record. You cannot export a text note to .srt, .ttml, or .vtt, and you cannot export an audio or video file to .html.
Which prefix do you use?
The export route is mounted at three prefixes, /media, /text, and /prompt, and all three reach the same handler. The prefix does not change the result. Speak AI reads the record that mediaId belongs to and exports it in the format fileType names, so POST /media/export/{mediaId}/{fileType} and POST /text/export/{mediaId}/{fileType} return the same file for the same id.
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
mediaId |
path | string | Yes | Id of the record to export. |
fileType |
path | string | Yes | pdf, txt, vtt, srt, docx, ttml, word, html, json, csv, csv-insights, csv-transcript |
isSpeakerNames |
query | boolean | No | |
isTimeStamps |
query | boolean | No | |
isInsightVisualized |
query | boolean | No | Provide anything truthy. To indicate ‘falsy’ value omit this parameter or leave it empty. |
isRedacted |
query | boolean | No |
curl -X POST 'https://api.speakai.co/v1/media/export/a59b93b67685/csv?isSpeakerNames=true&isTimeStamps=true&isInsightVisualized=true&isRedacted=true' \
-H 'x-speakai-key: sk_test_speak_0000000000000000' \
-H 'x-access-token: eyJhbGciOiJIUzI1NiJ9.test-access-token.0000000000'200 OK
Example response (TXT), text/plain. Arrays are shortened to one entry and long strings are cut.
Speak Transcript - txt
Video Name: How To Find Your First Analyzed Video
Date: Monday, December 14, 2020 12:09 PM
0:00:00
Speaker #1
Hey there, in this video will show you how you can actually access the first
0:00:03
Speaker #2
video that you've uploaded. So right now we're in the sign in screen. All you have to do hit the sign in button. You're going to be redirected to the dashboard and you can sort of see some of the statistics and everything there, but what you're actually looking to do is hit the button where you can see the little video icon.
Your list is actually going to
...Example response (SRT), text/plain. Arrays are shortened to one entry and long strings are cut.
1
00:00:00,000 --> 00:00:05,920
Updated
2
00:00:05,920 --> 00:00:08,440
Is this speak AI? Yes it is.
3
00:00:08,440 --> 00:00:13,840
Yeah, I was looking at the company and
notice here that you develop software
right?
4
00:00:13,840 --> 00:00:19,240
Yes, and I wanted to see if your
company's ever applied for the irap
grants.
5
00:00:19,240 --> 00:00:22,480
Yes we have. We have a have a person
6
00:00:22,480 --> 00:00:25,360
that we've sponsored right now and then
we,
7
00:00:25,360 --> 00:00:28,240
you know, I wrap your kickoff projects
here.
8
00:00:28,240 --> 00:00:31,840
So we've got
...Response body, application/json.
| Field | Type |
|---|---|
status |
string |
message |
string |
Example response (unsupported format.), application/json.
{
"status": "failed",
"message": "Can't export text object to .srt, try .docx or .pdf instead."
}Example response (JSON), application/json. Arrays are shortened to one entry and long strings are cut.
{
"mediaId": "875777809d88",
"name": "How To Customize Your Account & Interactive Media Players Globally",
"description": "Tyler shows you how to customize your account at the global level for audio and video.",
"tags": [
"speak"
],
"duration": "136",
"createdAt": "2020-08-19T01:34:31.000Z",
"state": "processed",
"remark": "",
"summary": "Hi there, in this video I'm going to show you how you can actually customize your account globally, so that if you're sharing I frames are custom landing pages, whether audio or ...",
"sentiment": {
"document": {
"Negative": 2.857142857142857,
"Neutral": 28.57142857142857,
"Positive": 68.57142857142857
},
"sentences": [
{
"id": 1,
"instances": [
{
"adjustedEnd": "0:00:05.85",
"adjustedStart": "0:00:00",
"end": "0:00:05.85",
"start": "0:00:00"
}
],
"score": {
"compound": 0,
"neg": 0,
"neu": 1,
"pos": 0
},
"text": "Hi there, in this video I'm going to show you how you can actually customize your account globally,"
}
]
},
"transcript": [
{
"speakerId": 1,
"text": "Hi there, in this video I'm going to show you how you can actually customize your account globally, so that if you're sharing I frames are custom landing pages, whether audio or vi...",
"start": "0:00:00",
"link": "https://app.speakai.co/video/insight/875777809d88?insight=transcript&timeStart=0:00:00"
}
]
}Example response (CSV), text/csv. Arrays are shortened to one entry and long strings are cut.
MediaId,Media Name,Tags,Duration,Created At,State,Remark,Summary,Overall sentiment,Sentence id,Speaker name,Sentence start time,Sentence end time,Sentence duration,Transcript,Sentiment,Insight category,Insight,Insight starts at,Insight ends at
875777809d88,How To Customize Your Account & Interactive Media Players Globally,speak,136,Tue Aug 18 2020 21:34:31 GMT-0400 (Eastern Daylight Time),processed,,Hi there, in this video I'm going to show you how you can actually customize your account globally, so that if you're sharing I frames are custom landing pages, whether audio or video, that the s
...Multi-export
/media/exportMultipleYou can export multiple media at once. We’re going to zip the documents and send it to you as an arraybuffer.
Request body
Field types and names come from the request body the spec records. The spec does not mark request body fields as required, so read this as the shape the endpoint accepts rather than a required field list.
| Field | Type |
|---|---|
mediaIds |
string[] |
fileType |
string |
isSpeakerNames |
boolean |
isTimeStamps |
boolean |
isInsightVisualized |
boolean |
isRedacted |
boolean |
isMerged |
boolean |
curl -X POST 'https://api.speakai.co/v1/media/exportMultiple' \
-H 'x-speakai-key: sk_test_speak_0000000000000000' \
-H 'x-access-token: eyJhbGciOiJIUzI1NiJ9.test-access-token.0000000000' \
-H 'Content-Type: application/json' \
-d '{
"mediaIds": [
"a59b93b67685",
"dsd33b676asd"
],
"fileType": "pdf",
"isSpeakerNames": true,
"isTimeStamps": true,
"isInsightVisualized": true,
"isRedacted": true,
"isMerged": false
}'200 Success
The spec records this status code with no example body.
Export through the prompt prefix
/prompt/export/{mediaId}/{fileType}Export one record from Speak AI through the /prompt prefix. The response is the same as the /media prefix returns for the same id.
Which formats can you export?
Pass the format as the fileType path parameter. Speak AI documents PDF, TXT, DOCX, SRT, VTT, and the source file itself as MP4.
Which formats are unsupported?
Not every format fits every record. You cannot export a text note to .srt, .ttml, or .vtt, and you cannot export an audio or video file to .html.
Which prefix do you use?
The export route is mounted at three prefixes, /media, /text, and /prompt, and all three reach the same handler. The prefix does not change the result. Speak AI reads the record that mediaId belongs to and exports it in the format fileType names, so POST /media/export/{mediaId}/{fileType} and POST /text/export/{mediaId}/{fileType} return the same file for the same id.
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
mediaId |
path | string | Yes | Id of the record to export. |
fileType |
path | string | Yes | pdf, txt, vtt, srt, docx, ttml, word, html, json, csv, csv-insights, csv-transcript |
isSpeakerNames |
query | boolean | No | |
isTimeStamps |
query | boolean | No | |
isInsightVisualized |
query | boolean | No | Provide anything truthy. To indicate ‘falsy’ value omit this parameter or leave it empty. |
isRedacted |
query | boolean | No |
curl -X POST 'https://api.speakai.co/v1/prompt/export/a59b93b67685/csv?isSpeakerNames=true&isTimeStamps=true&isInsightVisualized=true&isRedacted=true' \
-H 'x-speakai-key: sk_test_speak_0000000000000000' \
-H 'x-access-token: eyJhbGciOiJIUzI1NiJ9.test-access-token.0000000000'200 OK
Response body, application/json.
| Field | Type |
|---|---|
status |
string |
message |
string |
Example response (Unsupported format), application/json.
{
"status": "failed",
"message": "Can't export text object to .srt, try .docx or .pdf instead."
}Export a text note
/text/export/{mediaId}/{fileType}Export one text note from Speak AI as a document. The response is the same as the /media prefix returns for the same id.
Which formats can you export?
Pass the format as the fileType path parameter. Speak AI documents PDF, TXT, DOCX, SRT, VTT, and the source file itself as MP4.
Which formats are unsupported?
Not every format fits every record. You cannot export a text note to .srt, .ttml, or .vtt, and you cannot export an audio or video file to .html.
Which prefix do you use?
The export route is mounted at three prefixes, /media, /text, and /prompt, and all three reach the same handler. The prefix does not change the result. Speak AI reads the record that mediaId belongs to and exports it in the format fileType names, so POST /media/export/{mediaId}/{fileType} and POST /text/export/{mediaId}/{fileType} return the same file for the same id.
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
mediaId |
path | string | Yes | Id of the record to export. |
fileType |
path | string | Yes | pdf, txt, vtt, srt, docx, ttml, word, html, json, csv, csv-insights, csv-transcript |
isSpeakerNames |
query | boolean | No | |
isTimeStamps |
query | boolean | No | |
isInsightVisualized |
query | boolean | No | Provide anything truthy. To indicate ‘falsy’ value omit this parameter or leave it empty. |
isRedacted |
query | boolean | No |
curl -X POST 'https://api.speakai.co/v1/text/export/a59b93b67685/csv?isSpeakerNames=true&isTimeStamps=true&isInsightVisualized=true&isRedacted=true' \
-H 'x-speakai-key: sk_test_speak_0000000000000000' \
-H 'x-access-token: eyJhbGciOiJIUzI1NiJ9.test-access-token.0000000000'200 OK
Response body, application/json.
| Field | Type |
|---|---|
status |
string |
message |
string |
Example response (Unsupported format), application/json.
{
"status": "failed",
"message": "Can't export text object to .srt, try .docx or .pdf instead."
}Related pages
- API reference for the base URL, authentication, and the error format.
- Authenticate with the Speak AI API using access tokens
- Upload audio and video to Speak AI and read insights
- Create and update live transcription sessions in Speak AI
- Analyze text notes with the Speak AI text endpoints
Get an API key on the Speak AI developer page.