# Speed Class

Adjust upload and download bandwidth limits for individual SIMs.

Similar to AWS EC2 instance sizes and the Azure VM series, Soracom IoT SIMs can be configured to adjust the maximum upload and download bandwidth. Adjustments are made by setting an IoT SIM's **Speed Class**, with each class corresponding to a specific bandwidth:

**Global Coverage**

| <br>Speed Class | Download Speed | Upload Speed | plan01s | plan01s - LDV | plan-US | planP1 | planX3 | planX3-EU |
| - | - | - | - | - | - | - | - | - |
| <br>s1.minimum | 32 kbps | 32 kbps | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| <br>s1.slow | 128 kbps | 128 kbps | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| <br>s1.standard | 512 kbps | 512 kbps | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| <br>s1.fast | 2 Mbps | 2 Mbps | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
| <br>s1.4xfast | 8 Mbps | 8 Mbps | ✓ (Default) | ✓ (Default) | ✓ (Default) | ✓ (Default) | ✓ (Default) | ✓ (Default) |
| <br>s1.8xfast | 16 Mbps | 16 Mbps | | | ✓ | | | |

**Japan Coverage**

| <br>Speed Class | Download Speed | Upload Speed | plan-D (no bundle) | plan-D 300MB | plan-DU | plan-K | plan-K2 | plan-KM1\*1 |
| - | - | - | - | - | - | - | - | - |
| <br>s1.minimum | 32 kbps | 32 kbps | ✓ | ✓ | | ✓ | ✓ | |
| <br>s1.slow | 128 kbps | 128 kbps | ✓ | ✓ | | ✓ | ✓ | |
| <br>s1.standard | 512 kbps | 512 kbps | ✓ (Default) | ✓ | | ✓ (Default) | ✓ | |
| <br>s1.fast | 2 Mbps | 2 Mbps | ✓ | ✓ | | ✓ | ✓ | |
| <br>s1.4xfast | 8 Mbps | 8 Mbps | ✓ | ✓ (Default) | | ✓ | ✓ (Default) | |
| <br>t1.standard | 2 Mbps | 2 Mbps | | | | | | ✓ (Default) |
| <br>u1.slow | 128 kbps | 128 kbps | | | ✓ | | | |
| <br>u1.standard | 4 Mbps | No limit | | | ✓ (Default) | | | |

1. Although **t1.standard** allows for download and upload speeds up to 2Mbps; throughput is limited by the LTE Cat-M1 network, and actual network speeds may be lower.

> [!WARNING]
>
> **Off-Peak Pricing**: The price (cost per MB of traffic) of plan-D (no bundle) and plan-K SIMs is based on its speed class, with `s1.minimum` being the most economical. However, during off-peak hours from 2:00 am to 6:00 am (JST), _all_ speed classes are reduced to a discounted price, with no difference in pricing between speed classes. This allows you to take advantage of low `s1.minimum` fees for basic data applications, then ramp up to `s1.fast` in the evening for heavier workloads such as downloading firmware updates or uploading buffered data.

> [!WARNING]
>
> [Subscription containers](https://docs.soracom.io/en/services/air/subscription-containers#available-subscriptions) inherit the speed class of the plan01s, plan-US, or planP1 SIM card that they are added to.

## Changing a Speed Class

> [!WARNING]
>
> For plan-D and plan-K SIMs, changing the speed class may affect the data usage cost.

1. Sign in to the **[User Console](https://console.soracom.io/?coverage_type=g)**. From the **☰ Menu**, open the **SIM Management** screen.

2. From the list of subscribers, click the **☑** for the SIM you want to manage.

3. Click the **Actions ▾** menu, then select **Change speed class**.

   ![Change speed class](https://docs.soracom.io/_astro/change-speed-class.BzkQphrZ_1RLW1z.webp)

4. In the dialog, select the new speed class for the SIM, then click **Change Speed Class**.

   ![Set speed class](https://docs.soracom.io/_astro/set-speed-class.CLSzD9c9_Qonwr.webp)

The new speed class is effective immediately.

Alternatively, you can also change the speed class directly from the list of SIMs. Simply find the **Speed class** column for the SIM you want to update and click the icon next to the current speed class and the same dialog box will appear allowing you to change the speed class of your SIM.

![Change speed class inline](https://docs.soracom.io/_astro/change-speed-class-inline.BDygAfXw_Z7jG0V.webp)

## Limitations

The following limitations apply to Soracom IoT SIM speed classes:

- When data transmission exceeds the rate defined by the speed class, the excess data may be lost.
- If a SIM contains multiple subscriptions through its use of Subscription Containers, applying a speed class to the SIM will change the speed class of all of its subscriptions. Speed classes cannot be changed for individual subscriptions.
- If a new subscription is added to a SIM whose speed class is set to a lower class than the default speed of the new subscription, the new subscription will use the lower speed class by default.

## Programmatic Usage

In addition to configuring the speed class of each SIM from the User Console, you can also perform the same configuration programmatically, allowing you to integrate automated control of your device's bandwidth inside of your application.

### Soracom API

To access the Soracom API, first use the [**auth**](https://docs.soracom.io/en/api#!/Auth/auth) API to obtain an API Key and Token. Refer to the [API Usage Guide](https://docs.soracom.io/en/developers/soracom-api) for instructions on how to use the API Key and Token in API requests.

Use the [updateSimSpeedClass](https://docs.soracom.io/en/api#!/Sim/updateSimSpeedClass) API to change the speed class of an IoT SIM:

**Global**

```bash
curl -X POST \
  -H 'X-Soracom-API-Key: <MY-API-KEY>' \
  -H 'X-Soracom-Token: <MY-TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{
        "speedClass": "s1.standard"
      }' \
  https://g.api.soracom.io/v1/sims/<SIM-ID>/update_speed_class
```

**Japan**

```bash
curl -X POST \
  -H 'X-Soracom-API-Key: <MY-API-KEY>' \
  -H 'X-Soracom-Token: <MY-TOKEN>' \
  -H 'Content-Type: application/json' \
  -d '{
        "speedClass": "s1.standard"
      }' \
  https://jp.api.soracom.io/v1/sims/<SIM-ID>/update_speed_class
```

### Soracom CLI

To use the Soracom CLI, you must first configure it to authenticate with your account information, authorization key, or SAM user credentials.

Run the following command to change the speed class of an IoT SIM:

**Global**

```bash
soracom sims update-speed-class --sim-id <SIM-ID> --speed-class "s1.standard" --coverage-type g
```

**Japan**

```bash
soracom sims update-speed-class --sim-id <SIM-ID> --speed-class "s1.standard" --coverage-type jp
```

### Metadata Service

The Metadata Service allows an Air SIM device to access and configure its own settings without the need for authentication. For more information, refer to the [**Metadata Service**](https://docs.soracom.io/en/services/air/metadata-service) documentation.

To change the speed class of an IoT SIM, the Metadata Service **Readonly** option must be disabled. Then, from the IoT SIM device, use the [updateSpeedClass](https://docs.soracom.io/en/api#!/Subscriber/updateSpeedClass) API (via Metadata Service):

```bash
curl -X POST \
  -H 'Content-Type: application/json' \
  -d '{
        "speedClass": "s1.standard"
      }' \
  http://metadata.soracom.io/v1/subscriber/update_speed_class
```
