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
| Parameter | Type | Required | Description |
|---|
runtime_id | string | Yes | Runtime to terminate |
Response
| Field | Type | Description |
|---|
message | string | Confirmation message |
runtime_id | string | Terminated 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()