Skip to content

Host 2752 sla api documentation - #162

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

robertfernandez-vast wants to merge 140 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 5, 2026, 11:24 PM

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

robertfernandez-vast and others added 12 commits October 5, 2026 15:44
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
Document console Save-then-LIST vs REST publish, host-centric economics
tables, earnings rate limits, merge semantics, and maintenance webhooks.

Co-authored-by: Cursor <[email protected]>
Fix API error shapes, UTC day-index docs, confidence/claim clarity,
economics table wording, and host overview SLA publish steps.

Co-authored-by: Cursor <[email protected]>
Fix confidence preset percentages, console step numbering, economics
tail-risk cap, fleet listing workflow, and backtester error table.

Co-authored-by: Cursor <[email protected]>
Clarify hourly vs daily premium framing, promote fleet listing section,
fix setup URL consistency, and improve earnings API fleet guidance.

Co-authored-by: Cursor <[email protected]>
Fix show machines jq path for partial updates, define dph_total early,
and correct backtester economics walkthrough link.

Co-authored-by: Cursor <[email protected]>
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 <[email protected]>
Fix SLA opt-in phrasing, fleet listing read-modify-write pattern, UTC
monitoring dates, and confidence preset wording.

Co-authored-by: Cursor <[email protected]>
Add claim headroom guidance, reframe confidence presets, fix search
verification jq, and warn against copying backtester p into sla_sigma_x.

Co-authored-by: Cursor <[email protected]>
robertfernandez-vast and others added 28 commits October 5, 2026 15:44
Require ALLOWLIST before fleet DRY_RUN=0 so paused machines stay unlisted.

Co-authored-by: Cursor <[email protected]>
Align Create Instance vs target_reliability, rent body required fields, and dph_total in the CLI table.

Co-authored-by: Cursor <[email protected]>
Clarify CLI create-instance vs SLA RENT and pin the UTC day-index example to a unix timestamp.

Co-authored-by: Cursor <[email protected]>
Keep dph_total as a --raw sort field, not a search query key, and rephrase interruptible SLA coverage.

Co-authored-by: Cursor <[email protected]>
Point renter credit reconciliation at the real CLI charges command, not a nonexistent show charges.

Co-authored-by: Cursor <[email protected]>
Echo per_machine sla_earn in the host key recipe and label the renter scoped-key recipe consistently.

Co-authored-by: Cursor <[email protected]>
Clarify that instance verify is not billing credits, and drop informal encyclopedia wording on permissions.

Co-authored-by: Cursor <[email protected]>
Point earnings poll limits at Show Earnings OpenAPI, keep console SLA off the permissions encyclopedia, and lead search-offers with examples.

Co-authored-by: Cursor <[email protected]>
Collapse overlapping console-leave routing on the permissions page into one table.

Co-authored-by: Cursor <[email protected]>
Align Reliability target with Search filters, harden fleet backtest success checks, and expand show-earnings SLA examples.

Co-authored-by: Cursor <[email protected]>
Clarify earnings poll wording, SLA-before-LIST checklist order, and Normal-confidence fleet backtest p.

Co-authored-by: Cursor <[email protected]>
Add show-earnings rate-limit guidance, map fleet backtest p from sla_sigma_x, and align bundles search defaults with CLI.

Co-authored-by: Cursor <[email protected]>
Add a copy-paste sday/eday earnings example and a host jump link ahead of the renter key recipe.

Co-authored-by: Cursor <[email protected]>
Add a host jump link ahead of the renter scoped-key recipe on permissions.

Co-authored-by: Cursor <[email protected]>
Harden fleet backtest r validation, link CLI --storage to channel defaults, and clarify Save vs LIST and Destroy paths.

Co-authored-by: Cursor <[email protected]>
Harden 429 rent recovery, use relative maintenance start times, and note CLI vs REST gpu_ram units.

Co-authored-by: Cursor <[email protected]>
Guard fleet end_date, align CLI search defaults, clarify Search filters vs CLI, and harden backtester fleet hygiene.

Co-authored-by: Cursor <[email protected]>
Align REST search defaults with CLI, clarify console verify vs billing, and fix Tight/p label plus relative backtester dates.

Co-authored-by: Cursor <[email protected]>
Fix post-rent verify anchors, add --storage to host verify examples, and link overview to checklist/risk.

Co-authored-by: Cursor <[email protected]>
Align fleet 429 prose with illustrative scripts, clarify REST earnings params, and fix host self-verify / permissions framing.

Co-authored-by: Cursor <[email protected]>
Merge duplicate invalid_args rows, clarify REST vs CLI rented defaults, and tighten host/renter recipe routing.

Co-authored-by: Cursor <[email protected]>
Fix permissions/search-offers ≥3/8 nits, surface host SLA early, and move earnings curls out of Warning.

Co-authored-by: Cursor <[email protected]>
Fix USER_ID sourcing for billing_read keys, link checklist verify to jq filter, and add Destroy guidance for stuck rentals.

Co-authored-by: Cursor <[email protected]>
Gate first LIST until checklist step 7, split console vs CLI verify, and align Profile-first user_id guidance.

Co-authored-by: Cursor <[email protected]>
Match OpenAPI sla_backtest trailing slash and clarify SLA query vs response-only fields.

Co-authored-by: Cursor <[email protected]>
Clarify console vs CLI filter carry-over, move self-test after LIST, and reword client-side API filtering.

Co-authored-by: Cursor <[email protected]>
Use portable jq for fleet backtest r validation and clarify Save vs LIST checklist order.

Co-authored-by: Cursor <[email protected]>

This branch was successfully deployed

1 active deployment
staging — 77a4a713 Deployed Oct 5, 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