When starting a bot, you can configure recording settings to capture the conversation. These settings allow you to specify the recording type and storage location.

Recording Types

There are two types of recordings available: cloud recordings and raw tracks.

Cloud Recordings

Cloud recordings are the default recording type and provide a simple way to record your calls. The recording will be stored in Daily’s cloud storage or optionally in your own custom S3 bucket.

{
  "recording_settings": {
    "type": "cloud"
  }
}

Raw Tracks

Raw tracks provide separate audio files for each participant in the call, giving you more flexibility for post-processing. To record with raw tracks, you need to specify your own custom S3 bucket for storage.

{
  "recording_settings": {
    "type": "raw-tracks"
  }
}

Recording storage

Recording storage can be configured in two ways: Daily’s cloud storage or your own S3 bucket.

Daily Cloud Storage

By default, your recordings will be stored in Daily’s cloud storage. You can access your recordings through the REST API. For more information on how to do that, see the API reference for getting recordings.

Custom S3 Bucket Configuration

You can configure your own S3 bucket to store recordings by providing the recordings_bucket settings:

{
  "recording_settings": {
    "type": "raw-tracks",
    "recordings_bucket": {
      "assume_role_arn": "arn:aws:iam::123456789012:role/YourRole",
      "bucket_name": "your-recordings-bucket",
      "bucket_region": "us-west-2",
      "allow_api_access": true,
      "allow_streaming_from_bucket": true
    }
  }
}

Need help setting up your S3 bucket? Check out Daily’s S3 bucket configuration guide.

You’ll need your Daily domain name, which can be found in the Daily Bots Dashboard: Account (top right corner) > Manage account > Daily Account.

Required Bucket Settings

PropertyDescription
assume_role_arnThe ARN of the IAM role that Daily will assume to access your bucket
bucket_nameThe name of your S3 bucket
bucket_regionThe AWS region where your bucket is located

Optional Bucket Settings

PropertyDescription
allow_api_accessEnable API access to recordings in your bucket
allow_streaming_from_bucketEnable streaming of recordings directly from your bucket

Example /bots/start Request with Recording

Here’s a simple example of starting a bot with recording enabled:

{
  "bot_profile": "voice_2024_10",
  "max_duration": 600,
  "services": {
    "llm": "anthropic",
    "tts": "cartesia"
  },
  "service_options": {
    "anthropic": {
      "model": "claude-3-5-sonnet-latest"
    }
  },
  "recording_settings": {
    "type": "raw-tracks",
    "recordings_bucket": {
      "assume_role_arn": "arn:aws:iam::123456789012:role/YourRole",
      "bucket_name": "your-recordings-bucket",
      "bucket_region": "us-west-2"
    }
  },
  "config": [
    {
      "service": "tts",
      "options": [
        {
          "name": "voice",
          "value": "79a125e8-cd45-4c13-8a67-188112f4dd22"
        }
      ]
    },
    {
      "service": "llm",
      "options": [
        {
          "name": "initial_messages",
          "value": [
            {
              "role": "user",
              "content": [
                {
                  "type": "text",
                  "text": "You are an assistant called Daily Bot. You can ask me anything. Keep responses brief and legible. Start by briefly introducing yourself. Your responses will be converted to audio."
                }
              ]
            }
          ]
        },
        {
          "name": "run_on_config",
          "value": true
        }
      ]
    }
  ]
}

Make sure your S3 bucket has the appropriate permissions and that the provided IAM role has the necessary permissions to write to the bucket.