- [HTTP request](https://developers.google.com/colab/api/reference/rest/v1beta/runtimes/create#body.HTTP_TEMPLATE)
- [Query parameters](https://developers.google.com/colab/api/reference/rest/v1beta/runtimes/create#body.QUERY_PARAMETERS)
- [Request body](https://developers.google.com/colab/api/reference/rest/v1beta/runtimes/create#body.request_body)
- [Response body](https://developers.google.com/colab/api/reference/rest/v1beta/runtimes/create#body.response_body)
- [Authorization scopes](https://developers.google.com/colab/api/reference/rest/v1beta/runtimes/create#body.aspect)
- [Try it!](https://developers.google.com/colab/api/reference/rest/v1beta/runtimes/create#try-it)

Creates a Colab runtime assignment.

When runtime creation is refused with a [`FAILED_PRECONDITION` (code: 9)](https://github.com/googleapis/googleapis/blob/437254f595a380cd9323111700ce0fcf9d6d2c21/google/rpc/code.proto#L128) error, a more specific error reason will be returned in the `https://developers.google.com/colab/api/reference/rest/Shared.Types/Operation#Status.FIELDS.details` of the `https://developers.google.com/colab/api/reference/rest/Shared.Types/Operation#FIELDS.error` wrapped in `https://developers.google.com/colab/api/reference/rest/Shared.Types/ErrorInfo`.

A requests-per-minute-per-project and a requests-per-minute-per-user quota are enforced on this API. To see the exact limit your project is subject to, after you enable the Colab API, view it in your project's [Quotas \& System Limits](https://console.cloud.google.com/apis/api/colaboratory.googleapis.com/quotas) page. Note that there is no usage reporting on the per-user limit and it is not overridable at the individual user level.

### HTTP request

`POST https://colaboratory.googleapis.com/v1beta/runtimes`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Query parameters

| Parameters ||
|---|---|
| `requestId` | `string` Optional. A unique identifier for this request. This request is only idempotent if a `requestId` is provided. See [AIP-155](https://google.aip.dev/155) for more details. If provided, the request ID must be in UUID4 format per <https://linter.aip.dev/155/request-id-format>. |
| `runtimeId` | `string` Optional. A unique identifier for the runtime. If not supplied, a random ID will be generated. If a runtime with the given ID owned by the requesting user already exists, a completed `https://developers.google.com/colab/api/reference/rest/Shared.Types/Operation` with an [`ALREADY_EXISTS` (code: 6)](https://github.com/googleapis/googleapis/blob/437254f595a380cd9323111700ce0fcf9d6d2c21/google/rpc/code.proto#L84) error will be returned. See [AIP-133](https://google.aip.dev/133#user-specified-ids) for more details. The ID must conform to [RFC-1034](https://datatracker.ietf.org/doc/html/rfc1034), specifically: - 1 to 63 characters - Lower-case letters, digits, and hyphens - Start with a letter - End with a letter or digit |

### Request body

The request body contains an instance of `https://developers.google.com/colab/api/reference/rest/v1beta/runtimes#Runtime`.

### Response body

If successful, the response body contains a newly created instance of `https://developers.google.com/colab/api/reference/rest/Shared.Types/Operation`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/colaboratory`

For more information, see the [OAuth 2.0 Overview](https://developers.google.com/identity/protocols/OAuth2).