{"openapi":"3.1.0","info":{"title":"ScoutWyze Compute","version":"1.0.0","description":"Rank current RunPod GPU offers for your workload. Quotes first, booking is an optional upsell. Not multi-cloud fulfillment."},"servers":[{"url":"https://scoutwyze-compute.fly.dev"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"paths":{"/v1/signup":{"post":{"summary":"Create a free API key","responses":{"200":{"description":"accountId + apiKey (shown once) + available credit packs"}}}},"/v1/checkout-sessions":{"post":{"summary":"Create a real Stripe Checkout Session to fund an account","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["accountId","packId"],"properties":{"accountId":{"type":"string"},"packId":{"type":"string"}}}}}},"responses":{"200":{"description":"checkoutUrl to redirect the user to"}}}},"/v1/compute/sample":{"get":{"summary":"Anonymous, rate-limited sample of a real ranked offer — no key required. Also reachable at /v1/route/sample (legacy alias).","responses":{"200":{"description":"Same envelope as /v1/compute/rank's response, for a fixed cheapest-preference query"},"429":{"description":"rate limited"}}}},"/v1/compute/rank":{"post":{"summary":"Rank current GPU offers for your workload. Dual-rail: Bearer key OR native x402/USDC-on-Base payment (added 2026-09-24). Also reachable at /v1/route/rank (legacy alias).","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"gpuClass":{"type":"string"},"minVramGb":{"type":"number"},"region":{"type":"string"},"maxPricePerHour":{"type":"number"},"preference":{"type":"string","enum":["cheapest","fastest","balanced"],"default":"cheapest"}}}}}},"responses":{"200":{"description":"Frozen envelope: {status, schema_version: \"1.0\", coverage, recommended, alternatives, limits, billing}. status: ok | no_match | no_inventory. billing.rail is \"bearer\" or \"x402\" — the two rails settle differently: Bearer defers its ledger debit until AFTER scoring (no_match is never charged); x402 settles on successful payment verification BEFORE scoring (a no_match result is still billable:true on x402 — real USDC already moved on-chain, with no refund path). On ok: recommended + alternatives, each with observed_at, freshness_seconds, source (live_api|fixture), availability_status (provider-reported, nullable), classification (\"provider_reported\"). limits is always {not_reserved: true, not_provisioned: true, can_provision: false} — this endpoint never executes anything."},"402":{"description":"insufficient credits (recognized Bearer key, zero balance — no x402 fallback attempted in this specific case) OR a real x402 payment challenge (missing/unrecognized Bearer key)"}}}},"/v1/route/quote":{"post":{"summary":"Same underlying rank data, dual-rail auth: Bearer key OR native x402/USDC-on-Base payment. Response uses the older provider_observed/scoutwyze_estimated/metadata schema, not the compute/rank envelope.","responses":{"200":{"description":"provider_observed (raw provider facts) / scoutwyze_estimated (computed cost + risk) / metadata (ttl, confidence, request_id) — CLAUDE.md's original provenance-split schema."},"402":{"description":"Payment Required — no valid Bearer key and no valid X-PAYMENT header. Body includes a real x402 challenge: nonce, payTo, maxAmountRequired (USDC), expiresAt."}}}}}}