All URIs are relative to https://api.bakuage.com:443
| Method | HTTP request | Description |
|---|---|---|
| createAudio | POST /audios | Create a new audio. |
| downloadAudio | GET /audios/{id}/download | Download an audio data by id. |
| downloadAudioByToken | GET /audios/download_by_token | Download an audio data by audio_download_token. |
| getAudio | GET /audios/{id} | Get an audio by id. |
| getAudioAnalysis | GET /audios/{id}/analysis | Get an audio analysis by id. |
| getAudioDownloadToken | GET /audios/{id}/download_token | Get an audio download token by id. |
| listAudios | GET /audios | Get all audios accessable. |
Audio createAudio(opts)
Create a new audio.
var Aimastering = require('aimastering');
var defaultClient = Aimastering.ApiClient.instance;
// Configure API key authorization: bearer
var bearer = defaultClient.authentications['bearer'];
bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearer.apiKeyPrefix = 'Token';
var apiInstance = new Aimastering.AudioApi();
var opts = {
'file': "/path/to/file.txt", // File | The file to upload.
'name': "name_example" // String | Audio name. If this is not specified, the name in file parameter is used.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.createAudio(opts, callback);| Name | Type | Description | Notes |
|---|---|---|---|
| file | File | The file to upload. | [optional] |
| name | String | Audio name. If this is not specified, the name in file parameter is used. | [optional] |
- Content-Type: multipart/form-data
- Accept: application/json
'Blob' downloadAudio(id)
Download an audio data by id.
var Aimastering = require('aimastering');
var defaultClient = Aimastering.ApiClient.instance;
// Configure API key authorization: bearer
var bearer = defaultClient.authentications['bearer'];
bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearer.apiKeyPrefix = 'Token';
var apiInstance = new Aimastering.AudioApi();
var id = 56; // Number | Audio id
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.downloadAudio(id, callback);| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | Audio id |
'Blob'
- Content-Type: Not defined
- Accept: application/octet-stream
'Blob' downloadAudioByToken(downloadToken)
Download an audio data by audio_download_token.
var Aimastering = require('aimastering');
var defaultClient = Aimastering.ApiClient.instance;
// Configure API key authorization: bearer
var bearer = defaultClient.authentications['bearer'];
bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearer.apiKeyPrefix = 'Token';
var apiInstance = new Aimastering.AudioApi();
var downloadToken = "downloadToken_example"; // String | Audio download token
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.downloadAudioByToken(downloadToken, callback);| Name | Type | Description | Notes |
|---|---|---|---|
| downloadToken | String | Audio download token |
'Blob'
- Content-Type: Not defined
- Accept: application/octet-stream
Audio getAudio(id)
Get an audio by id.
var Aimastering = require('aimastering');
var defaultClient = Aimastering.ApiClient.instance;
// Configure API key authorization: bearer
var bearer = defaultClient.authentications['bearer'];
bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearer.apiKeyPrefix = 'Token';
var apiInstance = new Aimastering.AudioApi();
var id = 56; // Number | Audio id
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getAudio(id, callback);| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | Audio id |
- Content-Type: Not defined
- Accept: application/json
AudioAnalysis getAudioAnalysis(id)
Get an audio analysis by id.
var Aimastering = require('aimastering');
var defaultClient = Aimastering.ApiClient.instance;
// Configure API key authorization: bearer
var bearer = defaultClient.authentications['bearer'];
bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearer.apiKeyPrefix = 'Token';
var apiInstance = new Aimastering.AudioApi();
var id = 56; // Number | Audio id
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getAudioAnalysis(id, callback);| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | Audio id |
- Content-Type: Not defined
- Accept: application/json
AudioDownloadToken getAudioDownloadToken(id)
Get an audio download token by id.
var Aimastering = require('aimastering');
var defaultClient = Aimastering.ApiClient.instance;
// Configure API key authorization: bearer
var bearer = defaultClient.authentications['bearer'];
bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearer.apiKeyPrefix = 'Token';
var apiInstance = new Aimastering.AudioApi();
var id = 56; // Number | Audio id
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.getAudioDownloadToken(id, callback);| Name | Type | Description | Notes |
|---|---|---|---|
| id | Number | Audio id |
- Content-Type: Not defined
- Accept: application/json
[Audio] listAudios()
Get all audios accessable.
var Aimastering = require('aimastering');
var defaultClient = Aimastering.ApiClient.instance;
// Configure API key authorization: bearer
var bearer = defaultClient.authentications['bearer'];
bearer.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//bearer.apiKeyPrefix = 'Token';
var apiInstance = new Aimastering.AudioApi();
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
apiInstance.listAudios(callback);This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json