POST
/
spaces
/
{owner}
/
{space}
/
audios
curl --request POST \
  --url https://api.loccus.ai/v1/spaces/{owner}/{space}/audios \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "handle": "audio-a",
  "alias": "Audio A",
  "identity": "identity-a",
  "file": "VGhpcyBpcyBub3QgYSByZWFsIGZpbGU="
}'
{
  "id": "00000000-0000-0000-0000-000000000000",
  "handle": "audio-a",
  "alias": "Audio A",
  "state": "available",
  "duration": "PT3.500S",
  "voiceDuration": "PT3.500S",
  "frequency": 8000,
  "identity": {
    "handle": "identity-a",
    "alias": "Identity A"
  },
  "voiceprints": 10,
  "verifications": 10,
  "createdAt": "2023-01-01T00:00:00.000000Z",
  "uploadedAt": "2023-01-01T00:00:00.000000Z"
}

To upload a media file as an audio, it must meet the specified requirements and be properly encoded as a Base64 string.

Authorizations

Authorization
string
headerrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

owner
string
required

The handle of the owner.

space
string
required

The handle of the space.

Body

application/json
handle
string | null

The handle of the new audio. Must be unique.

alias
string | null

The alias of the new audio.

identity
string | null

The handle of the identity linked to the new audio.

file
string

The base64-encoded content of the binary file of the new audio.

Response

201 - application/json
id
string
required

The UUID of the audio. Is unique.

handle
string
required

The handle of the audio. Is unique.

alias
string | null
required

The alias of the audio.

state
enum<string>
required

The state of the audio.

Available options:
avaitingFile,
available,
notAvailable
duration
string
required

The duration of the audio.

voiceDuration
string
required

The voice duration of the audio.

frequency
integer
required

The sampling frequency of the audio.

identity
object | null
required

The identity linked to the audio.

voiceprints
integer
required

The number of voiceprints of the audio.

verifications
integer
required

The number of verifications of the audio.

createdAt
string
required

The date and time when the audio was created.

uploadedAt
string
required

The date and time when the binary file was uploaded.