Skip to main content
POST
/
v1
/
devboxes
/
{id}
/
create_pty_tunnel
JavaScript
import Runloop from '@runloop/api-client';

const client = new Runloop({
  bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});

const ptyTunnelView = await client.devboxes.createPtyTunnel('id');

console.log(ptyTunnelView.auth_token);
{
  "tunnel_key": "<string>",
  "auth_token": "<string>"
}

Documentation Index

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

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

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The Devbox ID.

Response

OK

An ephemeral PTY tunnel providing authenticated terminal access to a Devbox. These tunnels are not stored on the Devbox and are generated fresh on each request. Usage: https://{port}-{tunnel_key}.tunnel.runloop.ai with Authorization: Bearer {auth_token}

tunnel_key
string
required

The encrypted tunnel key used to construct the tunnel URL. URL format: https://{port}-{tunnel_key}.tunnel.runloop.{domain}

auth_token
string
required

Bearer token for tunnel authentication. Always required for PTY tunnels.