Skip to content

HOST-2752: SLA API Documentation - #162

Open
robertfernandez-vast wants to merge 250 commits into
mainfrom
HOST-2752-SLA-API-Documentation
Open

robertfernandez-vast wants to merge 250 commits into
mainfrom
HOST-2752-SLA-API-Documentation

Conversation

@robertfernandez-vast

Copy link
Copy Markdown
Contributor

HOST-2752: Host SLA API documentation

Branch: HOST-2752-SLA-API-Documentation
Base: origin/main (merge-base 112323ba)
Scope: Changes on the subject branch relative to origin/main (git diff origin/main...HEAD).

Summary

This branch adds host-facing documentation for SLA (Service Level Agreement) offers on Vast.ai: how hosts enable uptime guarantees, set pricing parameters, preview economics, list via console or REST, and monitor settlements. It introduces two new guide pages (host/sla-offers, host/sla-backtester), extends OpenAPI for listing, backtesting, and earnings monitoring, and updates CLI/SDK snippets to state honestly that SLA flags are REST/console-only today.

The work went through 12 iterative doc-review fix cycles after the initial draft. Latest multi-persona review reported no critical issues; remaining feedback is polish and edge-case clarity (sliced-machine search verification, client-facing SLA guide as a future follow-up).

Audience: Hosts (console-first and API automation). Risk: Documentation-only — no application code changes. Hosts should treat CLI/SDK SLA parameters as unavailable until tooling ships.

Details

Host guides (new)

Page Path Purpose
SLA Offers /host/sla-offers End-to-end host SLA: target vs claim, confidence presets, economics walkthrough, console Save/LIST vs REST create_asks, fleet listing, monitoring, common errors
SLA Earnings Backtester /host/sla-backtester GET /api/v0/host/sla_backtest/ — historical replay, worst_day_loss, fleet workflow, error responses

Key themes documented on SLA Offers:

  • Console vs API: Save-then-LIST in the web console; PUT /api/v0/machines/create_asks/ publishes in one request.
  • Parameters: sla_r_target, sla_r_claim, sla_sigma_x (and legacy sla_reliability); validation bounds and invalid_sla_params.
  • Claim headroom: Set claim above target for competitive client premiums; backtester is conservative (claim = target).
  • Economics: Hourly premium in dph_total, daily UTC settlement, asymmetric payout risk (worst_day_loss).
  • Monitoring: GET /api/v0/users/{user_id}/machine-earnings/ — use per_machine[].sla_earn; avoid fleet-wide per_day[].sla_earn for single-machine checks.
  • On-demand only: SLA does not apply to interruptible or reserved/prepay rentals.

OpenAPI and API reference

Area Changes
List machine PUT /api/v0/machines/create_asks/ — SLA request fields, invalid_sla_params, 401 permission shape, 403 machine_locked
SLA backtest New GET /api/v0/host/sla_backtest/ spec (sla_backtest.yaml)
Show earnings sla_earn on per_machine[] and per_day[]; fleet-scope note when machid is set
Show machines Listing/SLA fields on --raw output for read-modify-write partial updates
Permissions SLA Backtest under machine_read

Synced monolithic api-reference/openapi.yaml with YAML sources under api-reference/openapi/yaml/.

Snippets and cross-links

  • snippets/host/cli/list-machine.mdx and snippets/host/sdk/list-machine.mdx: SLA parameters marked not yet available in published CLI/SDK; point to console or REST.
  • host/hosting-overview.mdx: SLA bullet, maintenance + SLA section, search/setup URL fixes, storage GB wording, FAQ grammar.
  • docs.json: Nav entries for host/sla-offers and host/sla-backtester.

API endpoints documented (REST)

Method Path Host use
PUT /api/v0/machines/create_asks/ Enable/update SLA on a listing (machine, sla_r_target, sla_r_claim, sla_sigma_x)
GET /api/v0/host/sla_backtest/ Simulate historical SLA economics (machine_id, r, p, optional date range)
GET /api/v0/users/{user_id}/machine-earnings/ Post-listing SLA settlement (machid, last_days, per_machine[].sla_earn)
GET /api/v0/machines/ Read current listing/SLA fields for partial updates (show machines --raw)

Files / areas touched

Area Files Approx. change
Host guides host/sla-offers.mdx (new), host/sla-backtester.mdx (new), host/hosting-overview.mdx +900 lines
OpenAPI openapi.yaml, list_machine.yaml, sla_backtest.yaml, show_earnings.yaml, show_machines.yaml +740 lines
Snippets snippets/host/cli/list-machine.mdx, snippets/host/sdk/list-machine.mdx +40 lines
Nav / permissions docs.json, api-reference/permissions.mdx small

Total: 12 files, ~1,700 insertions, ~80 deletions.

Upgrade / rollout

  • None for infrastructure or runtime. Publish docs site after merge.
  • No env vars or feature flags in this branch.
  • Host action: Use Set Pricing → SLA + LIST in the console, or REST create_asks/ until CLI/SDK SLA support is released. API keys need machine_write (listing), machine_read (backtester), billing_read (earnings).

Commits

Newest first (origin/main..HOST-2752-SLA-API-Documentation):

  • 302c873 — docs(sla): address doc-review consensus (cycle 12)
  • a6f228a — docs(sla): address doc-review consensus (cycle 11)
  • 150d8b7 — docs(sla): address doc-review consensus (cycle 10)
  • 89be3c4 — docs(sla): address doc-review consensus (cycle 9)
  • db4003d — docs(sla): address doc-review consensus (cycle 8)
  • b3ce882 — docs(sla): address doc-review consensus (cycle 7)
  • 5f8d63a — docs(sla): address doc-review consensus (cycle 6)
  • 40ce178 — docs(sla): address doc-review consensus (cycle 5)
  • 603e773 — docs(sla): address doc-review consensus (cycle 4)
  • cbfe3f5 — docs(sla): address doc-review consensus (cycle 3)
  • 09f8084 — docs(sla): address doc-review consensus (cycle 2)
  • 5078cdc — docs(sla): address doc-review consensus (cycle 1)
  • 50b9465 — Address doc-review feedback for host SLA documentation.
  • d66ac30 — First draft for SLA documentation

@mintlify

mintlify Bot commented Jul 7, 2026 •

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
vastai-80aa3a82 🟢 Ready View Preview Oct 9, 2026, 5:38 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

robertfernandez-vast and others added 10 commits October 8, 2026 11:53
Register SLA pages in nav, align OpenAPI with listing/backtester endpoints, and fix clarity issues flagged across all-hosts review (confidence direction, broken links, jargon, onboarding gaps).

Co-authored-by: Cursor <cursoragent@cursor.com>
Align create_asks error codes with production, add OpenAPI earnings
fleet-scope note, choose-your-path routing, and merge duplicate FAQs.

Co-authored-by: Cursor <cursoragent@cursor.com>
Clarify economics sign convention, console LIST step, dph_total, OpenAPI
SLA CLI caveat, fleet backtest error handling, and webhook subscription key.

Co-authored-by: Cursor <cursoragent@cursor.com>
Document console Save-then-LIST vs REST publish, host-centric economics
tables, earnings rate limits, merge semantics, and maintenance webhooks.

Co-authored-by: Cursor <cursoragent@cursor.com>
Fix API error shapes, UTC day-index docs, confidence/claim clarity,
economics table wording, and host overview SLA publish steps.

Co-authored-by: Cursor <cursoragent@cursor.com>
Fix confidence preset percentages, console step numbering, economics
tail-risk cap, fleet listing workflow, and backtester error table.

Co-authored-by: Cursor <cursoragent@cursor.com>
Clarify hourly vs daily premium framing, promote fleet listing section,
fix setup URL consistency, and improve earnings API fleet guidance.

Co-authored-by: Cursor <cursoragent@cursor.com>
Fix show machines jq path for partial updates, define dph_total early,
and correct backtester economics walkthrough link.

Co-authored-by: Cursor <cursoragent@cursor.com>
Extend show-machines OpenAPI for SLA read path, add search field mapping,
fix daily vs window monitoring examples, uptime measurement, and hosting fixes.

Co-authored-by: Cursor <cursoragent@cursor.com>
robertfernandez-vast and others added 26 commits October 9, 2026 05:13
Tell SLA hosts that a 24-hour maintenance default is not full forgiveness, and that a CLI relist drops the SLA.

Co-authored-by: Cursor <cursoragent@cursor.com>
Save SLA listing terms before an upgrade unlist, and stop the weekly earnings window on yesterday.

Co-authored-by: Cursor <cursoragent@cursor.com>
Stop combining has_sla with expected_reliability in CLI search, and stop comparing a day's charge to fee times hours.

Co-authored-by: Cursor <cursoragent@cursor.com>
Describe the Charges SLA row as one net amount, and stop the upgrade self-test from relisting before holds are back.

Co-authored-by: Cursor <cursoragent@cursor.com>
Re-check rentals before a live fleet re-list, and stop the quick start from treating a missing SLA Fee line as hidden.

Co-authored-by: Cursor <cursoragent@cursor.com>
Stop the fleet re-list on HTTP 403 sla_disabled, and relist only after the Docker holds are back.

Co-authored-by: Cursor <cursoragent@cursor.com>
An extension checks the SLA fee only when the request includes SLA fields.

Co-authored-by: Cursor <cursoragent@cursor.com>
The console cannot turn SLA off with 0, and every Save sends the listing end date.

Co-authored-by: Cursor <cursoragent@cursor.com>
Relist after a Docker upgrade without opening SLA controls, and keep the console verify step for hosts who have no API key.

Co-authored-by: Cursor <cursoragent@cursor.com>
A new machine has no SLA preview until it has rental history, and omitted disk still rents 10 GB.

Co-authored-by: Cursor <cursoragent@cursor.com>
The fleet quota check was matching an error code the CLI never prints, and hosts were told to read an SLA fee the CLI cannot show.

Co-authored-by: Cursor <cursoragent@cursor.com>
The outage relist was turning SLA back on with a partial body that resets storage price and auto-renew.

Co-authored-by: Cursor <cursoragent@cursor.com>
Hosts were told to stay listed through maintenance, and to turn SLA on before destroying the test rental.

Co-authored-by: Cursor <cursoragent@cursor.com>
show maints needs instance_read, and the post-outage self-test will not start while the machine is still rented.

Co-authored-by: Cursor <cursoragent@cursor.com>
The outage relist was one paragraph, and the billing page pointed renters at the wrong bullet.

Co-authored-by: Cursor <cursoragent@cursor.com>
The post-outage self-test stays blocked until the current rental ends, and show machines left out the fields those scripts read.

Co-authored-by: Cursor <cursoragent@cursor.com>
show maints labels Vast-scheduled windows as admin_scheduled, and unlisting during an outage can leave SLA off until the rental ends.

Co-authored-by: Cursor <cursoragent@cursor.com>
Meeting the SLA target is not a zero-credit day. Settlement still pays about half of that day's covered compute.

Co-authored-by: Cursor <cursoragent@cursor.com>
Every page now uses the same settlement rule: a day on the target still pays about half of that day's covered compute.

Co-authored-by: Cursor <cursoragent@cursor.com>
A day well above the target keeps most of the SLA fee, and the self-test key must include offer search.

Co-authored-by: Cursor <cursoragent@cursor.com>
The renter page leads with how to turn SLA on, and break-even is named before the economics.

Co-authored-by: Cursor <cursoragent@cursor.com>
A day above the host commitment can still fall below break-even, and the self-test examples use the packaged CLI.

Co-authored-by: Cursor <cursoragent@cursor.com>
Unlisting for planned work drops the SLA ask, and listing does not check the self-test for you.

Co-authored-by: Cursor <cursoragent@cursor.com>
The host checklist no longer repeats the scoped-key list, and a host-key search is not treated as proof that renters can see the offer.

Co-authored-by: Cursor <cursoragent@cursor.com>
Turning SLA off points at the relist step, and cancel maint documents the admin_locked count the API returns.

Co-authored-by: Cursor <cursoragent@cursor.com>
Maintenance forgiveness follows the window, not when a rental started, and the self-test can still run when a sliced machine has a rentable offer.

Co-authored-by: Cursor <cursoragent@cursor.com>
@robertfernandez-vast
robertfernandez-vast force-pushed the HOST-2752-SLA-API-Documentation branch from 77a4a71 to ecc1b82 Compare October 9, 2026 17:37
@robertfernandez-vast robertfernandez-vast changed the title Host 2752 sla api documentation Host 2752: SLA API Documentation Oct 9, 2026
@robertfernandez-vast robertfernandez-vast changed the title Host 2752: SLA API Documentation HOST-2752: SLA API Documentation Oct 9, 2026

This branch was successfully deployed

1 active deployment
staging — ecc1b82f Deployed Oct 9, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant