Connections

View Markdown

Overview

Connections let you link your own S3-compatible storage to Ittybit. Once connected, you can ingest files directly from your storage and push task outputs back to your own buckets.


Supported providers

Connections work with any S3-compatible storage provider:

  • Amazon S3
  • Cloudflare R2
  • Google Cloud Storage (S3-compatible mode)
  • Supabase Storage
  • DigitalOcean Spaces
  • MinIO

Creating a connection

You can create connections via the webapp or the API:

curl -X POST "https://api.ittybit.com/connections" \
-H "Authorization: Bearer ITTYBIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "name": "Production S3",
  "kind": "s3",
  "endpoint": "https://s3.us-east-1.amazonaws.com",
  "region": "us-east-1",
  "access_key_id": "AKIA...",
  "secret_access_key": "..."
}'

Connection object

{
  "id": "con_abcdefgh12345678",
  "object": "storage_connection",
  "kind": "s3",
  "name": "Production S3",
  "endpoint": "https://s3.us-east-1.amazonaws.com",
  "region": "us-east-1",
  "access_key_id": "AKIA...",
  "secret_access_key": "...",
  "is_default": false,
  "created_at": "2025-01-01T00:00:00.000Z",
  "updated_at": "2025-01-01T00:00:00.000Z"
}

Default connection

You can set a connection as the default for your project. The default connection is used whenever a connection_id is not explicitly provided for ingest or upload tasks.

curl -X PATCH "https://api.ittybit.com/connections/con_abcdefgh12345678" \
-H "Authorization: Bearer ITTYBIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "is_default": true }'

Using connections with tasks

Ingest from your storage

Pass connection_id and an s3:// URL when creating a task:

{
  "url": "s3://my-bucket/videos/input.mp4",
  "connection_id": "con_abcdefgh12345678",
  "kind": "video",
  "options": {
    "width": 1280,
    "format": "mp4"
  }
}

If you have a default connection set, you can omit connection_id for s3:// URLs.

Push outputs to your storage

Add a destination with an s3:// path to automatically upload the output when the task completes. The connection_id is shared between the input URL and destination:

{
  "url": "s3://my-bucket/videos/input.mp4",
  "connection_id": "con_abcdefgh12345678",
  "kind": "video",
  "destination": "s3://my-bucket/processed/output.mp4",
  "options": {
    "width": 1280,
    "format": "mp4"
  }
}

Using runs for independent connections

For more control — e.g. ingesting from one provider and uploading to another — use the /runs endpoint with explicit ingest and upload tasks:

{
  "tasks": [
    {
      "kind": "ingest",
      "options": {
        "connection_id": "con_source",
        "bucket": "source-bucket",
        "key": "uploads/input.mp4"
      },
      "next": [
        {
          "kind": "video",
          "options": { "width": 1280, "format": "mp4" },
          "next": [
            {
              "kind": "upload",
              "options": {
                "connection_id": "con_dest",
                "bucket": "dest-bucket",
                "key": "processed/output.mp4"
              }
            }
          ]
        }
      ]
    }
  ]
}

Managing connections

List connections

curl "https://api.ittybit.com/connections" \
-H "Authorization: Bearer ITTYBIT_API_KEY"

Update a connection

curl -X PATCH "https://api.ittybit.com/connections/con_abcdefgh12345678" \
-H "Authorization: Bearer ITTYBIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "Updated S3 Connection" }'

Delete a connection

curl -X DELETE "https://api.ittybit.com/connections/con_abcdefgh12345678" \
-H "Authorization: Bearer ITTYBIT_API_KEY"

API Reference

See the API Reference for the full list of connection endpoints.

API Reference