Connect storage

Jobs read source video and write outputs through a project storage connection (AWS S3). This uses the sk_prj_… key from the previous page — workspace keys cannot call storage routes.

What you need

  • A project API key with storage_connection:create (and storage_connection:update to re-test).
  • IAM access key with read/write on the bucket (the API probes before saving).
  • The video object can be uploaded later; connectivity tests only need bucket access.

1. Probe credentials (optional)

POST /v1/storage-connections/probe tests keys and buckets without saving a connection. Failed probes return 422 and are safe to retry. See Storage connections → Probe.

POST /v1/storage-connections/probe
curl -X POST "{BASE_URL}/v1/storage-connections/probe" \
  -H "Authorization: Bearer {PROJECT_KEY}" \
  -H "Content-Type: application/json" \
-d '{
    "region": "{AWS_REGION}",
    "accessKeyId": "{AWS_ACCESS_KEY_ID}",
    "secretAccessKey": "{AWS_SECRET_ACCESS_KEY}",
    "buckets": [{ "name": "{S3_BUCKET}" }]
  }'

2. Create the connection

POST /v1/storage-connections encrypts the secret and runs the same probes. On success lastTestStatus is ok. Save data.connectionId.

POST /v1/storage-connections
curl -X POST "{BASE_URL}/v1/storage-connections" \
  -H "Authorization: Bearer {PROJECT_KEY}" \
  -H "Content-Type: application/json" \
-d '{
    "name": "{STORAGE_CONNECTION_NAME}",
    "provider": "s3",
    "region": "{AWS_REGION}",
    "accessKeyId": "{AWS_ACCESS_KEY_ID}",
    "secretAccessKey": "{AWS_SECRET_ACCESS_KEY}",
    "buckets": [
      {
        "name": "{S3_BUCKET}",
        "defaultOutputPrefix": "{S3_OUTPUT_PREFIX}"
      }
    ]
  }'

3. Test connectivity later

POST /v1/storage-connections/{connectionId}/test re-runs probes on the stored credentials. Use this as a health check; it does not change buckets or keys.

POST /v1/storage-connections/{connectionId}/test
curl -X POST "{BASE_URL}/v1/storage-connections/{CONNECTION_ID}/test" \
  -H "Authorization: Bearer {PROJECT_KEY}"

Run the script

Replace {…} placeholders. Copy connectionId from create into the test URL.

Probe, create, and test
# Optional: probe credentials without saving
curl -X POST "{BASE_URL}/v1/storage-connections/probe" \
  -H "Authorization: Bearer {PROJECT_KEY}" \
  -H "Content-Type: application/json" \
-d '{
    "region": "{AWS_REGION}",
    "accessKeyId": "{AWS_ACCESS_KEY_ID}",
    "secretAccessKey": "{AWS_SECRET_ACCESS_KEY}",
    "buckets": [{ "name": "{S3_BUCKET}" }]
  }'

# Create — the API tests the bucket before saving. Copy data.connectionId.
curl -X POST "{BASE_URL}/v1/storage-connections" \
  -H "Authorization: Bearer {PROJECT_KEY}" \
  -H "Content-Type: application/json" \
-d '{
    "name": "{STORAGE_CONNECTION_NAME}",
    "provider": "s3",
    "region": "{AWS_REGION}",
    "accessKeyId": "{AWS_ACCESS_KEY_ID}",
    "secretAccessKey": "{AWS_SECRET_ACCESS_KEY}",
    "buckets": [
      { "name": "{S3_BUCKET}", "defaultOutputPrefix": "{S3_OUTPUT_PREFIX}" }
    ]
  }'

# Re-test later
curl -X POST "{BASE_URL}/v1/storage-connections/{CONNECTION_ID}/test" \
  -H "Authorization: Bearer {PROJECT_KEY}"