> For the complete documentation index, see [llms.txt](https://tesla-api.timdorr.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tesla-api.timdorr.com/vehicle/commands/charging.md).

# Charging

Commands related to the charging of the vehicle.

## POST `/api/1/vehicles/{id}/command/charge_port_door_open`

Opens the charge port or unlocks the cable.

### Response

```json
{
  "reason": "",
  "result": true
}
```

## POST `/api/1/vehicles/{id}/command/charge_port_door_close`

For vehicles with a motorized charge port, this closes it.

### Response

```json
{
  "reason": "",
  "result": true
}
```

## POST `/api/1/vehicles/{id}/command/charge_start`

If the car is plugged in but not currently charging, this will start it charging.

### Response

```json
{
  "reason": "",
  "result": true
}
```

## POST `/api/1/vehicles/{id}/command/charge_stop`

If the car is currently charging, this will stop it.

### Response

```json
{
  "reason": "",
  "result": true
}
```

## POST `/api/1/vehicles/{id}/command/charge_standard`

Sets the charge limit to "standard" or \~90%.

### Response

```json
{
  "reason": "",
  "result": true
}
```

## POST `/api/1/vehicles/{id}/command/charge_max_range`

Sets the charge limit to "max range" or 100%.

### Response

```json
{
  "reason": "",
  "result": true
}
```

## POST `/api/1/vehicles/{id}/command/set_charge_limit`

Sets the charge limit to a custom value.

### Parameters

| Parameter | Example | Description                                   |
| --------- | ------- | --------------------------------------------- |
| percent   | 75      | The percentage the battery will charge until. |

### Response

```json
{
  "reason": "",
  "result": true
}
```

## POST `/api/1/vehicles/{id}/command/set_charging_amps`

Sets the charge amps limit to a custom value.

### Parameters

| Parameter      | Example | Description                          |
| -------------- | ------- | ------------------------------------ |
| charging\_amps | 32      | The max amps to use during charging. |

### Response

```json
{
  "reason": "",
  "result": true
}
```

## POST `/api/1/vehicles/{id}/command/set_scheduled_charging`

Set the scheduled charge.

### Parameters

| Parameter | Example | Description                                |
| --------- | ------- | ------------------------------------------ |
| enable    | true    | true for on, false for off.                |
| time      | 1410    | time in minutes since midnight local time. |

### Response

```json
{
  "reason": "",
  "result": true
}
```

## POST `/api/1/vehicles/{id}/command/set_scheduled_departure`

Set the scheduled departure.

### Parameters

| Parameter                           | Example | Description                                                                                                                    |
| ----------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------ |
| enable                              | true    | true for on, false for off.                                                                                                    |
| departure\_time                     | 540     | true if (preconditioning\_enabled or off\_peak\_charging\_enabled), false otherwise (this condition may change in the future). |
| preconditioning\_enabled            | true    | true for on, false for off.                                                                                                    |
| preconditioning\_weekdays\_only     | true    | true for on, false for off.                                                                                                    |
| off\_peak\_charging\_enabled        | true    | true for on, false for off.                                                                                                    |
| off\_peak\_charging\_weekdays\_only | true    | true for on, false for off.                                                                                                    |
| end\_off\_peak\_time                | 450     | time in minutes since midnight local time.                                                                                     |

### Response

```json
{
  "reason": "",
  "result": true
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://tesla-api.timdorr.com/vehicle/commands/charging.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
