GASTON REST API

GASTON offers a simple REST API interface that allows you to connect your applications and websites to our services and transcribe videos and audio tracks.

The actual file transcription is asynchronous, so after uploading the file to our API, you will receive an ID file, which is processed sequentially.
The audio track is extracted, a spectrogram is created, the language is detected, and the transcription itself is performed. The current state of the file, as well as the acquisition of the transcript and other information, is carried out via the endpoint /media. All overwritten files are saved into media library, just as if they were added through our web app.

GASTON offers a simple REST API interface with which you can connect your applications and websites to our services and transcribe videos and audio tracks.

Authentication

The API key must be inserted into the HTTP Header with each request. After logging in your settings generate an API key that is used for authorization against our REST API. For example:

curl -X 'GET' 'https://api.gaston.live/user/me' -H 'accept: application/json' -H 'token: gapi-1234567890'

You can change your key at any time. in your API settings.

Description of individual endpoints

Exact technical specification in the openapi 3.1 format is here, a simple description of the endpoints follows.

[GET] /user/me

The endpoint is used to obtain basic information about the authenticated user and also contains information about the service usage - How many API files are left.

[GET] /media/list

Endpoint for listing already processed files in the library. Available parameters:
- dir_id: Specifies ID of a directory you want to list (optional)
- page: Specify the page you want to list. Rows are paginated by 50 records

The information about the files is brief and does not contain the actual text transcript of the file.

[GET] /media

The endpoint returns complete information about the file, including transcription, word timing, and available translations. You can filter version of the file by defining lang parameter is the request If specified lang=en and the file is translated into English, the English sentences are listed.

[PATCH] /media

Here you can move a media file into a directory. Available parameters:
- media_id: ID of media file you want to move.
- dir_id: ID of a directory you want media move to.

NOTE: If you want to move files into root directory, leave the dir_id parameter empty.

[POST] /media/transcribe

Endpoint for uploading a media file for transcription. Maximum file size is 2Gb. The endpoint has the ability to specify the language spoken in the recording. If the language is not specified, it will be automatically detected. If the language is known, it is recommended to specify it for better speed. The endpoint also supports setting the file name in the library. If not specified, the file name will be used. After a successful call the endpoint will respond with information including ID file and its status.
Available parameters:
- lang: Language of the file. Leave empty for auto-detection.
- dir_id: ID of a directory you want media move into after transcription.

[POST] /media/transcribe-url

Similar to the previous endpoint, this one is used to transcribe a video from a URL address of one of the supported streaming services. After entering the video URL, the file will be automatically downloaded and processed. Available parameters:
- url: URL of a website where the media is located.
- lang: Language of the file. Leave empty for auto-detection.
- dir_id: ID of a directory you want media move into after transcription.

[POST] /media/translate

Translates an already transcribed file into the selected language. Currently, about 40 languages are available. The progress of the translation into the given language, as well as the available language mutations for each file, is indicated by an associative fieldavailable_languages, where the key is the language name and the value is the percentage of translation progress.

For example, the following status means that the file is 100% transcribed into Slovak, and the translation into English is still in progress and is at 66%:
available_languages: { sk: 100, en: 66 }

Available parameters:
- media_id: ID of media file you want to translate.
- target_lang: Target language you want a media translate to.

[PATCH] /media/diarize

This endpoint will start or restart diarization of a media file. Every language mutation have separate diary of speakers. In other words, you can have diarized English version of a file and NOT diarized Spanish version of a file. Available parameters:
- media_id: ID of media file you want to diarize.
- lang: Language you want to diarize.
- speakers: Number of speakers in the file. Leave empty for auto-detection

[GET] /directory/tree

Recursively list directory tree.

[POST] /directory

Create new directory.

Available parameters:
- title: Title of a new directory.
- dir_id: Parent directory where the new directory should be created. Leave empty if you want new directory to be created in the root directory.

[DELETE] /directory

Removes a directory.

Available parameters:
- dir_id: ID of a directory to be removed

NOTE: This method only deletes a directory. It will NOT remove any files within the directory. All child directories are also deleted recursively.

[PATCH] /directory

Endpoint is meant for renaming a directory or moving directory to another.

Available parameters:
- dir_id: ID of a directory to be moved/renamed
- title: Fill in if you want to rename directory.
- parent_id: If you want to move directory to another, this is ID of the new parent directory.

[GET] /sentence/search

Here you can search for a sentences in your transcriptions.

Available parameters:
- query: Search query. You can use "OR" and "AND" operators and wildcard* characters.
- _from: Number of the first record to start from.
- _max: Maximum number of returned rows.
- dir_ids: List of IDs of directories to search in. Leave empty for global search.
- lang: Filter language of sentences to be search in.

Conclusion

Our API is not limited in any way (except for the monthly quota according to the user's plan). For technical support, write to us at any time at contact@streams.guru. We are constantly expanding endpoints and functionality.

GASTON REST API