DocsReferenceAPI reference

Pairing

A browser, or an agent on a new computer, gets the pairing key over Wi-Fi: the device screen shows a 4-digit code; click BOOT to allow, double-click to deny. Kernel only; in the rescue firmware use the key command over USB serial

POST /v1/pair#

Request pairing: the screen shows a 4-digit code; click BOOT to allow (30 s)

Open Kernel only

Open; no signing. Only one request can wait at a time. Then poll GET /v1/pair?id=; you get the device's existing key, which is generated only if there is none

Request body#

application/json

Pairing request

FieldTypeRequiredValuesRangeDescription
namestringYespattern ^[^\u0000-\u001f\u007f]+$length 1–32; ≤ 32 bytesRequester name shown on the device screen; 1–32 bytes, no control characters

Examples#

Browser#

JSON
{"name": "Chrome · Windows"}

Agent#

JSON
{"name": "Claude Code"}

Reply#

The request is on the screen

The pairing request is shown on the device screen

FieldTypeRequiredValuesRangeDescription
okbooleanYestrueAlways true
idstringYespattern ^[0-9a-f]{16}$Request ID for checking the result
codestringYespattern ^[0-9]{4}$4-digit code shown on the screen for the person to compare
expires_sintegerYes≥ 1Seconds left to press BOOT

Error codes#

StatusCodeDescription
400bad_argsname must be 1–32 bytes with no control characters. See the example “Browser” for the correct form
409busyAnother request is waiting: let it expire (30 s), or double-click BOOT to deny it, then retry

For errors any endpoint can return, see Common errors.

GET /v1/pair#

Pairing result; the first query after approval includes the key

Open Kernel only

Open. Poll about once a second. The key is given once and the id then becomes invalid; 30 s after the outcome, or once a new request replaces it, queries return 404

Parameters#

ParameterTypeRequiredValuesRangeDescription
idstringYespattern ^[0-9a-f]{16}$id returned by POST /v1/pair

Reply#

Pairing result

FieldTypeRequiredValuesRangeDescription
okbooleanYestrueAlways true
statestringYeswaiting approved denied expiredwaiting = waiting for a press, approved, denied, expired
left_sinteger≥ 0Seconds left while waiting
keystringpattern ^[0-9a-f]{64}$Pairing key (64 hex digits), only when approved and only this once

Error codes#

StatusCodeDescription
400bad_argsid is missing or not 16 characters
404not_foundNo such request: the key was already taken, a new request replaced it, or the outcome is over 30 s old. POST /v1/pair again
500nvsSaving the new key failed. Retry

For errors any endpoint can return, see Common errors.

View the source of this page on GitHub