Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.gravixlayer.ai/llms.txt

Use this file to discover all available pages before exploring further.

from gravixlayer import GravixLayer

client = GravixLayer()
runtime = client.runtime.create(template="python-3.14-base-small")

response = client.runtime.kill(runtime.runtime_id)
print(response.message)

Parameters

ParameterTypeRequiredDescription
runtime_idstringYesRuntime to terminate

Response

FieldTypeDescription
messagestringConfirmation message
runtime_idstringTerminated runtime ID
Termination is immediate. Download any files you need before calling kill.
Use try/finally to guarantee cleanup:
from gravixlayer import GravixLayer

client = GravixLayer()
runtime = client.runtime.create(template="python-3.14-base-small")

try:
    result = runtime.run_code(code="print('working')")
    print(result.text)
finally:
    runtime.kill()