Skip to content

Open a short-lived Cloud Agent computer session

POST
/v2/agents/{agent_id}/computer-sessions
curl --request POST \
--url https://api.runta.me/v2/agents/example/computer-sessions \
--header 'Authorization: Bearer <token>'

Enables the Agent runtime’s VNC desktop if needed, waits for it to become ready, and returns a short-lived Runta browser session. Long-lived API credentials remain outside the renderer; clients pass the returned protocols only to the VNC WebSocket handshake.

agent_id
required
string

Ready computer session.

Media typeapplication/json
object
agent_id
required
string
runtime_id
required
string
expires_at
required
string format: date-time
channels
required

Extensible set of transports authorized by this Runta session. VNC is available now; computer-use transports can be added without changing the session envelope.

object
vnc
required
object
websocket_url
required
string format: uri
protocols
required
Array<string>
Examplegenerated
{
"agent_id": "example",
"runtime_id": "example",
"expires_at": "2026-04-15T12:00:00Z",
"channels": {
"vnc": {
"websocket_url": "https://example.com",
"protocols": [
"example"
]
}
}
}

Missing, malformed, or rejected bearer token

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition internal invalid_argument not_found permission_denied 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
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition internal invalid_argument not_found permission_denied 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
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition internal invalid_argument not_found permission_denied 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
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition internal invalid_argument not_found permission_denied 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
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition internal invalid_argument not_found permission_denied 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
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition internal invalid_argument not_found permission_denied 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
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition internal invalid_argument not_found permission_denied 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
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition internal invalid_argument not_found permission_denied 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
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition internal invalid_argument not_found permission_denied 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
code
required
string
Allowed values: already_exists command_failed deadline_exceeded failed_precondition internal invalid_argument not_found permission_denied 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"
}
}