Skip to content

POST /api/v1/hosts/pairings

Operation: createHostPairing.

Open a host pairing (installer; unauthenticated)

Called by the one-line installer (curl -fsSL https://amplerun.com/host | sudo bash). Returns a short user_code for a person to approve on /pair and a poll_secret only the installer holds; only their hashes are stored. Expires after 10 minutes. The code alone never yields a token. Rate-limited per source address.

POST https://amplerun-api.spiry.org/api/v1/hosts/pairings

No default Bearer requirement is declared for this operation. Read its description for wallet signatures, host enrollment or other specialized proofs.

Required body.

FieldTypePresenceDescription
summaryobjectRequiredWhat the installer reports about the machine. Unverified; shown to the approver.
{
"type": "object",
"additionalProperties": false,
"required": [
"summary"
],
"properties": {
"summary": {
"type": "object",
"additionalProperties": false,
"description": "What the installer reports about the machine. Unverified; shown to the approver.",
"required": [
"hostname",
"gpus"
],
"properties": {
"hostname": {
"type": "string",
"maxLength": 253
},
"os": {
"type": "string",
"maxLength": 100
},
"gpus": {
"type": "array",
"maxItems": 16,
"items": {
"type": "object",
"additionalProperties": false,
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"maxLength": 100
},
"vram_mib": {
"type": "integer",
"minimum": 0
}
}
}
}
}
}
}
}

Pairing opened.

application/json

FieldTypePresenceDescription
pairing_idUUIDRequired
user_codestringRequiredXXXX-XXXX from an alphabet without look-alike characters
poll_secretstringRequiredShown once; needed to poll.
expires_atRfc3339UtcRequired
intervalintegerRequiredSeconds between polls.
verification_uristringRequired
verification_uri_completestringRequired
{
"type": "object",
"additionalProperties": false,
"required": [
"pairing_id",
"user_code",
"poll_secret",
"expires_at",
"interval",
"verification_uri",
"verification_uri_complete"
],
"properties": {
"pairing_id": {
"$ref": "#/components/schemas/UUID"
},
"user_code": {
"type": "string",
"description": "XXXX-XXXX from an alphabet without look-alike characters"
},
"poll_secret": {
"type": "string",
"description": "Shown once; needed to poll."
},
"expires_at": {
"$ref": "#/components/schemas/Rfc3339Utc"
},
"interval": {
"type": "integer",
"description": "Seconds between polls."
},
"verification_uri": {
"type": "string"
},
"verification_uri_complete": {
"type": "string"
}
}
}

Error envelope. 401 unauthenticated, 403/404 forbidden, 409 conflict, 422 invalid input, 429 rate limited (code UNAVAILABLE, retryable:true, no Retry-After header), 503 unavailable money/provider state with retryable:true.

application/json

FieldTypePresenceDescription
errorobjectRequired
{
"$ref": "#/components/schemas/ErrorEnvelope"
}

Replace path/query placeholders and provide the required JSON body, headers and credential from the sections above. This is a request outline, not a command that chooses an amount or starts a rental for you.

Terminal window
curl --request POST 'https://amplerun-api.spiry.org/api/v1/hosts/pairings'

Schema definitions · Download OpenAPI · Authentication · Errors and recovery

Official AmpleRun documentation · Contract v3 · Generated from the API contract · Revision 52fe29de · Open AmpleRun · View Markdown · For agents