Submit an S3 signed url
Process a file by providing the S3 signed url
You can send an s3 presigned url to the API for processing by using the related endpoint
The request is an JSON
body with the following parameters:
Parameter | Description |
---|---|
url | Signed S3 URL pointing to the audio file |
name | An name that describes the audio |
meta | A JSON string that includes additional user-defined information |
embeddings | A boolean parameter (true/false) used to select whether to return embeddings in the response |
Example request:
curl --request POST \
--url https://api.behavioralsignals.com/v5/clients/your-client-id/processes/s3-presigned-url \
--header 'X-Auth-Token: your-api-token' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"url": "https://amzn-s3-demo-bucket.s3.amazonaws.com/object.txt?AWSAccessKeyId=AKIAIOSFODNN7EXAMPLE&Signature=vjbyNxybdZaMmLa%2ByT372YEAiv4%3D&Expires=1741978496",
"name": "my-awesome-audio",
"meta": "{\"key\": \"value\"}"
}'
Example response:
{
"pid": 1,
"cid": "<your-client-id>",
"name": "my-awesome-audio",
"status": 0,
"statusmsg": "Pending",
"duration": 0,
"datetime": "2024-07-19T11:54:37.900Z",
"meta": "{\"key\": \"value\"}"
}
You can also use the Python SDK to submit an S3 url (requires sdk version >= 0.2.0):
from behavioralsignals import Client
client = Client(YOUR_CID, YOUR_API_KEY)
response = client.behavioral.upload_s3_presigned_url(url="https://amzn-s3-demo-bucket.s3.amazonaws.com/object.txt?AWSAccessKeyId=AKIAIOSFODNN7EXAMPLE&Signature=vjbyNxybdZaMmLa%2ByT372YEAiv4%3D&Expires=1741978496")
output = client.behavioral.get_result(pid=response.pid)
Updated 21 days ago