Skip to main content
POST
/
v1
/
notes
/
from-audio
/
generate-upload-url
curl --request POST \
  --url https://api.caret.so/v1/notes/from-audio/generate-upload-url \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{
    "fileExtension": "m4a",
    "duration": 3600
  }'
{
  "presignedUrl": "https://caret-cdn.s3.us-west-1.amazonaws.com/audio/temp_upload_...",
  "audioUrl": "https://caret-cdn.s3.us-west-1.amazonaws.com/audio/temp_upload_...",
  "contentType": "audio/mp4"
}
This endpoint is available only for Enterprise plan users.

Request Body

fileExtension
string
required
The file extension of the audio file (e.g., m4a, mp3, wav, aac)
duration
number
required
Duration of the audio file in seconds (maximum 4 hours / 14400 seconds)

Response

presignedUrl
string
The presigned URL to upload the audio file using PUT request
audioUrl
string
The final URL where the audio will be accessible after upload
contentType
string
The content type to use when uploading the file
curl --request POST \
  --url https://api.caret.so/v1/notes/from-audio/generate-upload-url \
  --header 'X-API-Key: <your_api_key>' \
  --header 'Content-Type: application/json' \
  --data '{
    "fileExtension": "m4a",
    "duration": 3600
  }'
{
  "presignedUrl": "https://caret-cdn.s3.us-west-1.amazonaws.com/audio/temp_upload_...",
  "audioUrl": "https://caret-cdn.s3.us-west-1.amazonaws.com/audio/temp_upload_...",
  "contentType": "audio/mp4"
}

Usage

After receiving the presigned URL, upload your audio file:
curl --request PUT \
  --url "<presignedUrl>" \
  --header "Content-Type: audio/mp4" \
  --data-binary @your-audio-file.m4a
Then use the audioUrl with the Create Note from Audio endpoint.