All URIs are relative to https://api.bakuage.com:443
| Method | HTTP request | Description |
|---|---|---|
| create_audio | POST /audios | Create a new audio. |
| download_audio | GET /audios/{id}/download | Download an audio data by id. |
| download_audio_by_token | GET /audios/download_by_token | Download an audio data by audio_download_token. |
| get_audio | GET /audios/{id} | Get an audio by id. |
| get_audio_analysis | GET /audios/{id}/analysis | Get an audio analysis by id. |
| get_audio_download_token | GET /audios/{id}/download_token | Get an audio download token by id. |
| list_audios | GET /audios | Get all audios accessable. |
Audio create_audio(opts)
Create a new audio.
# load the gem
require 'aimastering'
# setup authorization
Aimastering.configure do |config|
# Configure API key authorization: bearer
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = Aimastering::AudioApi.new
opts = {
file: File.new("/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.
}
begin
#Create a new audio.
result = api_instance.create_audio(opts)
p result
rescue Aimastering::ApiError => e
puts "Exception when calling AudioApi->create_audio: #{e}"
end| 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
String download_audio(id)
Download an audio data by id.
# load the gem
require 'aimastering'
# setup authorization
Aimastering.configure do |config|
# Configure API key authorization: bearer
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = Aimastering::AudioApi.new
id = 56 # Integer | Audio id
begin
#Download an audio data by id.
result = api_instance.download_audio(id)
p result
rescue Aimastering::ApiError => e
puts "Exception when calling AudioApi->download_audio: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| id | Integer | Audio id |
String
- Content-Type: Not defined
- Accept: application/octet-stream
String download_audio_by_token(download_token)
Download an audio data by audio_download_token.
# load the gem
require 'aimastering'
# setup authorization
Aimastering.configure do |config|
# Configure API key authorization: bearer
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = Aimastering::AudioApi.new
download_token = "download_token_example" # String | Audio download token
begin
#Download an audio data by audio_download_token.
result = api_instance.download_audio_by_token(download_token)
p result
rescue Aimastering::ApiError => e
puts "Exception when calling AudioApi->download_audio_by_token: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| download_token | String | Audio download token |
String
- Content-Type: Not defined
- Accept: application/octet-stream
Audio get_audio(id)
Get an audio by id.
# load the gem
require 'aimastering'
# setup authorization
Aimastering.configure do |config|
# Configure API key authorization: bearer
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = Aimastering::AudioApi.new
id = 56 # Integer | Audio id
begin
#Get an audio by id.
result = api_instance.get_audio(id)
p result
rescue Aimastering::ApiError => e
puts "Exception when calling AudioApi->get_audio: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| id | Integer | Audio id |
- Content-Type: Not defined
- Accept: application/json
AudioAnalysis get_audio_analysis(id)
Get an audio analysis by id.
# load the gem
require 'aimastering'
# setup authorization
Aimastering.configure do |config|
# Configure API key authorization: bearer
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = Aimastering::AudioApi.new
id = 56 # Integer | Audio id
begin
#Get an audio analysis by id.
result = api_instance.get_audio_analysis(id)
p result
rescue Aimastering::ApiError => e
puts "Exception when calling AudioApi->get_audio_analysis: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| id | Integer | Audio id |
- Content-Type: Not defined
- Accept: application/json
AudioDownloadToken get_audio_download_token(id)
Get an audio download token by id.
# load the gem
require 'aimastering'
# setup authorization
Aimastering.configure do |config|
# Configure API key authorization: bearer
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = Aimastering::AudioApi.new
id = 56 # Integer | Audio id
begin
#Get an audio download token by id.
result = api_instance.get_audio_download_token(id)
p result
rescue Aimastering::ApiError => e
puts "Exception when calling AudioApi->get_audio_download_token: #{e}"
end| Name | Type | Description | Notes |
|---|---|---|---|
| id | Integer | Audio id |
- Content-Type: Not defined
- Accept: application/json
Array<Audio> list_audios
Get all audios accessable.
# load the gem
require 'aimastering'
# setup authorization
Aimastering.configure do |config|
# Configure API key authorization: bearer
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = Aimastering::AudioApi.new
begin
#Get all audios accessable.
result = api_instance.list_audios
p result
rescue Aimastering::ApiError => e
puts "Exception when calling AudioApi->list_audios: #{e}"
endThis endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json