components:
  schemas:
    CreateGenerationRequest:
      properties:
        description:
          type: string
        examples:
          items:
            $ref: '#/components/schemas/Example'
          type: array
        name:
          type: string
      required:
        - name
        - description
      type: object
    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
    CreateRuntimeRevisionRequest:
      properties:
        additional_python_imports:
          type: string
        manifest_file:
          $ref: '#/components/schemas/ManifestFile'
      required:
        - manifest_file
      type: object
    CreateSecretRequest:
      properties:
        name:
          type: string
        value:
          type: string
      required:
        - name
        - value
      type: object
    CreateToolRequest:
      properties:
        code:
          description: >-
            The code of the tool. You must define a function named "execute" that takes in a single argument
            and returns a JSON-serializable value. The argument will be the "input" passed when executing the
            tool, and will match the input schema.
          type: string
        description:
          description: A description of the tool.
          type: string
        input_schema:
          description: The input schema of the tool. This must be a valid JSON Schema object.
        language:
          description: The language of the tool's code.
          enum:
            - python
            - javascript
            - typescript
          type: string
        name:
          description: The name of the tool.
          type: string
        runtime_revision_id:
          description: The ID of the runtime revision to use when executing the tool.
          type: string
      required:
        - name
        - language
        - code
      type: object
    DeleteRuntimeResponse:
      properties:
        deleted:
          type: boolean
        id:
          type: string
      type: object
    EnvVar:
      description: Set of key-value pairs to add to the tool's execution environment.
      properties:
        name:
          type: string
        secret_id:
          type: string
        value:
          type: string
      required:
        - name
      type: object
    Example:
      properties:
        input: {}
        output: {}
      type: object
    ExecuteFunctionRequest:
      properties:
        code:
          description: >-
            The function to execute. Your code must define a function named "execute" that takes in a single
            argument and returns a JSON-serializable value.
          type: string
        env:
          additionalProperties:
            type: string
          description: Set of key-value pairs to add to the function's execution environment.
          type: object
        files:
          description: List of input files.
          items:
            $ref: '#/components/schemas/File'
          type: array
        http:
          $ref: '#/components/schemas/HTTP'
        input:
          description: >-
            The input to the function. This must be a valid JSON-serializable object. If you do not pass an
            input, your function will be called with None (Python) or null (JavaScript/TypeScript) as the
            argument.
        language:
          description: The interpreter to use when executing code.
          enum:
            - python
            - javascript
            - typescript
          type: string
        limits:
          $ref: '#/components/schemas/Limits'
        runtime_revision_id:
          description: The ID of the runtime revision to use when executing code.
          type: string
      required:
        - language
        - code
      type: object
    ExecuteFunctionResponse:
      properties:
        execution:
          $ref: '#/components/schemas/ExecutionResult'
        output:
          description: The output of the function.
        output_status:
          description: >-
            The status of the output. "valid" means your function executed successfully and returned a valid
            JSON-serializable object, or void. "json_serialization_error" means your function executed
            successfully, but returned a nonserializable object. "error" means your function failed to
            execute.
          enum:
            - error
            - json_serialization_error
            - valid
          type: string
      required:
        - output
        - output_status
        - execution
      type: object
    ExecuteRequest:
      properties:
        args:
          description: List of command line arguments to pass to the script.
          items:
            type: string
          type: array
        code:
          description: The code to execute.
          type: string
        env:
          additionalProperties:
            type: string
          description: Set of key-value pairs to add to the script's execution environment.
          type: object
        files:
          description: List of input files.
          items:
            $ref: '#/components/schemas/File'
          type: array
        http:
          $ref: '#/components/schemas/HTTP'
        language:
          description: The interpreter to use when executing code.
          enum:
            - python
            - javascript
            - typescript
            - ruby
            - php
          type: string
        limits:
          $ref: '#/components/schemas/Limits'
        runtime_revision_id:
          description: The ID of the runtime revision to use when executing code.
          type: string
        stdin:
          description: Input made available to the script via 'stdin'.
          type: string
      required:
        - language
        - code
      type: object
    ExecuteResponse:
      properties:
        duration:
          description: The execution time of the script in milliseconds.
          type: integer
        exit_code:
          description: The exit code returned by the script. Will often be '0' on success and non-zero on failure.
          type: integer
        id:
          description: The ID of the execution.
          type: string
        stderr:
          description: The contents of 'stderr' after executing the script.
          type: string
        stdout:
          description: The contents of 'stdout' after executing the script.
          type: string
      required:
        - id
        - exit_code
        - stdout
        - stderr
        - duration
      type: object
    ExecuteToolRequest:
      properties:
        env:
          description: Set of key-value pairs to add to the tool's execution environment.
          items:
            $ref: '#/components/schemas/EnvVar'
          type: array
        http:
          $ref: '#/components/schemas/HTTPTool'
        input:
          description: >-
            The input to the tool. This must be a valid JSON-serializable object. It will be validated against
            the tool's input schema.
        revision_id:
          description: >-
            The Tool revision ID to execute. This optional parmeter is used to pin executions to specific
            versions of the Tool. If not provided, the latest (current) version of the Tool will be executed.
          type: string
      type: object
    ExecuteToolResponse:
      properties:
        execution:
          $ref: '#/components/schemas/ExecutionResult'
        output:
          description: The returned value of the Tool's execute function.
        output_status:
          description: >-
            The status of the output. "valid" means your Tool executed successfully and returned a valid
            JSON-serializable object, or void. "json_serialization_error" means your Tool executed
            successfully, but returned a nonserializable object. "error" means your Tool failed to execute.
          enum:
            - error
            - json_serialization_error
            - valid
          type: string
      required:
        - output
        - output_status
        - execution
      type: object
    Execution:
      properties:
        details:
          $ref: '#/components/schemas/ExecutionDetails'
        duration:
          type: integer
        exit_code:
          type: integer
        id:
          type: string
        language:
          enum:
            - python
            - javascript
            - typescript
            - ruby
            - php
          type: string
        started_at:
          format: date-time
          type: string
      required:
        - id
        - language
        - duration
        - exit_code
        - started_at
      type: object
    ExecutionDetails:
      discriminator:
        mapping:
          function: '#/components/schemas/FunctionExecutionDetails'
          script: '#/components/schemas/ScriptExecutionDetails'
          tool: '#/components/schemas/ToolExecutionDetails'
        propertyName: type
      oneOf:
        - $ref: '#/components/schemas/ToolExecutionDetails'
        - $ref: '#/components/schemas/FunctionExecutionDetails'
        - $ref: '#/components/schemas/ScriptExecutionDetails'
    ExecutionResult:
      description: The execution details of the function.
      properties:
        duration:
          description: The execution time of the function in milliseconds.
          type: integer
        exit_code:
          description: The exit code returned by the function. Will often be '0' on success and non-zero on failure.
          type: integer
        id:
          description: The ID of the execution.
          type: string
        stderr:
          description: The contents of 'stderr' after executing the function.
          type: string
        stdout:
          description: The contents of 'stdout' after executing the function.
          type: string
      required:
        - id
        - exit_code
        - stdout
        - stderr
        - duration
      type: object
    File:
      properties:
        contents:
          description: The contents of the file.
          type: string
        path:
          description: The relative path of the file.
          type: string
      type: object
    FunctionExecutionDetails:
      properties:
        request:
          $ref: '#/components/schemas/ExecuteFunctionRequest'
        response:
          $ref: '#/components/schemas/ExecuteFunctionResponse'
        type:
          enum:
            - function
          type: string
      required:
        - type
        - request
        - response
      type: object
    Generation:
      properties:
        id:
          type: string
        status:
          type: string
        tool_id:
          type: string
      required:
        - id
      type: object
    HTTP:
      description: Configuration for HTTP requests and authentication.
      properties:
        allow:
          description: List of allowed HTTP hosts and associated authentication.
          items:
            $ref: '#/components/schemas/HTTPAllow'
          type: array
      type: object
    HTTPAllow:
      description: List of allowed HTTP hosts and associated authentication.
      properties:
        auth:
          $ref: '#/components/schemas/HTTPAuth'
        host:
          description: The hostname to allow.
          type: string
      type: object
    HTTPAuth:
      description: Authentication configuration for outbound requests to this host.
      properties:
        basic:
          $ref: '#/components/schemas/HTTPBasic'
        bearer:
          $ref: '#/components/schemas/HTTPBearer'
        header:
          $ref: '#/components/schemas/HTTPHeader'
        query:
          $ref: '#/components/schemas/HTTPQuery'
      type: object
    HTTPBasic:
      properties:
        password:
          type: string
        user_id:
          type: string
      type: object
    HTTPBearer:
      description: Configuration to add an 'Authorization' header using the 'Bearer' scheme.
      properties:
        token:
          description: "The token to set, e.g. 'Authorization: Bearer <token>'."
          type: string
      type: object
    HTTPHeader:
      properties:
        name:
          type: string
        value:
          type: string
      type: object
    HTTPQuery:
      properties:
        key:
          type: string
        value:
          type: string
      type: object
    HTTPTool:
      description: Configuration for HTTP requests and authentication.
      properties:
        allow:
          description: List of allowed HTTP hosts and associated authentication.
          items:
            $ref: '#/components/schemas/HTTPToolAllow'
          type: array
      type: object
    HTTPToolAllow:
      description: List of allowed HTTP hosts and associated authentication.
      properties:
        auth:
          $ref: '#/components/schemas/HTTPToolAuth'
        host:
          description: The hostname to allow.
          type: string
      type: object
    HTTPToolAuth:
      description: Authentication configuration for outbound requests to this host.
      properties:
        basic:
          $ref: '#/components/schemas/HTTPToolBasic'
        bearer:
          $ref: '#/components/schemas/HTTPToolBearer'
        query:
          $ref: '#/components/schemas/HTTPToolQuery'
      type: object
    HTTPToolBasic:
      properties:
        password:
          type: string
        secret_id:
          type: string
        user_id:
          type: string
      type: object
    HTTPToolBearer:
      description: Configuration to add an 'Authorization' header using the 'Bearer' scheme.
      properties:
        secret_id:
          type: string
        token:
          description: "The token to set, e.g. 'Authorization: Bearer <token>'."
          type: string
      type: object
    HTTPToolQuery:
      properties:
        key:
          type: string
        secret_id:
          type: string
        value:
          type: string
      type: object
    Limits:
      description: Configuration for execution environment limits.
      properties:
        execution_timeout:
          description: The maximum time allowed for execution (in seconds). Default is 30.
          type: integer
        memory_size:
          description: The maximum memory allowed for execution (in MiB). Default is 128.
          type: integer
      type: object
    ListExecutionsResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/Execution'
          type: array
      required:
        - data
      type: object
    ListRuntimeRevisionsResponse:
      properties:
        revisions:
          items:
            $ref: '#/components/schemas/RuntimeRevision'
          type: array
      required:
        - revisions
      type: object
    ListRuntimesResponse:
      properties:
        runtimes:
          items:
            $ref: '#/components/schemas/Runtime'
          type: array
      required:
        - runtimes
      type: object
    ListSecretsResponse:
      properties:
        secrets:
          items:
            $ref: '#/components/schemas/Secret'
          type: array
      required:
        - secrets
      type: object
    ListToolsResponse:
      properties:
        tools:
          items:
            $ref: '#/components/schemas/Tool'
          type: array
      required:
        - tools
      type: object
    ManifestFile:
      properties:
        contents:
          type: string
        name:
          enum:
            - requirements.txt
            - package.json
          type: string
      required:
        - name
        - contents
      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
    RuntimeRevision:
      properties:
        additional_python_imports:
          type: string
        id:
          type: string
        manifest_file:
          $ref: '#/components/schemas/ManifestFile'
        runtime_id:
          type: string
        status:
          enum:
            - pending
            - building
            - succeeded
            - failed
            - cancelled
          type: string
      required:
        - id
        - runtime_id
        - manifest_file
        - status
      type: object
    ScriptExecutionDetails:
      properties:
        request:
          $ref: '#/components/schemas/ExecuteRequest'
        response:
          $ref: '#/components/schemas/ExecuteResponse'
        type:
          enum:
            - script
          type: string
      required:
        - type
        - request
        - response
      type: object
    Secret:
      properties:
        id:
          type: string
        name:
          type: string
      required:
        - id
        - name
      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
    Tool:
      properties:
        code:
          description: >-
            The code of the tool. You must define a function named "execute" that takes in a single argument
            and returns a JSON-serializable value. The argument will be the "input" passed when executing the
            tool, and will match the input schema.
          type: string
        description:
          description: A description of the tool.
          type: string
        id:
          description: The ID of the tool.
          type: string
        input_schema:
          description: The input schema of the tool. This must be a valid JSON Schema object.
        language:
          description: The language of the tool's code.
          enum:
            - python
            - javascript
            - typescript
          type: string
        name:
          description: The name of the tool.
          type: string
        revision_id:
          description: >-
            The ID of the tool's current revision. This is used to pin executions to a specific version of the
            tool, even if the tool is updated later.
          type: string
        runtime_revision_id:
          description: >-
            The ID of the custom runtime revision that the tool uses for executions. This pins executions to
            specific version of a custom runtime runtime, even if the runtime is updated later.
          type: string
      required:
        - id
        - name
        - description
        - code
        - language
        - input_schema
        - revision_id
      type: object
    ToolExecutionDetails:
      properties:
        request:
          $ref: '#/components/schemas/ExecuteToolRequest'
        response:
          $ref: '#/components/schemas/ExecuteToolResponse'
        tool_id:
          type: string
        type:
          enum:
            - tool
          type: string
      required:
        - type
        - tool_id
        - request
        - response
      type: object
    UpdateToolRequest:
      properties:
        code:
          description: >-
            The code of the tool. You must define a function named "execute" that takes in a single argument
            and returns a JSON-serializable value. The argument will be the "input" passed when executing the
            tool, and will match the input schema.
          type: string
        description:
          description: A description of the tool.
          type: string
        input_schema:
          description: The input schema of the tool. This must be a valid JSON Schema object.
        language:
          description: The language of the tool's code.
          enum:
            - python
            - javascript
            - typescript
          type: string
        name:
          description: The name of the tool.
          type: string
        runtime_revision_id:
          description: >-
            The ID of the custom runtime revision that the tool uses for executions. This is used to pin
            executions to a specific version of a custom runtime, even if the runtime is updated later.
          type: string
      type: object
  securitySchemes:
    bearerHttpAuthentication:
      scheme: bearer
      type: http
info:
  title: Execute
  version: 0.1.4
openapi: 3.0.3
paths:
  /v1/betas/generations:
    post:
      description: Create a generation from a given prompt.
      operationId: createGeneration
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateGenerationRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Generation'
          description: OK
        '401':
          content:
            application/json:
              examples:
                unauthenticated:
                  value:
                    code: 16
                    message: unauthenticated
              schema:
                $ref: '#/components/schemas/Status'
          description: Unauthenticated error response
      summary: Create generation
      tags:
        - Tool
  /v1/betas/generations/{id}:
    get:
      description: Get a generation by ID.
      operationId: getGeneration
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Generation'
          description: OK
        '401':
          content:
            application/json:
              examples:
                unauthenticated:
                  value:
                    code: 16
                    message: unauthenticated
              schema:
                $ref: '#/components/schemas/Status'
          description: Unauthenticated error response
      summary: Get generation
      tags:
        - Tool
  /v1/execute:
    post:
      description: >-
        Run a script in a secure, isolated environment. Scripts can read from `stdin` and write to `stdout` or
        `stderr`. They can access input files, environment variables and command line arguments.
      operationId: Sandbox_Execute
      requestBody:
        content:
          application/json:
            examples:
              Python:
                value:
                  language: PYTHON
                  code: print("Hello world!")
            schema:
              $ref: '#/components/schemas/ExecuteRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              examples:
                hello:
                  value:
                    id: ''
                    exit_code: 0
                    stdout: Hello, World!
                    stderr: ''
                    duration: 1
              schema:
                $ref: '#/components/schemas/ExecuteResponse'
          description: OK
        '401':
          content:
            application/json:
              examples:
                unauthenticated:
                  value:
                    code: 16
                    message: unauthenticated
              schema:
                $ref: '#/components/schemas/Status'
          description: Unauthenticated error response
      summary: Execute code
      tags:
        - Sandbox
      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 response = await client.command.exec({ code: 'print("Hello world!")', language: 'PYTHON' });

            console.log(response.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
            )
            response = client.command.exec(
                code="print(\"Hello world!\")",
                language="PYTHON",
            )
            print(response.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")
              )
              response, err := client.Command.Exec(context.TODO(), riza.CommandExecParams{
                Code: riza.F(`print("Hello world!")`),
                Language: riza.F(riza.CommandExecParamsLanguage("PYTHON")),
              })
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", response.ID)
            }
  /v1/execute-function:
    post:
      description: >-
        Run a function in a secure, isolated environment. Define a function named `execute`. The function will
        be passed `input` as an object.
      operationId: Sandbox_ExecuteFunction
      requestBody:
        content:
          application/json:
            examples:
              Python:
                value:
                  language: python
                  code: 'def execute(input): return { "name": input["name"], "executed": True }'
                  input:
                    name: John
            schema:
              $ref: '#/components/schemas/ExecuteFunctionRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              examples:
                Python:
                  value:
                    output:
                      name: John
                      executed: true
                    output_status: valid
                    execution:
                      id: ''
                      exit_code: 0
                      stdout: ''
                      stderr: ''
                      duration: 7
              schema:
                $ref: '#/components/schemas/ExecuteFunctionResponse'
          description: OK
        '401':
          content:
            application/json:
              examples:
                unauthenticated:
                  value:
                    code: 16
                    message: unauthenticated
              schema:
                $ref: '#/components/schemas/Status'
          description: Unauthenticated error response
      summary: Execute function
      tags:
        - Sandbox
      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 response = await client.command.execFunc({
              code: 'def execute(input): return { "name": input["name"], "executed": True }',
              language: 'python',
              input: { name: 'John' },
            });

            console.log(response.execution);
        - 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
            )
            response = client.command.exec_func(
                code="def execute(input): return { \"name\": input[\"name\"], \"executed\": True }",
                language="python",
                input={
                    "name": "John"
                },
            )
            print(response.execution)
        - 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")
              )
              response, err := client.Command.ExecFunc(context.TODO(), riza.CommandExecFuncParams{
                Code: riza.F(`def execute(input): return { "name": input["name"], "executed": True }`),
                Language: riza.F(riza.CommandExecFuncParamsLanguagePython),
                Input: riza.F[any](map[string]interface{}{
                "name": "John",
                }),
              })
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", response.Execution)
            }
  /v1/executions:
    get:
      description: Returns a list of executions in your project.
      operationId: listExecutions
      parameters:
        - description: >-
            The ID of the item to start after. To get the next page of results, set this to the ID of the last
            item in the current page.
          in: query
          name: starting_after
          schema:
            type: string
        - description: The number of items to return. Defaults to 100. Maximum is 100.
          in: query
          name: limit
          schema:
            type: integer
        - description: >-
            If true, only show executions where the exit code is not 0, indicating an execution error.
            Defaults to false.
          in: query
          name: only_non_zero_exit_codes
          schema:
            type: boolean
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListExecutionsResponse'
          description: OK
        '401':
          content:
            application/json:
              examples:
                unauthenticated:
                  value:
                    code: 16
                    message: unauthenticated
              schema:
                $ref: '#/components/schemas/Status'
          description: Unauthenticated error response
      summary: List executions
      tags:
        - Execution
      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
            });

            // Automatically fetches more pages as needed.
            for await (const execution of client.executions.list()) {
              console.log(execution.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
            )
            page = client.executions.list()
            page = page.data[0]
            print(page.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")
              )
              page, err := client.Executions.List(context.TODO(), riza.ExecutionListParams{

              })
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", page)
            }
  /v1/executions/{id}:
    get:
      description: Retrieves an execution.
      operationId: retrieveExecution
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Execution'
          description: OK
        '401':
          content:
            application/json:
              examples:
                unauthenticated:
                  value:
                    code: 16
                    message: unauthenticated
              schema:
                $ref: '#/components/schemas/Status'
          description: Unauthenticated error response
      summary: Retrieve execution
      tags:
        - Execution
      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 execution = await client.executions.get('id');

            console.log(execution.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
            )
            execution = client.executions.get(
                "id",
            )
            print(execution.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")
              )
              execution, err := client.Executions.Get(context.TODO(), "id")
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", execution.ID)
            }
  /v1/runtimes:
    get:
      description: Returns a list of runtimes in your project.
      operationId: listRuntimes
      parameters:
        - description: >-
            The ID of the item to start after. To get the next page of results, set this to the ID of the last
            item in the current page.
          in: query
          name: starting_after
          schema:
            type: string
        - description: The number of items to return. Defaults to 100. Maximum is 100.
          in: query
          name: limit
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListRuntimesResponse'
          description: OK
        '401':
          content:
            application/json:
              examples:
                unauthenticated:
                  value:
                    code: 16
                    message: unauthenticated
              schema:
                $ref: '#/components/schemas/Status'
          description: Unauthenticated error response
      summary: List runtimes
      tags:
        - Runtime
      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
            });

            // Automatically fetches more pages as needed.
            for await (const runtime of client.runtimes.list()) {
              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
            )
            page = client.runtimes.list()
            page = page.runtimes[0]
            print(page.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")
              )
              page, err := client.Runtimes.List(context.TODO(), riza.RuntimeListParams{

              })
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", page)
            }
    post:
      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
      summary: Create runtime
      tags:
        - Runtime
      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)
            }
  /v1/runtimes/{id}:
    delete:
      description: Deletes a runtime.
      operationId: deleteRuntime
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteRuntimeResponse'
          description: OK
        '401':
          content:
            application/json:
              examples:
                unauthenticated:
                  value:
                    code: 16
                    message: unauthenticated
              schema:
                $ref: '#/components/schemas/Status'
          description: Unauthenticated error response
      summary: Delete a runtime
      tags:
        - Runtime
      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.delete('id');

            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.delete(
                "id",
            )
            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.Delete(context.TODO(), "id")
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", runtime.ID)
            }
    get:
      description: Retrieves a runtime.
      operationId: retrieveRuntime
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      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
      summary: Retrieve runtime
      tags:
        - Runtime
      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.get('id');

            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.get(
                "id",
            )
            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.Get(context.TODO(), "id")
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", runtime.ID)
            }
  /v1/runtimes/{id}/revisions:
    get:
      description: Lists all revisions for a runtime.
      operationId: listRuntimeRevisions
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListRuntimeRevisionsResponse'
          description: OK
        '401':
          content:
            application/json:
              examples:
                unauthenticated:
                  value:
                    code: 16
                    message: unauthenticated
              schema:
                $ref: '#/components/schemas/Status'
          description: Unauthenticated error response
      summary: List runtime revisions
      tags:
        - Runtime
      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 revisions = await client.runtimes.revisions.list('id');

            console.log(revisions.revisions);
        - 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
            )
            revisions = client.runtimes.revisions.list(
                "id",
            )
            print(revisions.revisions)
        - 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")
              )
              revisions, err := client.Runtimes.Revisions.List(context.TODO(), "id")
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", revisions.Revisions)
            }
    post:
      description: Creates a new runtime revision.
      operationId: createRuntimeRevision
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRuntimeRevisionRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuntimeRevision'
          description: OK
        '401':
          content:
            application/json:
              examples:
                unauthenticated:
                  value:
                    code: 16
                    message: unauthenticated
              schema:
                $ref: '#/components/schemas/Status'
          description: Unauthenticated error response
      summary: Create runtime revision
      tags:
        - Runtime
      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 revision = await client.runtimes.revisions.create('id', {
              manifest_file: { contents: 'contents', name: 'requirements.txt' },
            });

            console.log(revision.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
            )
            revision = client.runtimes.revisions.create(
                id="id",
                manifest_file={
                    "contents": "contents",
                    "name": "requirements.txt",
                },
            )
            print(revision.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")
              )
              revision, err := client.Runtimes.Revisions.New(
                context.TODO(),
                "id",
                riza.RuntimeRevisionNewParams{
                  ManifestFile: riza.F(riza.RuntimeRevisionNewParamsManifestFile{
                    Contents: riza.F("contents"),
                    Name: riza.F(riza.RuntimeRevisionNewParamsManifestFileNameRequirementsTxt),
                  }),
                },
              )
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", revision.ID)
            }
  /v1/runtimes/{runtime_id}/revisions/{revision_id}:
    get:
      description: Retrieves a runtime revision.
      operationId: retrieveRuntimeRevision
      parameters:
        - in: path
          name: runtime_id
          required: true
          schema:
            type: string
        - in: path
          name: revision_id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuntimeRevision'
          description: OK
        '401':
          content:
            application/json:
              examples:
                unauthenticated:
                  value:
                    code: 16
                    message: unauthenticated
              schema:
                $ref: '#/components/schemas/Status'
          description: Unauthenticated error response
      summary: Retrieve runtime revision
      tags:
        - Runtime
      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 revision = await client.runtimes.revisions.get('runtime_id', 'revision_id');

            console.log(revision.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
            )
            revision = client.runtimes.revisions.get(
                revision_id="revision_id",
                runtime_id="runtime_id",
            )
            print(revision.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")
              )
              revision, err := client.Runtimes.Revisions.Get(
                context.TODO(),
                "runtime_id",
                "revision_id",
              )
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", revision.ID)
            }
  /v1/secrets:
    get:
      description: Returns a list of secrets in your project.
      operationId: listSecrets
      parameters:
        - description: >-
            The ID of the item to start after. To get the next page of results, set this to the ID of the last
            item in the current page.
          in: query
          name: starting_after
          schema:
            type: string
        - description: The number of items to return. Defaults to 100. Maximum is 100.
          in: query
          name: limit
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListSecretsResponse'
          description: OK
        '401':
          content:
            application/json:
              examples:
                unauthenticated:
                  value:
                    code: 16
                    message: unauthenticated
              schema:
                $ref: '#/components/schemas/Status'
          description: Unauthenticated error response
      summary: List secrets
      tags:
        - Secret
      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
            });

            // Automatically fetches more pages as needed.
            for await (const secret of client.secrets.list()) {
              console.log(secret.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
            )
            page = client.secrets.list()
            page = page.secrets[0]
            print(page.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")
              )
              page, err := client.Secrets.List(context.TODO(), riza.SecretListParams{

              })
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", page)
            }
    post:
      description: Create a secret in your project.
      operationId: createSecret
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateSecretRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Secret'
          description: OK
        '401':
          content:
            application/json:
              examples:
                unauthenticated:
                  value:
                    code: 16
                    message: unauthenticated
              schema:
                $ref: '#/components/schemas/Status'
          description: Unauthenticated error response
      summary: Create secret
      tags:
        - Secret
      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 secret = await client.secrets.create({ name: 'name', value: 'value' });

            console.log(secret.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
            )
            secret = client.secrets.create(
                name="name",
                value="value",
            )
            print(secret.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")
              )
              secret, err := client.Secrets.New(context.TODO(), riza.SecretNewParams{
                Name: riza.F("name"),
                Value: riza.F("value"),
              })
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", secret.ID)
            }
  /v1/tools:
    get:
      description: Returns a list of tools in your project.
      operationId: listTools
      parameters:
        - description: >-
            The ID of the item to start after. To get the next page of results, set this to the ID of the last
            item in the current page.
          in: query
          name: starting_after
          schema:
            type: string
        - description: The number of items to return. Defaults to 100. Maximum is 100.
          in: query
          name: limit
          schema:
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListToolsResponse'
          description: OK
        '401':
          content:
            application/json:
              examples:
                unauthenticated:
                  value:
                    code: 16
                    message: unauthenticated
              schema:
                $ref: '#/components/schemas/Status'
          description: Unauthenticated error response
      summary: List tools
      tags:
        - Tool
      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
            });

            // Automatically fetches more pages as needed.
            for await (const tool of client.tools.list()) {
              console.log(tool.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
            )
            page = client.tools.list()
            page = page.tools[0]
            print(page.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")
              )
              page, err := client.Tools.List(context.TODO(), riza.ToolListParams{

              })
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", page)
            }
    post:
      description: Create a tool in your project.
      operationId: createTool
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateToolRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tool'
          description: OK
        '401':
          content:
            application/json:
              examples:
                unauthenticated:
                  value:
                    code: 16
                    message: unauthenticated
              schema:
                $ref: '#/components/schemas/Status'
          description: Unauthenticated error response
      summary: Create tool
      tags:
        - Tool
      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 tool = await client.tools.create({ code: 'code', language: 'python', name: 'name' });

            console.log(tool.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
            )
            tool = client.tools.create(
                code="code",
                language="python",
                name="name",
            )
            print(tool.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")
              )
              tool, err := client.Tools.New(context.TODO(), riza.ToolNewParams{
                Code: riza.F("code"),
                Language: riza.F(riza.ToolNewParamsLanguagePython),
                Name: riza.F("name"),
              })
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", tool.ID)
            }
  /v1/tools/{id}:
    get:
      description: Retrieves a tool.
      operationId: retrieveTool
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tool'
          description: OK
        '401':
          content:
            application/json:
              examples:
                unauthenticated:
                  value:
                    code: 16
                    message: unauthenticated
              schema:
                $ref: '#/components/schemas/Status'
          description: Unauthenticated error response
      summary: Retrieve tool
      tags:
        - Tool
      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 tool = await client.tools.get('id');

            console.log(tool.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
            )
            tool = client.tools.get(
                "id",
            )
            print(tool.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")
              )
              tool, err := client.Tools.Get(context.TODO(), "id")
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", tool.ID)
            }
    post:
      description: Update the source code and input schema of a tool.
      operationId: modifyTool
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateToolRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tool'
          description: OK
        '401':
          content:
            application/json:
              examples:
                unauthenticated:
                  value:
                    code: 16
                    message: unauthenticated
              schema:
                $ref: '#/components/schemas/Status'
          description: Unauthenticated error response
      summary: Modify tool
      tags:
        - Tool
      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 tool = await client.tools.update('id');

            console.log(tool.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
            )
            tool = client.tools.update(
                id="id",
            )
            print(tool.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")
              )
              tool, err := client.Tools.Update(
                context.TODO(),
                "id",
                riza.ToolUpdateParams{

                },
              )
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", tool.ID)
            }
  /v1/tools/{id}/execute:
    post:
      description: Execute a tool with a given input. The input is validated against the tool's input schema.
      operationId: executeTool
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExecuteToolRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExecuteToolResponse'
          description: OK
        '401':
          content:
            application/json:
              examples:
                unauthenticated:
                  value:
                    code: 16
                    message: unauthenticated
              schema:
                $ref: '#/components/schemas/Status'
          description: Unauthenticated error response
      summary: Execute tool
      tags:
        - Tool
      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 response = await client.tools.exec('id');

            console.log(response.execution);
        - 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
            )
            response = client.tools.exec(
                id="id",
            )
            print(response.execution)
        - 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")
              )
              response, err := client.Tools.Exec(
                context.TODO(),
                "id",
                riza.ToolExecParams{

                },
              )
              if err != nil {
                panic(err.Error())
              }
              fmt.Printf("%+v\n", response.Execution)
            }
security:
  - bearerHttpAuthentication: []
servers:
  - url: https://api.riza.io
