Skip to main content
POST
/
builds
/
upload-url
Get upload URL for build context
curl --request POST \
  --url https://api.pipecat.daily.co/v1/builds/upload-url \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "region": "us-west"
}
'
{
  "uploadId": "550e8400-e29b-41d4-a716-446655440000",
  "uploadUrl": "https://daily-co-pcc-build-context.s3.amazonaws.com",
  "uploadFields": {
    "key": "org-123/550e8400-e29b-41d4-a716-446655440000.tar.gz",
    "Content-Type": "application/gzip",
    "policy": "eyJleHBpcmF0aW9uIjoi...",
    "x-amz-signature": "abc123..."
  },
  "expiresAt": "2026-02-20T12:15:00.000Z"
}

Uploading Your Context

After receiving the upload URL and fields, upload your context archive using a multipart form POST request:
# Get the upload URL
RESPONSE=$(curl -s -X POST "https://api.pipecat.daily.co/v1/builds/upload-url" \
  -H "Authorization: Bearer $PIPECAT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "contentLength": 10485760,
    "region": "us-west"
  }')

# Extract fields from response
UPLOAD_URL=$(echo $RESPONSE | jq -r '.uploadUrl')
UPLOAD_ID=$(echo $RESPONSE | jq -r '.uploadId')
KEY=$(echo $RESPONSE | jq -r '.uploadFields.key')

# Upload the context archive (must be gzipped tar)
curl -X POST "$UPLOAD_URL" \
  -F "key=$KEY" \
  -F "Content-Type=application/gzip" \
  -F "policy=$(echo $RESPONSE | jq -r '.uploadFields.policy')" \
  -F "x-amz-signature=$(echo $RESPONSE | jq -r '.uploadFields[\"x-amz-signature\"]')" \
  -F "x-amz-credential=$(echo $RESPONSE | jq -r '.uploadFields[\"x-amz-credential\"]')" \
  -F "x-amz-algorithm=$(echo $RESPONSE | jq -r '.uploadFields[\"x-amz-algorithm\"]')" \
  -F "x-amz-date=$(echo $RESPONSE | jq -r '.uploadFields[\"x-amz-date\"]')" \
  -F "file=@context.tar.gz"

echo "Upload ID: $UPLOAD_ID"
The context archive must be a gzipped tar file (.tar.gz). The upload URL validates both the content type and file size.

Creating the Context Archive

Your context archive should contain your Dockerfile and all files needed for the build:
# Create a tar.gz of your project
tar -czvf context.tar.gz \
  --exclude='.git' \
  --exclude='node_modules' \
  --exclude='__pycache__' \
  --exclude='.venv' \
  .
The maximum context size is 500MB. Use a .dockerignore file to exclude unnecessary files and keep your context small for faster uploads and builds.

Authorizations

Authorization
string
header
required

Authentication using a Pipecat Cloud API token.

Body

application/json
region
string
required

Target region for the build. Must be a region where cloud builds are enabled.

Example:

"us-west"

Response

Upload URL generated successfully

uploadId
string<uuid>

Unique identifier for this upload. Use this when creating the build.

Example:

"550e8400-e29b-41d4-a716-446655440000"

uploadUrl
string<uri>

Pre-signed URL to upload your context archive. Use HTTP POST with form-data.

Example:

"https://daily-co-pcc-build-context.s3.amazonaws.com"

uploadFields
object

Form fields that must be included when uploading to the pre-signed URL.

Example:
{
"key": "org-123/550e8400-e29b-41d4-a716-446655440000.tar.gz",
"Content-Type": "application/gzip",
"policy": "eyJleHBpcmF0aW9uIjoi...",
"x-amz-signature": "abc123..."
}
expiresAt
string<date-time>

When the upload URL expires. Upload must complete before this time.

Example:

"2026-02-20T12:15:00.000Z"