Skip to main content
POST
/
api
/
v1
/
tunnel
Create Tunnel Endpoint
curl --request POST \
  --url https://api.primeintellect.ai/api/v1/tunnel \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "local_port": 8765
}
'
{
  "tunnel_id": "<string>",
  "hostname": "<string>",
  "url": "<string>",
  "frp_token": "<string>",
  "server_host": "<string>",
  "expires_at": "2023-11-07T05:31:56Z",
  "server_port": 7000
}

Rate Limit

100 requests per 60 seconds per user.

Authorizations

Authorization
string
header
required

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

Body

application/json

Request to create a new tunnel.

name
string | null

Optional friendly name for the tunnel

Required string length: 1 - 64
local_port
integer
default:8765

Local port the tunnel will forward traffic to

Required range: 1 <= x <= 65535

Response

Successful Response

Response containing tunnel connection details.

tunnel_id
string
required

Unique tunnel identifier

hostname
string
required

Full hostname for the tunnel

url
string
required

Full HTTPS URL for accessing the tunnel

frp_token
string
required

Authentication token for frpc client

server_host
string
required

frps server hostname

expires_at
string<date-time>
required

Token expiration timestamp

server_port
integer
default:7000

frps server port