Returns a dictionary mapping species names to arrays of top HighValueClip objects.
Upload Audio Files
Uploads audio files for a given deployment. A maximum of 20 audio files can be uploaded in a single request.
HTTP request
POST https://api.darukaa.com/api/v1/deployments/{deployment_id}/audio/upload
Path parameters
Parameter
Type
Required
Description
deployment_id
string
Yes
Deployment identifier against which audio files are being uploaded
Headers
Header
Value
Required
Authorization
Bearer
Yes
Content-Type
application/json
Yes
Request body
The request body contains data with the following structure:
{"files":["data:audio/wav;base64,..."]}
Field
Type
Required
Description
files
array[string]
Yes
List of audio files encoded as base64 strings. Each string should be in format: "data:audio/{format};base64,{base64_encoded_data}"
Upload limits
Limit Type
Value
Description
Max files per request
20
Hard limit on number of files per request
Max audio file size
25 MB
Per file size limit
Max audio duration
300 seconds (5 minutes)
Per file duration limit
Supported formats
wav, mp3, m4a, webm
Audio file formats accepted
Example request
importbase64deployment_id="deployment_123"# Read and encode audio filewithopen("audio_sample.wav","rb")asaudio_file:audio_data=base64.b64encode(audio_file.read()).decode('utf-8')audio_base64=f"data:audio/wav;base64,{audio_data}"payload={"files":[audio_base64]}response=requests.post(f"https://api.darukaa.com/api/v1/deployments/{deployment_id}/audio/upload",headers=headers,json=payload)
constdeploymentId="deployment_123";// Read and encode audio fileconstfileInput=document.querySelector('input[type="file"]');constfile=fileInput.files[0];constreader=newFileReader();reader.onload=asyncfunction(e){constbase64=e.target.result.split(',')[1];constaudioBase64=`data:audio/wav;base64,${base64}`;constresponse=awaitfetch(`https://api.darukaa.com/api/v1/deployments/${deploymentId}/audio/upload`,{method:'POST',headers:{'Authorization':`Bearer ${accessToken}`,'Content-Type':'application/json'},body:JSON.stringify({files:[audioBase64]})});};reader.readAsDataURL(file);
# Note: For cURL, you'll need to base64 encode the file first# base64 audio_sample.wav > audio_base64.txtcurl-XPOST"https://api.darukaa.com/api/v1/deployments/deployment_123/audio/upload"\-H"Authorization: Bearer <your_access_token>"\-H"Content-Type: application/json"\-d'{"files": ["data:audio/wav;base64,<base64_encoded_audio_data>"]}'
Status codes
Code
Description
201
Success - Audio files uploaded successfully
400
Bad Request - Invalid file format or exceeds size limit
401
Unauthorized - Invalid or missing access token
404
Not Found - Deployment with the specified ID does not exist
{"error":{"code":"UNAUTHORIZED","message":"Invalid or missing access token","details":"Please provide a valid Bearer token in the Authorization header","request_id":"req_abc123","timestamp":"2025-12-04T13:30:00Z"}}
Failure (404)
{"error":{"code":"FILE_NOT_FOUND","message":"File not found","details":"No file exists with the ID: aacxxxa6-bxxd-44c4-xxxx-8ed1xxxx0b9","request_id":"req_abc123","timestamp":"2025-12-04T13:30:00Z"}}
Field
Type
Description
file_id
UUID string
ID of the file on which inference was executed
data
object
Contains inference prediction results + model metadata
data.predictions
array
List of predicted outputs from the inference model
{"error":{"code":"UNAUTHORIZED","message":"Invalid or missing access token","details":"Please provide a valid Bearer token in the Authorization header","request_id":"req_abc123","timestamp":"2025-12-04T13:30:00Z"}}
Failure (404)
{"error":{"code":"DEPLOYMENT_NOT_FOUND","message":"Deployment not found","details":"No deployment exists with the ID: aacxxxa6-bxxd-44c4-xxxx-8ed1xxxx0b9","request_id":"req_abc123","timestamp":"2025-12-04T13:30:00Z"}}
Field
Type
Description
file_id
UUID string
Unique identifier of the file stored in deployment
name
string
Original filename or assigned reference name
url
string
Cloud storage path / signed URL reference for download or inference
created_at
datetime
Timestamp when file was uploaded/registered
updated_at
datetime
Timestamp of last modification or metadata update
deployment_id
UUID string
ID of deployment the file belongs to
uploaded_by_user
object
Details of uploader account
uploaded_by_user.email
string
Email of uploader
uploaded_by_user.first_name
string
First name of uploader
uploaded_by_user.created_at
datetime
Timestamp user account was created
uploaded_by_user.updated_at
datetime
Timestamp of last profile update
inferences
array
List of inference runs made on this file (empty if none)
List Files Needing Inference
Retrieves files for a deployment that do not have an inference record.
HTTP request
GET https://api.darukaa.com/api/v1/admin/files/{deployment_id}/inference
Path parameters
Parameter
Type
Required
Description
deployment_id
string (UUID)
Yes
Deployment identifier to filter files with no inference record
Not Found - Deployment with the specified ID does not exist
Response body
Success (200)
[{"file_id":"aac71ba6-bd8d-44c4-b4c0-8ed1594f0b9","name":"audio_sample_2025_12_04.wav","url":"gs://bucket/path/to/file.wav","created_at":"2025-12-04T13:30:00Z","updated_at":"2025-12-04T13:30:00Z","deployment_id":"aac71ba6-bd8d-44c4-b4c0-8ed1594f0b9","location":{"location_id":"32667a47-61e6-47d4-b259-29ba70f5e8b2","location_name":"Site A - Device 1","location":"12.3456, 78.9012","created_at":"2025-12-04T13:30:00Z","updated_at":"2025-12-04T13:30:00Z","site_id":"32667a47-61e6-47d4-b259-29ba70f5e8b2"}}]
Failure (401)
{"error":{"code":"UNAUTHORIZED","message":"Invalid or missing access token","details":"Please provide a valid Bearer token in the Authorization header","request_id":"req_abc123","timestamp":"2025-12-04T13:30:00Z"}}
Failure (404)
{"error":{"code":"DEPLOYMENT_NOT_FOUND","message":"Deployment not found","details":"No deployment exists with the ID: aacxxxa6-bxxd-44c4-xxxx-8ed1xxxx0b9","request_id":"req_abc123","timestamp":"2025-12-04T13:30:00Z"}}
Field
Type
Description
file_id
UUID string
Unique ID of the file pending inference
name
string
Original filename or assigned display name
url
string
Cloud storage location or signed URL for fetching the file