> ## Documentation Index
> Fetch the complete documentation index at: https://docs.daily.co/llms.txt
> Use this file to discover all available pages before exploring further.

# setBandwidth()

> Sets a cap on upstream camera video bandwidth.

`setBandwidth({ kbs, trackConstraints? })`

<Badge color="red">{"✗"} Prebuilt</Badge> <Badge color="green">{"✓"} Custom</Badge>

<Warning>
  Daily's built-in bandwidth management handles most use cases automatically. Only use `setBandwidth()` if you have a specific need — and if you do, [reach out to us](https://www.daily.co/contact/support) so we can better support your use case.
</Warning>

Sets a soft cap on the upstream camera video bandwidth.

In **SFU mode** (the default for all calls), `kbs` caps the total upstream bandwidth across all simulcast layers — Daily sends as many layers as fit within the cap, starting from the lowest.

In **peer-to-peer mode**, `kbs` is a per-peer bitrate target.

## Parameters

<ParamField body="kbs" type="number | 'NO_CAP'">
  Upstream camera bandwidth cap in kilobits per second. Pass `'NO_CAP'` to remove a previously set cap. Does not include audio or screenshare bandwidth.
</ParamField>

<ParamField body="trackConstraints" type="MediaTrackConstraints" deprecated>
  Deprecated in 0.75.0. Use [`updateInputSettings()`](/reference/daily-js/instance-methods/update-input-settings) instead.
</ParamField>

## Return value

Returns `this` for chaining.

## Example

```javascript theme={null}
// Cap at 20kbps with small frame dimensions
call.setBandwidth({ kbs: 20 });

// Remove the cap
call.setBandwidth({ kbs: 'NO_CAP' });
```

## See also

<CardGroup>
  <Card title="Methods" icon="code" iconType="solid">
    * [updateSendSettings()](/reference/daily-js/instance-methods/update-send-settings)
    * [updateInputSettings()](/reference/daily-js/instance-methods/update-input-settings)
    * [getNetworkStats()](/reference/daily-js/instance-methods/get-network-stats)
  </Card>

  <Card title="Guides" icon="book-open" iconType="solid">
    * [Call quality](/docs/daily-js/guides/network-quality)
  </Card>
</CardGroup>
