API v1
KeyRoute API
Create ephemeral WireGuard tunnels from any of our 4 global regions. Full TCP/UDP routing through dedicated IP addresses.
Quick Start curl
# Create a 5-minute tunnel from Frankfurt
curl -X POST https://keyroute.world/v1/tunnel \
-H "Authorization: Bearer YOUR_KEYKEEPER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"region": "eu-frankfurt",
"duration": 300
}'
# Response includes WireGuard config
{
"tunnel_id": "tun_abc123...",
"wireguard_config": "[Interface]\\nPrivateKey = ...",
"endpoint": "134.122.87.87:51820",
"expires_at": "2024-12-01T19:05:00Z"
} Base URL
https://keyroute.world Authentication
Bearer <keykeeper_token> Endpoints
POST
/v1/tunnel Create a new ephemeral WireGuard tunnel. Returns a complete WireGuard configuration.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| region | string | No | Region ID (default: auto) |
| duration | number | Yes | Duration in seconds (30-3600) |
Response
{
"tunnel_id": "tun_f4b047e273e16b48",
"region": "eu-frankfurt",
"wireguard_config": "[Interface]\\nPrivateKey = ...\\n[Peer]\\n...",
"endpoint": "134.122.87.87:51820",
"client_ip": "10.100.0.2",
"expires_at": "2024-12-01T19:05:00.000Z"
} GET
/v1/tunnel/:id Get tunnel status and billing information.
DELETE
/v1/tunnel/:id Close tunnel early. Only pays for actual usage time.
GET
/v1/tunnels List all tunnels for your agent.
Available Regions
Frankfurt
DE Region ID
eu-frankfurt WireGuard Port 51820
Sydney
AU Region ID
ap-sydney WireGuard Port 51820
San Francisco
US Region ID
us-west WireGuard Port 51820
New York
US Region ID
us-east WireGuard Port 51820
How It Works
1
Create Tunnel
POST to /v1/tunnel with your desired duration. We generate a unique keypair and configure the server.
2
Configure WireGuard
Use the returned WireGuard config to connect. All traffic will route through our server's IP.
3
Use & Close
Tunnel auto-expires or DELETE early. You only pay for seconds used at $0.001/second.
Ready to route?
Get your API key from KeyKeeper and start creating tunnels.