{"openapi":"3.1.0","info":{"title":"SwarmDo GPU API","version":"1","description":"One API key for GPUs, language models and video generation: serverless endpoints with OpenAI-compatible URLs, hosted video and LLM APIs billed per clip or per million tokens, on-demand GPUs by the second, and Assay — on one prepaid balance. Every call is authenticated with a swdo_ bearer key created in the dashboard under Keys.","termsOfService":"https://gpu.swarmdo.com/terms","contact":{"email":"support@swarmdo.com","url":"https://gpu.swarmdo.com/docs"}},"servers":[{"url":"https://gpu.swarmdo.com"}],"externalDocs":{"url":"https://gpu.swarmdo.com/docs","description":"Human-readable reference with examples"},"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An API key (swdo_…) from the dashboard under Keys"}},"schemas":{"Error":{"type":"object","required":["error","code"],"properties":{"error":{"type":"string","description":"Human-readable message"},"code":{"type":"string","description":"Stable machine-readable code","enum":["invalid_request","unauthorized","insufficient_credit","not_found","spend_cap","unpriceable","rate_limited","upstream_error","upstream_rate_limited","upstream_ambiguous","invalid_signature","internal_error"]},"requestId":{"type":"string","description":"Also sent as the x-swarmdo-request-id header on every response"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}}}},"retryAfterMs":{"type":"integer"}}}}},"tags":[{"name":"Public"},{"name":"Account"},{"name":"GPU rentals"},{"name":"Serverless"},{"name":"Hosted models"},{"name":"Billing"},{"name":"Storage"},{"name":"Assay"},{"name":"Agents"}],"paths":{"/api/health":{"get":{"operationId":"health","summary":"Liveness probe.","tags":["Public"],"security":[],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/status.json":{"get":{"operationId":"status","summary":"Live component status: API, database, hosted models, serverless, MCP, payments, mail, sign-ups.","tags":["Public"],"security":[],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/offers":{"get":{"operationId":"listGpuOffers","summary":"GPU rental catalog with retail $/hr; provider never disclosed.","tags":["Public"],"security":[],"parameters":[{"name":"sort","in":"query","required":false,"description":"price | perf | reliability","schema":{"type":"string"}},{"name":"gpuClass","in":"query","required":false,"description":"e.g. H100, A100, L40S, RTX4090","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/serverless/offers":{"get":{"operationId":"listServerlessOffers","summary":"Serverless GPU classes and regions with $/GPU-second and $/request.","tags":["Public"],"security":[],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/managed/models":{"get":{"operationId":"listManagedModels","summary":"Hosted models with price per unit, clip lengths sold and pricing tiers.","tags":["Public"],"security":[],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/sla/tiers":{"get":{"operationId":"listSlaTiers","summary":"Uptime tiers, targets and monthly fees.","tags":["Public"],"security":[],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/billing/config":{"get":{"operationId":"billingConfig","summary":"Whether card top-ups are enabled, currency, minimum and maximum top-up.","tags":["Public"],"security":[],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/auth/me":{"get":{"operationId":"whoami","summary":"The account behind the key.","tags":["Account"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/keys":{"get":{"operationId":"listApiKeys","summary":"API keys (prefix, name, last used, revoked).","tags":["Account"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createApiKey","summary":"Create an API key; the secret is returned once.","tags":["Account"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Label for the key"}},"required":["name"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/keys/{id}":{"delete":{"operationId":"revokeApiKey","summary":"Revoke a key.","tags":["Account"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/notifications":{"get":{"operationId":"listNotifications","summary":"In-app notifications, newest first, with the unread count.","tags":["Account"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/audit":{"get":{"operationId":"auditLog","summary":"Every provision, call and charge on the account.","tags":["Account"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/referrals":{"get":{"operationId":"referrals","summary":"Accounts that signed up through your referral link (/?ref=<your id>).","tags":["Account"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rentals":{"get":{"operationId":"listRentals","summary":"GPU rentals with masked ssh/jupyter endpoints.","tags":["GPU rentals"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"rentGpu","summary":"Rent an offer from /api/offers; a credit hold covers the spend cap.","tags":["GPU rentals"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sku":{"type":"string","description":"Offer id from /api/offers"},"maxSpendCents":{"type":"integer","description":"Hard spend cap; the instance is terminated when reached"}},"required":["sku"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rentals/{id}":{"get":{"operationId":"getRental","summary":"Rental status and endpoints.","tags":["GPU rentals"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rentals/{id}/terminate":{"post":{"operationId":"terminateRental","summary":"Stop billing and release the machine.","tags":["GPU rentals"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/rentals/{id}/invoice":{"get":{"operationId":"rentalInvoice","summary":"Per-second invoice for a finished rental.","tags":["GPU rentals"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/serverless/endpoints":{"get":{"operationId":"listEndpoints","summary":"Autoscaling GPU endpoints with invoke URLs.","tags":["Serverless"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"deployEndpoint","summary":"Deploy an image to an autoscaling endpoint; billed per GPU-second while a request runs.","tags":["Serverless"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Display name"},"image":{"type":"string","description":"Container image"},"gpuClass":{"type":"string","description":"e.g. H100"},"region":{"type":"string","description":"e.g. us-east"},"minWorkers":{"type":"integer","description":"0 scales to zero"},"maxWorkers":{"type":"integer","description":"Upper bound"},"keepWarm":{"type":"boolean","description":"Keep one worker warm at warm-time cost"},"env":{"type":"object","additionalProperties":{"type":"string"}}},"required":["name","image","gpuClass"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/serverless/endpoints/{id}":{"get":{"operationId":"getEndpoint","summary":"Endpoint detail.","tags":["Serverless"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"operationId":"deleteEndpoint","summary":"Remove an endpoint.","tags":["Serverless"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/serverless/endpoints/{id}/status":{"get":{"operationId":"endpointStatus","summary":"Diagnostics: workers, queue, last error.","tags":["Serverless"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/serverless/endpoints/{id}/logs":{"get":{"operationId":"endpointLogs","summary":"Recent masked log lines, newest first.","tags":["Serverless"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Lines to return","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/serverless/endpoints/{id}/scale":{"post":{"operationId":"scaleEndpoint","summary":"Change min/max workers.","tags":["Serverless"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"minWorkers":{"type":"integer","description":"New minimum"},"maxWorkers":{"type":"integer","description":"New maximum"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/serverless/endpoints/{id}/suspend":{"post":{"operationId":"suspendEndpoint","summary":"Scale to zero and release the hold.","tags":["Serverless"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/serverless/endpoints/{id}/resume":{"post":{"operationId":"resumeEndpoint","summary":"Resume a suspended endpoint.","tags":["Serverless"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/serverless/endpoints/{id}/purge-queue":{"post":{"operationId":"purgeEndpointQueue","summary":"Drop queued jobs.","tags":["Serverless"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/serverless/endpoints/{id}/restart":{"post":{"operationId":"restartEndpoint","summary":"Scale to zero and back.","tags":["Serverless"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/models":{"get":{"operationId":"listCatalogModels","summary":"Deployable catalog models (one-click endpoints).","tags":["Serverless"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/models/{id}/deploy":{"post":{"operationId":"deployCatalogModel","summary":"Deploy a catalog model to an endpoint with an OpenAI-compatible URL.","tags":["Serverless"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/managed/{id}/{path}":{"post":{"operationId":"invokeManagedModel","summary":"Call a hosted model: {path} is runsync, run, or openai/v1/chat/completions. The charge is returned in x-swarmdo-charged-cents.","tags":["Hosted models"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"path","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The model's own request body, e.g. {\"input\":{\"prompt\":\"…\",\"duration\":5}}"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/managed/{id}/schema":{"get":{"operationId":"managedModelSchema","summary":"JSON Schema for what a hosted-model request may say, plus the output retention.","tags":["Hosted models"],"security":[],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/managed/{id}/quote":{"post":{"operationId":"quoteManagedModel","summary":"What a hosted-model request would cost, with nothing spent; the same validation the real call applies.","tags":["Hosted models"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"The request body you would send to runsync"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/managed/{id}/status/{jobId}":{"get":{"operationId":"managedJobStatus","summary":"Poll a job that outlived its call; the bill settles against what was generated.","tags":["Hosted models"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"jobId","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/billing/summary":{"get":{"operationId":"billingSummary","summary":"Balance, burn rate, runway, live resource counts.","tags":["Billing"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/billing/transactions":{"get":{"operationId":"billingTransactions","summary":"Ledger entries, newest first.","tags":["Billing"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/billing/daily":{"get":{"operationId":"billingDaily","summary":"Charges per day.","tags":["Billing"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/billing/explorer":{"get":{"operationId":"billingExplorer","summary":"Spend by period and product.","tags":["Billing"],"parameters":[{"name":"granularity","in":"query","required":false,"description":"daily | weekly | monthly","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/billing/topup":{"post":{"operationId":"createTopup","summary":"Start a card top-up (hosted checkout URL is returned). saveCard keeps the card for automatic top-ups.","tags":["Billing"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amountCents":{"type":"integer","description":"Between the configured minimum and maximum"},"saveCard":{"type":"boolean","description":"Keep the card on file"}},"required":["amountCents"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/billing/auto-topup":{"get":{"operationId":"getAutoTopup","summary":"The automatic top-up rule and the card on file.","tags":["Billing"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"setAutoTopup","summary":"When the balance drops below thresholdCents, charge amountCents to the card on file.","tags":["Billing"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean","description":"Switch"},"thresholdCents":{"type":"integer","description":"Balance that triggers a charge"},"amountCents":{"type":"integer","description":"Amount charged"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/billing/budget":{"get":{"operationId":"getBudget","summary":"Month-to-date spend, forecast and the soft budget.","tags":["Billing"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"put":{"operationId":"setBudget","summary":"Set (or clear with 0) the soft monthly budget.","tags":["Billing"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"monthlyBudgetCents":{"type":"integer","description":"0 clears"}},"required":["monthlyBudgetCents"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/storage/offers":{"get":{"operationId":"listStorageOffers","summary":"Storage tiers and $/GB-month.","tags":["Storage"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/storage/volumes":{"get":{"operationId":"listVolumes","summary":"Persistent volumes.","tags":["Storage"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"post":{"operationId":"createVolume","summary":"Create a volume, billed per GB-month.","tags":["Storage"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sizeGb":{"type":"integer","description":"Size"},"tier":{"type":"string","description":"standard | nvme"},"region":{"type":"string","description":"Region"}},"required":["sizeGb","tier","region"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/storage/volumes/{id}":{"delete":{"operationId":"deleteVolume","summary":"Delete a volume.","tags":["Storage"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/sla":{"get":{"operationId":"slaStatus","summary":"Your tier, measured uptime, incidents and credits.","tags":["Account"],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/assay/meter":{"post":{"operationId":"assayMeter","summary":"Self-metering for the local Assay launcher: charge the calling account per verified request; 402 when credit is at or below zero.","tags":["Assay"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cents":{"type":"integer","description":"1..1000000"},"ref":{"type":"string","description":"assay_<opaque id>; idempotent"},"description":{"type":"string","description":"Optional"}},"required":["cents","ref"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/mcp":{"post":{"operationId":"mcp","summary":"Hosted MCP (Streamable HTTP): POST a JSON-RPC message or batch with the bearer key; the same tools as @swarmdo/gpu-mcp.","tags":["Agents"],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"A JSON-RPC 2.0 request, notification, or batch"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request; details lists every failing field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"Insufficient credit; nothing was spent","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}