- [Resource: Runtime](https://developers.google.com/colab/api/reference/rest/v1beta/runtimes#Runtime)
  - [JSON representation](https://developers.google.com/colab/api/reference/rest/v1beta/runtimes#Runtime.SCHEMA_REPRESENTATION)
- [RuntimeSpec.Key](https://developers.google.com/colab/api/reference/rest/v1beta/runtimes#RuntimeSpec.Key)
  - [JSON representation](https://developers.google.com/colab/api/reference/rest/v1beta/runtimes#RuntimeSpec.Key.SCHEMA_REPRESENTATION)
- [Variant](https://developers.google.com/colab/api/reference/rest/v1beta/runtimes#Variant)
- [Shape](https://developers.google.com/colab/api/reference/rest/v1beta/runtimes#Shape)
- [ConnectionInfo](https://developers.google.com/colab/api/reference/rest/v1beta/runtimes#ConnectionInfo)
  - [JSON representation](https://developers.google.com/colab/api/reference/rest/v1beta/runtimes#ConnectionInfo.SCHEMA_REPRESENTATION)
- [Methods](https://developers.google.com/colab/api/reference/rest/v1beta/runtimes#METHODS_SUMMARY)

## Resource: Runtime

A Colab managed runtime.

This is essentially a Jupyter server that runs on Google infrastructure. Clients should use the `https://developers.google.com/colab/api/reference/rest/v1beta/runtimes#Runtime.FIELDS.connection_info` provided to connect to the runtime, and leverage the standard Jupyter [REST API](https://jupyter-server.readthedocs.io/en/stable/developers/rest-api.html) and/or [client library](https://jupyter-client.readthedocs.io/en/stable/api/jupyter_client.html) to interact with the runtime.

| JSON representation |
|---|
| ``` { "name": string, "runtimeSpec": { object (`https://developers.google.com/colab/api/reference/rest/v1beta/runtimes#RuntimeSpec.Key`) }, "connectionInfo": { object (`https://developers.google.com/colab/api/reference/rest/v1beta/runtimes#ConnectionInfo`) }, "version": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. The name of the runtime in the format `runtimes/{runtimeId}`, where `runtimeId` is either the value supplied via `https://developers.google.com/colab/api/reference/rest/v1beta/runtimes/create#body.QUERY_PARAMETERS.runtime_id` or, if none was supplied, a random ID generated by the backend. |
| `runtimeSpec` | ``object (`https://developers.google.com/colab/api/reference/rest/v1beta/runtimes#RuntimeSpec.Key`)`` Required. The specification of the runtime. When calling `runtimes.create`, this field should be set to an eligible runtime spec obtained from the `https://developers.google.com/colab/api/reference/rest/v1beta/runtimespecs/list#body.ListRuntimeSpecsResponse`. |
| `connectionInfo` | ``object (`https://developers.google.com/colab/api/reference/rest/v1beta/runtimes#ConnectionInfo`)`` Output only. The connection info used to authenticate to the runtime. |
| `version` | `string` Optional. The version of the runtime image. See [Colab Runtime Version FAQ](https://research.google.com/colaboratory/runtime-version-faq.html) for supported runtime versions. If omitted (empty), the latest runtime image is used. |

## RuntimeSpec.Key

Key fields that uniquely identify a runtime spec.

| JSON representation |
|---|
| ``` { "variant": enum (`https://developers.google.com/colab/api/reference/rest/v1beta/runtimes#Variant`), "accelerator": string, "shape": enum (`https://developers.google.com/colab/api/reference/rest/v1beta/runtimes#Shape`) } ``` |

| Fields ||
|---|---|
| `variant` | ``enum (`https://developers.google.com/colab/api/reference/rest/v1beta/runtimes#Variant`)`` Required. Runtime variant. |
| `accelerator` | `string` Required. Runtime accelerator model name (e.g., "T4", "L4", "A100"). For CPU runtime specs, this field will be "NONE". |
| `shape` | ``enum (`https://developers.google.com/colab/api/reference/rest/v1beta/runtimes#Shape`)`` Required. Runtime shape. |

## Variant

Runtime variant.

| Enums ||
|---|---|
| `VARIANT_UNSPECIFIED` | Default value. This value is unused. |
| `VARIANT_CPU` | CPU variant. |
| `VARIANT_GPU` | GPU variant. |
| `VARIANT_TPU` | TPU variant. |

## Shape

Runtime shape.

| Enums ||
|---|---|
| `SHAPE_UNSPECIFIED` | Default value. This value is unused. |
| `SHAPE_STANDARD` | Standard shape. |
| `SHAPE_HIGHMEM` | High memory shape. |

## ConnectionInfo

Connection info used to authenticate to the runtime.

| JSON representation |
|---|
| ``` { "token": string, "expireTime": string, "url": string } ``` |

| Fields ||
|---|---|
| `token` | `string` Required. Output only. The runtime proxy token. This is a short-lived credential used to authenticate to the runtime. Clients should set this token as the value of the `X-Colab-Runtime-Proxy-Token` HTTP header when connecting to the runtime, and call the `https://developers.google.com/colab/api/reference/rest/v1beta/runtimes/get#google.colab.v1beta.ColabService.GetRuntime` API to refresh this token when approaching `expireTime`. |
| `expireTime` | ``string (`https://protobuf.dev/reference/protobuf/google.protobuf#timestamp` format)`` Required. Output only. The expiration time of the runtime proxy token. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: `"2014-10-02T15:01:23Z"`, `"2014-10-02T15:01:23.045123456Z"` or `"2014-10-02T15:01:23+05:30"`. |
| `url` | `string` Required. Output only. The authenticated URL that can be used to connect to the runtime. |

| ## Methods ||
|---|---|
| ### `https://developers.google.com/colab/api/reference/rest/v1beta/runtimes/create` | Creates a Colab runtime assignment. |
| ### `https://developers.google.com/colab/api/reference/rest/v1beta/runtimes/delete` | Deletes a Colab runtime assignment. |
| ### `https://developers.google.com/colab/api/reference/rest/v1beta/runtimes/get` | Gets a Colab runtime assigned to the requesting user. |
| ### `https://developers.google.com/colab/api/reference/rest/v1beta/runtimes/list` | Lists Colab runtimes assigned to the requesting user. |