Push output files to your own storage

View Markdown

Overview

After ittybit processes your files, you can push the outputs directly to your own S3-compatible storage. This uses connections — saved credentials that securely link your storage provider to ittybit.


1. Create a connection

Save your storage credentials 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": "My S3 Bucket",
  "kind": "s3",
  "endpoint": "https://s3.us-east-1.amazonaws.com",
  "region": "us-east-1",
  "access_key_id": "AKIA...",
  "secret_access_key": "..."
}'

2. Use destination on a task

The simplest approach — pass connection_id and a destination URL when creating a task. Ittybit will automatically upload the output to your storage when the task completes.

curl -X POST "https://api.ittybit.com/tasks" \
-H "Authorization: Bearer ITTYBIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "url": "https://example.com/input.mp4",
  "kind": "video",
  "connection_id": "con_abcdefgh12345678",
  "destination": "s3://my-bucket/output/video-720p.mp4",
  "options": {
    "width": 1280,
    "format": "mp4"
  }
}'

The connection_id is shared between the input url (if it's an s3:// URL) and the destination.


3. Ingest from your storage too

You can also pull input files directly from your own storage using s3:// URLs:

curl -X POST "https://api.ittybit.com/tasks" \
-H "Authorization: Bearer ITTYBIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "url": "s3://my-bucket/uploads/raw-video.mp4",
  "kind": "video",
  "connection_id": "con_abcdefgh12345678",
  "destination": "s3://my-bucket/processed/video-720p.mp4",
  "options": {
    "width": 1280,
    "format": "mp4"
  }
}'

4. Advanced: use runs for more control

For pipelines where ingest and upload tasks need independent connections, use the /runs endpoint to declare each step explicitly:

curl -X POST "https://api.ittybit.com/runs" \
-H "Authorization: Bearer ITTYBIT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
  "tasks": [
    {
      "kind": "ingest",
      "options": {
        "connection_id": "con_source_connection",
        "bucket": "source-bucket",
        "key": "uploads/raw-video.mp4"
      },
      "next": [
        {
          "kind": "video",
          "options": { "width": 1280, "format": "mp4" },
          "next": [
            {
              "kind": "upload",
              "options": {
                "connection_id": "con_dest_connection",
                "bucket": "dest-bucket",
                "key": "processed/video-720p.mp4"
              }
            }
          ]
        }
      ]
    }
  ]
}'

Default connections

If you set a connection as the default for your project, you can omit connection_id from your requests. Ittybit will use the default connection for any s3:// URLs or upload tasks that don't specify one.

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 }'

On this page