Skip to main content

Private TealeNet (PTN)

Endpoints for managing Private TealeNet memberships. A PTN is a closed, CA-signed network of trusted nodes that can share inference capacity privately.


List PTN Memberships

GET /v1/app/ptn

Returns all PTN memberships for this node.

Authentication

Optional. Required when allow_network_access is enabled.

Response

{
"memberships": [
{
"ptnID": "ptn-abc123",
"name": "Acme Corp",
"role": "admin",
"members": 12,
"status": "active"
}
]
}

Example

curl http://localhost:11435/v1/app/ptn

Create PTN

POST /v1/app/ptn/create

Create a new Private TealeNet. The creating node becomes the initial admin and CA.

Request Body

FieldTypeRequiredDescription
namestringYesDisplay name for the PTN
{
"name": "Acme Corp"
}

Response

{
"ptnID": "ptn-abc123",
"name": "Acme Corp",
"role": "admin"
}

Example

curl -X POST http://localhost:11435/v1/app/ptn/create \
-H "Content-Type: application/json" \
-d '{"name": "Acme Corp"}'

Generate Invite

POST /v1/app/ptn/invite

Generate a one-time invite code that another node can use to request membership.

Request Body

FieldTypeRequiredDescription
ptnIDstringYesID of the PTN to generate an invite for
{
"ptnID": "ptn-abc123"
}

Response

{
"inviteCode": "invite-xyz789..."
}

Example

curl -X POST http://localhost:11435/v1/app/ptn/invite \
-H "Content-Type: application/json" \
-d '{"ptnID": "ptn-abc123"}'

Issue Certificate

POST /v1/app/ptn/issue-cert

Issue a signed membership certificate to a node, granting it access to the PTN.

Request Body

FieldTypeRequiredDescription
ptnIDstringYesID of the PTN
nodeIDstringYesID of the node to issue a certificate for
rolestringNoRole to assign. Default: provider
{
"ptnID": "ptn-abc123",
"nodeID": "node-def456",
"role": "provider"
}

Response

{
"certData": "cert-signed-data...",
"nodeID": "node-def456",
"role": "provider"
}

Example

curl -X POST http://localhost:11435/v1/app/ptn/issue-cert \
-H "Content-Type: application/json" \
-d '{"ptnID": "ptn-abc123", "nodeID": "node-def456", "role": "provider"}'

Join with Certificate

POST /v1/app/ptn/join-with-cert

Join a PTN using a signed membership certificate.

Request Body

FieldTypeRequiredDescription
certDatastringYesSigned certificate data received from a PTN admin
{
"certData": "cert-signed-data..."
}

Response

{
"ptnID": "ptn-abc123",
"name": "Acme Corp",
"role": "provider",
"status": "active"
}

Example

curl -X POST http://localhost:11435/v1/app/ptn/join-with-cert \
-H "Content-Type: application/json" \
-d '{"certData": "cert-signed-data..."}'

Leave PTN

POST /v1/app/ptn/leave

Leave a PTN. This revokes the node's membership and removes the local certificate.

Request Body

FieldTypeRequiredDescription
ptnIDstringYesID of the PTN to leave
{
"ptnID": "ptn-abc123"
}

Response

{
"status": "left",
"ptnID": "ptn-abc123"
}

Example

curl -X POST http://localhost:11435/v1/app/ptn/leave \
-H "Content-Type: application/json" \
-d '{"ptnID": "ptn-abc123"}'

Promote to Admin

POST /v1/app/ptn/promote-admin

Promote a member node to admin role within a PTN.

Request Body

FieldTypeRequiredDescription
ptnIDstringYesID of the PTN
nodeIDstringYesID of the node to promote
{
"ptnID": "ptn-abc123",
"nodeID": "node-def456"
}

Response

{
"nodeID": "node-def456",
"role": "admin"
}

Example

curl -X POST http://localhost:11435/v1/app/ptn/promote-admin \
-H "Content-Type: application/json" \
-d '{"ptnID": "ptn-abc123", "nodeID": "node-def456"}'

Import CA Key

POST /v1/app/ptn/import-ca-key

Import a CA signing key for a PTN. This is used to transfer CA authority between nodes or restore from backup.

Request Body

FieldTypeRequiredDescription
ptnIDstringYesID of the PTN
caKeyHexstringYesHex-encoded CA private key
{
"ptnID": "ptn-abc123",
"caKeyHex": "a1b2c3d4e5f6..."
}

Response

{
"status": "imported",
"ptnID": "ptn-abc123"
}

Example

curl -X POST http://localhost:11435/v1/app/ptn/import-ca-key \
-H "Content-Type: application/json" \
-d '{"ptnID": "ptn-abc123", "caKeyHex": "a1b2c3d4e5f6..."}'

Recover PTN

POST /v1/app/ptn/recover

Recover a PTN membership that has become disconnected or corrupted.

Request Body

FieldTypeRequiredDescription
ptnIDstringYesID of the PTN to recover
{
"ptnID": "ptn-abc123"
}

Response

{
"status": "recovered",
"ptnID": "ptn-abc123"
}

Example

curl -X POST http://localhost:11435/v1/app/ptn/recover \
-H "Content-Type: application/json" \
-d '{"ptnID": "ptn-abc123"}'