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

# Create runtime

> Creates a runtime.



## OpenAPI

````yaml post /v1/runtimes
openapi: 3.0.3
info:
  title: Execute
  version: 0.1.4
servers:
  - url: https://api.riza.io
security:
  - bearerHttpAuthentication: []
paths:
  /v1/runtimes:
    post:
      tags:
        - Runtime
      summary: Create runtime
      description: Creates a runtime.
      operationId: createRuntime
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRuntimeRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Runtime'
          description: OK
        '401':
          content:
            application/json:
              examples:
                unauthenticated:
                  value:
                    code: 16
                    message: unauthenticated
              schema:
                $ref: '#/components/schemas/Status'
          description: Unauthenticated error response
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Riza from '@riza-io/api';

            const client = new Riza({
              apiKey: process.env['RIZA_API_KEY'], // This is the default and can be omitted
            });

            const runtime = await client.runtimes.create({
              language: 'python',
              manifest_file: { contents: 'contents', name: 'requirements.txt' },
              name: 'name',
            });

            console.log(runtime.id);
        - lang: Python
          source: |-
            import os
            from rizaio import Riza

            client = Riza(
                api_key=os.environ.get("RIZA_API_KEY"),  # This is the default and can be omitted
            )
            runtime = client.runtimes.create(
                language="python",
                manifest_file={
                    "contents": "contents",
                    "name": "requirements.txt",
                },
                name="name",
            )
            print(runtime.id)
        - lang: Go
          source: |
            package main

            import (
              "context"
              "fmt"

              "github.com/riza-io/riza-api-go"
              "github.com/riza-io/riza-api-go/option"
            )

            func main() {
              client := riza.NewClient(
                option.WithAPIKey("My API Key"), // defaults to os.LookupEnv("RIZA_API_KEY")
              )
              runtime, err := client.Runtimes.New(context.TODO(), riza.RuntimeNewParams{
                Language: riza.F(riza.RuntimeNewParamsLanguagePython),
                ManifestFile: riza.F(riza.RuntimeNewParamsManifestFile{
                  Contents: riza.F("contents"),
                  Name: riza.F(riza.RuntimeNewParamsManifestFileNameRequirementsTxt),
                }),
                Name: riza.F("name"),
              })
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", runtime.ID)
            }
components:
  schemas:
    CreateRuntimeRequest:
      properties:
        additional_python_imports:
          type: string
        engine:
          enum:
            - wasi
            - microvm
            - v8
          type: string
        language:
          enum:
            - python
            - javascript
          type: string
        manifest_file:
          $ref: '#/components/schemas/ManifestFile'
        name:
          type: string
      required:
        - name
        - language
        - manifest_file
      type: object
    Runtime:
      properties:
        additional_python_imports:
          type: string
        engine:
          enum:
            - wasi
            - microvm
            - v8
          type: string
        id:
          type: string
        language:
          enum:
            - python
            - javascript
          type: string
        manifest_file:
          $ref: '#/components/schemas/ManifestFile'
        name:
          type: string
        revision_id:
          type: string
        status:
          enum:
            - pending
            - building
            - succeeded
            - failed
            - cancelled
          type: string
      required:
        - id
        - name
        - language
        - engine
        - revision_id
        - status
      type: object
    Status:
      properties:
        code:
          description: >-
            The status code, which should be an enum value of
            [google.rpc.Code][google.rpc.Code].
          type: integer
        message:
          description: >-
            A developer-facing error message, which should be in English. Any
            user-facing error message should be localized and sent in the
            [google.rpc.Status.details][google.rpc.Status.details] field, or
            localized by the client.
          type: string
      type: object
    ManifestFile:
      properties:
        contents:
          type: string
        name:
          enum:
            - requirements.txt
            - package.json
          type: string
      required:
        - name
        - contents
      type: object
  securitySchemes:
    bearerHttpAuthentication:
      scheme: bearer
      type: http

````