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.
Endpoint
Section titled “Endpoint”POST https://amplerun-api.spiry.org/api/v1/hosts/pairings
Authentication
Section titled “Authentication”No default Bearer requirement is declared for this operation. Read its description for wallet signatures, host enrollment or other specialized proofs.
Request body
Section titled “Request body”Required body.
application/json
Section titled “application/json”| Field | Type | Presence | Description |
|---|---|---|---|
summary | object | Required | What 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 } } } } } } }}Responses
Section titled “Responses”Pairing opened.
application/json
| Field | Type | Presence | Description |
|---|---|---|---|
pairing_id | UUID | Required | |
user_code | string | Required | XXXX-XXXX from an alphabet without look-alike characters |
poll_secret | string | Required | Shown once; needed to poll. |
expires_at | Rfc3339Utc | Required | |
interval | integer | Required | Seconds between polls. |
verification_uri | string | Required | |
verification_uri_complete | string | Required |
{ "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" } }}default
Section titled “default”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
| Field | Type | Presence | Description |
|---|---|---|---|
error | object | Required |
{ "$ref": "#/components/schemas/ErrorEnvelope"}Static request outline
Section titled “Static request outline”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.
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