Skip to content

Create a runtime

POST
/v2/runtimes
curl --request POST \
--url https://api.runta.com/v2/runtimes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "environment_variables": {}, "egress_policy": { "mode": "denylist", "denied_hosts": [] }, "idle_policy": { "mode": "disabled" }, "auto_shutdown_policy": { "mode": "disabled", "after_seconds": 1 }, "auto_delete_policy": { "mode": "disabled", "after_seconds": 1 }, "ingress_specs": [], "name": "example", "resources": { "requests": { "vcpus": 1, "memory_mib": 1024 }, "limits": { "memory_mib": 1024 } }, "image": { "id": "example", "model_provider_protocol": "example", "runtime_sign_in": false, "model_provider_base_url": "example", "model_provider_model": "example" }, "secret_configuration": [], "ssh_key_ids": [], "vnc_enabled": false, "repositories": [], "llm_tool_io_capture_enabled": false, "llm_session_content_capture_enabled": false, "tls_passthrough_hosts": [], "tcp_allowlist": [], "llm_token_saving_policy": { "json_array_enabled": false, "log_enabled": false, "search_results_enabled": false, "git_diff_enabled": false } }'
Idempotency-Key
string
>= 1 characters <= 255 characters

Optional caller-generated key reused across retries of one logical runtime creation.

Runtime creation request.

Media typeapplication/json
One of:

Create a fresh runtime from a Runtime Image.

object
environment_variables

Non-secret environment variables the runtime carries. Names must match [A-Za-z_][A-Za-z0-9_]* and be at most 128 UTF-8 bytes. Names Runta sets itself are reserved: the RUNTA_ prefix, the runtime CA variables, the managed repository credentials, and the canonical names of the provider secret presets. Values must be at most 8192 UTF-8 bytes each and 65536 in total, and must not contain NUL, CR, or LF.

object
<= 64 properties
key
additional properties
string
egress_policy

Initial egress policy.

object
One of:

Deny matching hosts and allow all other egress destinations.

object
mode
required
string
Allowed values: denylist
denied_hosts
required

Host names, wildcard patterns, IP addresses, or CIDR ranges to deny.

Array<string>
<= 128 items
idle_policy

Initial idle policy. Omit to use disabled.

object
One of:

Disable automatic idle suspension and wakeup.

object
mode
required
string
Allowed values: disabled
auto_shutdown_policy

Maximum duration of a running session. Omit on PATCH to preserve the policy. An explicit save resets only this policy’s clock. Disabled by default.

object
mode
required
string
Allowed values: disabled enabled
after_seconds

Required for enabled and forbidden for disabled. An explicit save restarts only this policy’s clock.

integer format: uint32
>= 1 <= 2147483647
auto_delete_policy

Retention after confirmed shutdown. Starting the runtime cancels deletion. Omit on PATCH to preserve the policy. An explicit save resets only this policy’s clock. Disabled by default.

object
mode
required
string
Allowed values: disabled enabled
after_seconds

Required for enabled and forbidden for disabled. An explicit save restarts only this policy’s clock.

integer format: uint32
>= 1 <= 2147483647
ingress_specs

Optional ingress specs.

Array<object>
default: <= 16 items

Public ingress forwarding rule. Application URLs use the gateway lifecycle response contract described in the RuntimeIngress tag, including the x-runta-runtime-state header on gateway-generated HTTP 503/410 responses.

object
protocol
required

Application-layer protocol.

string
Allowed values: http https
runtime_port
required

Port inside the runtime VM.

integer format: uint16
<= 65535
hostname_label

Stable custom hostname label for this port, for example foxden. The port is then reachable at <label>.<ingress domain>, for example foxden.runta.sh. This is a preview. It is available only when the deployment enables custom hostnames. A PATCH that replaces ingress_specs without hostname_label for this port clears the label.

string
<= 63 characters
name

Human-readable runtime name.

string
nullable
resources

Runtime resource requests and limits.

object
limits

Resource limits.

object
memory_mib
required

Maximum memory in MiB.

integer format: uint64
>= 1
requests

Resource requests.

object
memory_mib

Requested baseline memory in MiB.

integer format: uint64
default: 1024 >= 1
vcpus

Requested virtual CPUs.

integer format: uint32
default: 1 >= 1 <= 2147483647
disk_gib

Requested overlay virtual capacity in GiB.

integer format: uint32
>= 32 <= 256
image

Runtime Image selection. Omit on a fresh create to use the default variant.

object
id
required
string
>= 1 characters
model_provider_protocol
string
nullable
runtime_sign_in
boolean
model_provider_base_url

HTTPS endpoint the agent is configured against. Omit to use the image’s default. Only images advertising allow_custom_base_url accept another endpoint.

string
nullable
model_provider_model

Model the agent is configured to use. Omit to use the image’s default.

string
nullable
secret_configuration

Complete inline secret injection configuration.

Array<object>
default:

Inline injection configuration for one tenant secret.

object
secret_id
required
string
environment
Array<object>
default:

Environment variable populated from a secret.

object
name
required
string
value_template
required
string
egress_rules
Array<object>
default:

HTTP egress credential populated from a secret.

object
host_pattern
required
string
path_pattern
string
nullable
action
required

Where an egress secret is injected.

string
Allowed values: header query
name
required
string
value_template
required
string
files
Array<object>
default:

Managed credential file populated from a secret.

object
path
required

Delivery path, relative to the guest home directory.

string
value_template
required
string
ssh_key_ids

Personal SSH key UUIDs to attach atomically.

Array<string>
default:
vnc_enabled

Start the shared VNC desktop whenever the runtime is running.

boolean
repositories

GitHub repositories to check out during runtime setup, in checkout order. The first repository becomes the default workspace. Repositories may span GitHub App installations.

Array<object>
default: <= 20 items
object
repository_id
required
integer format: int64
branch
string
nullable
llm_tool_io_capture_enabled

Opt in to official LLM HTTP API tool input/output capture.

boolean
llm_session_content_capture_enabled

Explicitly enable capture of user, assistant, and tool conversation content. Disabled by default. Independent from tool-only capture.

boolean
tls_passthrough_hosts

HTTPS host patterns that use opaque TLS tunnels to the original destination, taking precedence over secret injection, LLM capture, token saving, and model routing.

Array<string>
default: <= 64 items
tcp_allowlist

Exact FQDN:port destinations that may receive raw TCP from the runtime. Empty denies raw TCP. The gateway allows a connection only after the name resolves to that public IPv4 address and port.

Array<string>
default: <= 16 items
llm_token_saving_policy

Initial LLM tool-output compression policy. Omit to disable every method.

object
json_array_enabled
boolean
log_enabled
boolean
search_results_enabled
boolean
git_diff_enabled
boolean

Runtime resource created.

Media typeapplication/json

Response envelope.

object
data
required

Runtime response object.

object
auto_shutdown_at

Current session deadline, absent until running or when disabled.

string format: date-time
auto_delete_at

Deletion deadline, absent until shutdown or when disabled.

string format: date-time
environment_variables

Non-secret environment variables the runtime carries.

object
<= 64 properties
key
additional properties
string
display_name
required

User-chosen display name.

string
egress_policy
required

Egress policy.

object
One of:

Deny matching hosts and allow all other egress destinations.

object
mode
required
string
Allowed values: denylist
denied_hosts
required

Host names, wildcard patterns, IP addresses, or CIDR ranges to deny.

Array<string>
<= 128 items
llm_tool_io_capture_enabled
required

Whether official LLM HTTP API tool input/output capture is enabled.

boolean
llm_session_content_capture_enabled
required

Explicitly enable capture of user, assistant, and tool conversation content. Disabled by default. Independent from tool-only capture.

boolean
tls_passthrough_hosts

HTTPS host patterns using opaque TLS tunnels to the original destination, bypassing secret injection, LLM capture, token saving, and model routing.

Array<string>
tcp_allowlist

Exact FQDN:port destinations that may receive raw TCP from the runtime. Empty denies raw TCP.

Array<string>
llm_token_saving_policy
required

Canonical LLM tool-output compression policy.

object
json_array_enabled
required
boolean
log_enabled
required
boolean
search_results_enabled
required
boolean
git_diff_enabled
required
boolean
idle_policy
required

Runtime idle suspension and automatic wakeup policy.

object
One of:

Disable automatic idle suspension and wakeup.

object
mode
required
string
Allowed values: disabled
auto_shutdown_policy

Maximum duration of a running session. Omit on PATCH to preserve the policy. An explicit save resets only this policy’s clock. Disabled by default.

object
mode
required
string
Allowed values: disabled enabled
after_seconds

Required for enabled and forbidden for disabled. An explicit save restarts only this policy’s clock.

integer format: uint32
>= 1 <= 2147483647
auto_delete_policy

Retention after confirmed shutdown. Starting the runtime cancels deletion. Omit on PATCH to preserve the policy. An explicit save resets only this policy’s clock. Disabled by default.

object
mode
required
string
Allowed values: disabled enabled
after_seconds

Required for enabled and forbidden for disabled. An explicit save restarts only this policy’s clock.

integer format: uint32
>= 1 <= 2147483647
id
required

Stable runtime UUID.

string
created_at
required

RFC3339 timestamp when the control-plane runtime row was created.

string
updated_at
required

RFC3339 timestamp of the last control-plane runtime row mutation.

string
ingress_specs
required

Active ingress specs.

Array<object>

Public ingress forwarding rule. Application URLs use the gateway lifecycle response contract described in the RuntimeIngress tag, including the x-runta-runtime-state header on gateway-generated HTTP 503/410 responses.

object
protocol
required

Application-layer protocol.

string
Allowed values: http https
runtime_port
required

Port inside the runtime VM.

integer format: uint16
<= 65535
hostname_label

Stable custom hostname label for this port, for example foxden. The port is then reachable at <label>.<ingress domain>, for example foxden.runta.sh. This is a preview. It is available only when the deployment enables custom hostnames. A PATCH that replaces ingress_specs without hostname_label for this port clears the label.

string
<= 63 characters
resources
required

Runtime resource state.

object
current
required

Current resource allocation.

object
memory_mib
required

Current memory allocation in MiB.

integer format: uint64
>= 1
observed_disk_gib
required

Worker-observed overlay virtual capacity in GiB.

integer format: uint32
limits
required

Resource limits.

object
memory_mib
required

Maximum memory in MiB.

integer format: uint64
>= 1
requests
required

Resource requests.

object
memory_mib
required

Requested baseline memory in MiB.

integer format: uint64
>= 1
vcpus
required

Requested virtual CPUs.

integer format: uint32
>= 1 <= 2147483647
disk_gib
required

Target overlay virtual capacity in GiB.

integer format: uint32
>= 16 <= 256
image_id
required

Stable Runtime Image variant identifier.

string
status
required

Runtime status.

string
Allowed values: running paused shutdown creating deleting error crashed suspended unavailable
degraded
required

Whether a running runtime has lacked a new successful heartbeat for at least 60 seconds.

boolean
desired_status
required

Control-plane target lifecycle state.

string
Allowed values: running paused suspended shutdown deleting
ssh_enabled
required

Whether this runtime supports SSH access.

boolean
vnc_enabled
required

Whether the shared VNC desktop is configured to run with this runtime.

boolean
vnc_ready
required

Whether the current Worker assignment has published a ready VNC mapping.

boolean
vnc_error_code

Bounded machine-readable VNC startup failure code.

string
nullable
vnc_connection
required

Fixed native VNC gateway connection parameters for this runtime’s zone.

object
hostname
required

Public VNC gateway DNS hostname.

string
>= 1 characters
port
required

Public native VNC TCP port.

integer format: uint16
>= 1 <= 65535
username
required

Username required by the X509Plain handshake.

string
Allowed values: runta
security_type
required

VeNCrypt authentication subtype required by the gateway.

string
Allowed values: X509Plain
error_code

Bounded machine-readable provisioning failure code.

string
nullable
error_message

Current runtime failure reason, bounded to 4096 UTF-8 bytes. Cleared when the failure recovers.

string
nullable
owner_user_id
required

Organization member who owns the runtime.

string
can_manage
required

Whether the current caller may perform control operations on this runtime.

boolean
revision
required

Monotonic runtime aggregate revision.

integer format: uint64
>= 1
secret_configuration
required

Canonical inline secret injection configuration.

Array<object>

Inline injection configuration for one tenant secret.

object
secret_id
required
string
environment
Array<object>
default:

Environment variable populated from a secret.

object
name
required
string
value_template
required
string
egress_rules
Array<object>
default:

HTTP egress credential populated from a secret.

object
host_pattern
required
string
path_pattern
string
nullable
action
required

Where an egress secret is injected.

string
Allowed values: header query
name
required
string
value_template
required
string
files
Array<object>
default:

Managed credential file populated from a secret.

object
path
required

Delivery path, relative to the guest home directory.

string
value_template
required
string
Example
{
"data": {
"egress_policy": {
"mode": "denylist"
},
"idle_policy": {
"mode": "disabled"
},
"auto_shutdown_policy": {
"mode": "disabled"
},
"auto_delete_policy": {
"mode": "disabled"
},
"ingress_specs": [
{
"protocol": "http"
}
],
"status": "running",
"desired_status": "running",
"vnc_connection": {
"username": "runta",
"security_type": "X509Plain"
},
"secret_configuration": [
{
"environment": [],
"egress_rules": [],
"files": []
}
]
}
}
Location
string

Canonical Runtime resource URI.

Missing, malformed, or rejected bearer token

Media typeapplication/json
object
error
required
object
authorization_reason

Authorization refusal reason. Only required_scope_missing permits an OAuth scope challenge.

string
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition FEATURE_TEMPORARILY_DISABLED internal invalid_argument not_found permission_denied tenant_blocked rate_limited unauthenticated unavailable unimplemented
message
required
string
request_id
required

UUID v7 correlation ID shared with the X-Request-Id response header.

string
Example
{
"error": {
"code": "already_exists"
}
}

The bearer token is not allowed to perform this action

Media typeapplication/json
object
error
required
object
authorization_reason

Authorization refusal reason. Only required_scope_missing permits an OAuth scope challenge.

string
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition FEATURE_TEMPORARILY_DISABLED internal invalid_argument not_found permission_denied tenant_blocked rate_limited unauthenticated unavailable unimplemented
message
required
string
request_id
required

UUID v7 correlation ID shared with the X-Request-Id response header.

string
Example
{
"error": {
"code": "already_exists"
}
}

The requested resource was not found

Media typeapplication/json
object
error
required
object
authorization_reason

Authorization refusal reason. Only required_scope_missing permits an OAuth scope challenge.

string
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition FEATURE_TEMPORARILY_DISABLED internal invalid_argument not_found permission_denied tenant_blocked rate_limited unauthenticated unavailable unimplemented
message
required
string
request_id
required

UUID v7 correlation ID shared with the X-Request-Id response header.

string
Example
{
"error": {
"code": "already_exists"
}
}

The request conflicts with current resource state

Media typeapplication/json
object
error
required
object
authorization_reason

Authorization refusal reason. Only required_scope_missing permits an OAuth scope challenge.

string
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition FEATURE_TEMPORARILY_DISABLED internal invalid_argument not_found permission_denied tenant_blocked rate_limited unauthenticated unavailable unimplemented
message
required
string
request_id
required

UUID v7 correlation ID shared with the X-Request-Id response header.

string
Example
{
"error": {
"code": "already_exists"
}
}

Validation or application error

Media typeapplication/json
object
error
required
object
authorization_reason

Authorization refusal reason. Only required_scope_missing permits an OAuth scope challenge.

string
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition FEATURE_TEMPORARILY_DISABLED internal invalid_argument not_found permission_denied tenant_blocked rate_limited unauthenticated unavailable unimplemented
message
required
string
request_id
required

UUID v7 correlation ID shared with the X-Request-Id response header.

string
Example
{
"error": {
"code": "already_exists"
}
}

Rate limit exceeded

Media typeapplication/json
object
error
required
object
authorization_reason

Authorization refusal reason. Only required_scope_missing permits an OAuth scope challenge.

string
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition FEATURE_TEMPORARILY_DISABLED internal invalid_argument not_found permission_denied tenant_blocked rate_limited unauthenticated unavailable unimplemented
message
required
string
request_id
required

UUID v7 correlation ID shared with the X-Request-Id response header.

string
Example
{
"error": {
"code": "already_exists"
}
}

Operation is not implemented

Media typeapplication/json
object
error
required
object
authorization_reason

Authorization refusal reason. Only required_scope_missing permits an OAuth scope challenge.

string
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition FEATURE_TEMPORARILY_DISABLED internal invalid_argument not_found permission_denied tenant_blocked rate_limited unauthenticated unavailable unimplemented
message
required
string
request_id
required

UUID v7 correlation ID shared with the X-Request-Id response header.

string
Example
{
"error": {
"code": "already_exists"
}
}

Upstream service is unavailable

Media typeapplication/json
object
error
required
object
authorization_reason

Authorization refusal reason. Only required_scope_missing permits an OAuth scope challenge.

string
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition FEATURE_TEMPORARILY_DISABLED internal invalid_argument not_found permission_denied tenant_blocked rate_limited unauthenticated unavailable unimplemented
message
required
string
request_id
required

UUID v7 correlation ID shared with the X-Request-Id response header.

string
Example
{
"error": {
"code": "already_exists"
}
}

Upstream request timed out

Media typeapplication/json
object
error
required
object
authorization_reason

Authorization refusal reason. Only required_scope_missing permits an OAuth scope challenge.

string
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition FEATURE_TEMPORARILY_DISABLED internal invalid_argument not_found permission_denied tenant_blocked rate_limited unauthenticated unavailable unimplemented
message
required
string
request_id
required

UUID v7 correlation ID shared with the X-Request-Id response header.

string
Example
{
"error": {
"code": "already_exists"
}
}

Error response

Media typeapplication/json
object
error
required
object
authorization_reason

Authorization refusal reason. Only required_scope_missing permits an OAuth scope challenge.

string
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition FEATURE_TEMPORARILY_DISABLED internal invalid_argument not_found permission_denied tenant_blocked rate_limited unauthenticated unavailable unimplemented
message
required
string
request_id
required

UUID v7 correlation ID shared with the X-Request-Id response header.

string
Example
{
"error": {
"code": "already_exists"
}
}