{ "openapi": "3.1.0", "info": { "title": "Xcelsior", "description": "Distributed GPU marketplace for AI/ML workloads. Rent capacity from independent hosts worldwide, or supply your own. Spot and on-demand pricing, automated trust scoring, Stripe Connect marketplace billing, and real-time GPU telemetry.\n\n**Authentication**: Bearer token via `Authorization: Bearer ` header.\n\n**Regions**: global. Capacity is selected on price, availability, GPU model, and host reputation — not on geography. Filter by region when your workload needs low latency to a specific place; otherwise the whole marketplace is available to you.\n\n**SDK**: Generate idiomatic Python/TypeScript SDKs with [Fern](https://buildwithfern.com).\n\n**LLM Integration**: See `/llms.txt` for AI agent–optimized documentation.\n\nThis published OpenAPI document contains the public developer surface only. Account settings, internal worker, admin, maintenance, and callback endpoints are intentionally omitted.", "contact": { "name": "Xcelsior", "url": "https://xcelsior.ca/", "email": "admin@xcelsior.ca" }, "license": { "name": "MIT", "url": "https://opensource.org/licenses/MIT" }, "version": "2.3.0" }, "servers": [ { "url": "https://xcelsior.ca", "description": "Production" }, { "url": "http://localhost:9500", "description": "Development" } ], "paths": { "/api/artifacts/upload": { "post": { "tags": [ "Artifacts" ], "summary": "Request Upload", "description": "Get a presigned upload URL for an artifact.", "operationId": "api_request_upload_api_artifacts_upload_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UploadRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/artifacts/download": { "post": { "tags": [ "Artifacts" ], "summary": "Request Download", "description": "Get a presigned download URL for an artifact.", "operationId": "api_request_download_api_artifacts_download_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DownloadRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/artifacts/{job_id}": { "get": { "tags": [ "Artifacts" ], "summary": "List Artifacts", "description": "List all artifacts for a job.", "operationId": "api_list_artifacts_api_artifacts__job_id__get", "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/artifacts/{job_id}/expiry": { "get": { "tags": [ "Artifacts" ], "summary": "Expiry", "description": "Get expiry/cleanup dates for artifacts of a given job.\n\nReturns each artifact with its created_at and estimated expiry date\nbased on the configured retention policy.", "operationId": "api_artifact_expiry_api_artifacts__job_id__expiry_get", "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/.well-known/oauth-authorization-server": { "get": { "tags": [ "Auth" ], "summary": "OAuth Authorization Server Metadata", "operationId": "oauth_authorization_server_metadata__well_known_oauth_authorization_server_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [] } }, "/oauth/authorize": { "get": { "tags": [ "Auth" ], "summary": "OAuth Authorize", "operationId": "oauth_authorize_oauth_authorize_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [] } }, "/oauth/token": { "post": { "tags": [ "Auth" ], "summary": "OAuth Token", "operationId": "oauth_token_oauth_token_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [] } }, "/oauth/device/authorize": { "post": { "tags": [ "Auth" ], "summary": "OAuth Device Authorize", "operationId": "oauth_device_authorize_oauth_device_authorize_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } }, "security": [] } }, "/api/auth/register": { "post": { "tags": [ "Auth" ], "summary": "Register", "description": "Register a new user with email and password.\n\nCreates an account and sends a verification email. The user must verify\ntheir email before they can log in.", "operationId": "api_auth_register_api_auth_register_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RegisterRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [] } }, "/api/auth/login": { "post": { "tags": [ "Auth" ], "summary": "Login", "description": "Authenticate with email and password.\n\nReturns a Bearer token valid for 30 days.\nIf MFA is enabled, returns mfa_required=True with a challenge_id instead.", "operationId": "api_auth_login_api_auth_login_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LoginRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } }, "security": [] } }, "/api/auth/me": { "get": { "tags": [ "Auth" ], "summary": "Me", "description": "Get the currently authenticated user's profile.\n\nReturns ``user: null`` when no session is present (HTTP 200) so public\nmarketing pages can probe session state without console 401 noise.\nInvalid or machine credentials still return 401/403.", "operationId": "api_auth_me_api_auth_me_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/auth/logout": { "post": { "tags": [ "Auth" ], "summary": "Logout", "description": "Logout — invalidate session and clear cookie.", "operationId": "api_auth_logout_api_auth_logout_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/billing/wallet/{customer_id}": { "get": { "tags": [ "Billing" ], "summary": "Get Wallet", "description": "Get credit wallet balance and status.", "operationId": "api_get_wallet_api_billing_wallet__customer_id__get", "parameters": [ { "name": "customer_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Customer Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/billing/payment-intent": { "post": { "tags": [ "Billing" ], "summary": "Create Payment Intent", "description": "Create a Stripe PaymentIntent for depositing compute credits.\n\n``amount_cad`` is pretax wallet credit. Stripe Tax uses the **account**\ncountry/province (settings/profile) — no deposit province picker. IP is a\nfallback when the account has no location. Wallet is credited pretax only.", "operationId": "api_create_payment_intent_api_billing_payment_intent_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PaymentIntentRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/billing/paypal/enabled": { "get": { "tags": [ "Billing" ], "summary": "PayPal Enabled", "description": "Check whether PayPal is configured.", "operationId": "api_paypal_enabled_api_billing_paypal_enabled_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/billing/paypal/create-order": { "post": { "tags": [ "Billing" ], "summary": "PayPal Create Order", "description": "Create a PayPal order for depositing compute credits.", "operationId": "api_paypal_create_order_api_billing_paypal_create_order_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PayPalCreateOrderRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/billing/paypal/capture-order": { "post": { "tags": [ "Billing" ], "summary": "PayPal Capture Order", "description": "Capture a PayPal order and credit the wallet.", "operationId": "api_paypal_capture_order_api_billing_paypal_capture_order_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PayPalCaptureRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/billing/wallet/{customer_id}/deposit": { "post": { "tags": [ "Billing" ], "summary": "Deposit", "description": "Deposit credits into a customer wallet.\n\nProduction deposits must flow through Stripe webhooks, PayPal capture, or\ncrypto/Lightning — not this direct credit endpoint.", "operationId": "api_deposit_api_billing_wallet__customer_id__deposit_post", "parameters": [ { "name": "customer_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Customer Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DepositRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/billing/wallet/{customer_id}/history": { "get": { "tags": [ "Billing" ], "summary": "Wallet History", "description": "Get transaction history for a wallet.", "operationId": "api_wallet_history_api_billing_wallet__customer_id__history_get", "parameters": [ { "name": "customer_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Customer Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 50, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/billing/wallet/{customer_id}/depletion": { "get": { "tags": [ "Billing" ], "summary": "Wallet Depletion", "description": "Get real-time balance depletion projection.\n\nReturns burn rate, seconds-to-zero, per-instance cost breakdown,\nand alert thresholds (T-30min, T-5min, T-0).", "operationId": "api_wallet_depletion_api_billing_wallet__customer_id__depletion_get", "parameters": [ { "name": "customer_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Customer Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/billing/usage/{customer_id}": { "get": { "tags": [ "Billing" ], "summary": "Usage Summary", "description": "Get usage summary for a customer.", "operationId": "api_usage_summary_api_billing_usage__customer_id__get", "parameters": [ { "name": "customer_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Customer Id" } }, { "name": "period_start", "in": "query", "required": false, "schema": { "type": "number", "default": 0, "title": "Period Start" } }, { "name": "period_end", "in": "query", "required": false, "schema": { "type": "number", "default": 0, "title": "Period End" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/billing/invoice/{customer_id}": { "get": { "tags": [ "Billing" ], "summary": "Generate Invoice", "description": "Generate an invoice for a billing period, itemised by job.", "operationId": "api_generate_invoice_api_billing_invoice__customer_id__get", "parameters": [ { "name": "customer_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Customer Id" } }, { "name": "customer_name", "in": "query", "required": false, "schema": { "type": "string", "default": "", "title": "Customer Name" } }, { "name": "period_start", "in": "query", "required": false, "schema": { "type": "number", "default": 0, "title": "Period Start" } }, { "name": "period_end", "in": "query", "required": false, "schema": { "type": "number", "default": 0, "title": "Period End" } }, { "name": "tax_rate", "in": "query", "required": false, "schema": { "type": "number", "default": 0.13, "title": "Tax Rate" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/billing/invoices/{customer_id}": { "get": { "tags": [ "Billing" ], "summary": "List Invoices", "description": "List past invoices for a customer (monthly summaries).\n\nGenerates monthly invoice stubs for the last N months showing\ntotal spend, tax, job count, and top GPUs used.", "operationId": "api_list_invoices_api_billing_invoices__customer_id__get", "parameters": [ { "name": "customer_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Customer Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 12, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/billing/invoice/{customer_id}/download": { "get": { "tags": [ "Billing" ], "summary": "Download Invoice", "description": "Download an invoice as CSV or plain-text PDF-style document.\n\nFormats: csv (spreadsheet-ready), txt (printable receipt).", "operationId": "api_download_invoice_api_billing_invoice__customer_id__download_get", "parameters": [ { "name": "customer_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Customer Id" } }, { "name": "format", "in": "query", "required": false, "schema": { "type": "string", "default": "csv", "title": "Format" } }, { "name": "period_start", "in": "query", "required": false, "schema": { "type": "number", "default": 0, "title": "Period Start" } }, { "name": "period_end", "in": "query", "required": false, "schema": { "type": "number", "default": 0, "title": "Period End" } }, { "name": "tax_rate", "in": "query", "required": false, "schema": { "type": "number", "default": 0.13, "title": "Tax Rate" } }, { "name": "customer_name", "in": "query", "required": false, "schema": { "type": "string", "default": "", "title": "Customer Name" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/pricing/estimate": { "post": { "tags": [ "Billing" ], "summary": "Estimate Cost", "description": "Estimate what a job will cost, in CAD, before launching it.", "operationId": "api_estimate_cost_api_pricing_estimate_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EstimateRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/pricing/reference": { "get": { "tags": [ "Billing" ], "summary": "Reference Pricing", "description": "Get reference GPU pricing table in CAD from live ``gpu_pricing``.", "operationId": "api_reference_pricing_api_pricing_reference_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v2/billing/auto-topup": { "get": { "tags": [ "Billing" ], "summary": "Get Topup", "description": "Get current auto-top-up configuration.", "operationId": "api_billing_get_topup_api_v2_billing_auto_topup_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } }, "post": { "tags": [ "Billing" ], "summary": "Configure Topup", "description": "Configure wallet auto-top-up via Stripe.", "operationId": "api_billing_configure_topup_api_v2_billing_auto_topup_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AutoTopupConfig" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/inference": { "post": { "tags": [ "Inference" ], "summary": "Submit", "description": "Submit a serverless inference request.\n\nSchedules a short-lived GPU job that runs the specified model on the\nprovided inputs. Returns a job_id to poll for results.", "operationId": "api_inference_submit_api_inference_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InferenceRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/inference/{job_id}": { "get": { "tags": [ "Inference" ], "summary": "Result", "description": "Get inference results for a submitted request.", "operationId": "api_inference_result_api_inference__job_id__get", "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/inference/models/available": { "get": { "tags": [ "Inference" ], "summary": "Models", "description": "List available inference models and their resource requirements.", "operationId": "api_inference_models_api_inference_models_available_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/v1/inference": { "post": { "tags": [ "Inference v2" ], "summary": "Sync", "description": "Synchronous inference endpoint (OpenAI-compatible path).\n\nSubmits an inference request and polls for results up to 30 seconds.\nIf stream=true, returns SSE text/event-stream with token deltas.", "operationId": "api_v1_inference_sync_v1_inference_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/V1InferenceRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/inference/async": { "post": { "tags": [ "Inference v2" ], "summary": "Async", "description": "Asynchronous inference — returns job_id immediately for polling.", "operationId": "api_v1_inference_async_v1_inference_async_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/V1InferenceRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/inference/{job_id}": { "get": { "tags": [ "Inference v2" ], "summary": "Poll", "description": "Poll for inference results by job_id.", "operationId": "api_v1_inference_poll_v1_inference__job_id__get", "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/serverless/enabled": { "get": { "tags": [ "Serverless" ], "summary": "Enabled", "description": "Feature-flag probe for dashboard rollout (session optional).", "operationId": "api_serverless_enabled_api_v2_serverless_enabled_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v2/serverless/endpoints": { "get": { "tags": [ "Serverless" ], "summary": "List Endpoints", "operationId": "api_serverless_list_endpoints_api_v2_serverless_endpoints_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } }, "post": { "tags": [ "Serverless" ], "summary": "Create Endpoint", "operationId": "api_serverless_create_endpoint_api_v2_serverless_endpoints_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServerlessEndpointCreate" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/serverless/endpoints/{endpoint_id}": { "get": { "tags": [ "Serverless" ], "summary": "Get Endpoint", "operationId": "api_serverless_get_endpoint_api_v2_serverless_endpoints__endpoint_id__get", "parameters": [ { "name": "endpoint_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Endpoint Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "Serverless" ], "summary": "Patch Endpoint", "operationId": "api_serverless_patch_endpoint_api_v2_serverless_endpoints__endpoint_id__patch", "parameters": [ { "name": "endpoint_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Endpoint Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServerlessEndpointPatch" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Serverless" ], "summary": "Delete Endpoint", "operationId": "api_serverless_delete_endpoint_api_v2_serverless_endpoints__endpoint_id__delete", "parameters": [ { "name": "endpoint_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Endpoint Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/serverless/endpoints/{endpoint_id}/health": { "get": { "tags": [ "Serverless" ], "summary": "Endpoint Health", "operationId": "api_serverless_endpoint_health_api_v2_serverless_endpoints__endpoint_id__health_get", "parameters": [ { "name": "endpoint_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Endpoint Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/serverless/endpoints/{endpoint_id}/usage": { "get": { "tags": [ "Serverless" ], "summary": "Endpoint Usage", "description": "Alias for metrics — dashboard compatibility.", "operationId": "api_serverless_endpoint_usage_api_v2_serverless_endpoints__endpoint_id__usage_get", "parameters": [ { "name": "endpoint_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Endpoint Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/serverless/endpoints/{endpoint_id}/keys": { "post": { "tags": [ "Serverless" ], "summary": "Create Key", "operationId": "api_serverless_create_key_api_v2_serverless_endpoints__endpoint_id__keys_post", "parameters": [ { "name": "endpoint_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Endpoint Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiKeyCreateRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "get": { "tags": [ "Serverless" ], "summary": "List Keys", "operationId": "api_serverless_list_keys_api_v2_serverless_endpoints__endpoint_id__keys_get", "parameters": [ { "name": "endpoint_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Endpoint Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/serverless/endpoints/{endpoint_id}/keys/{key_id}": { "delete": { "tags": [ "Serverless" ], "summary": "Revoke Key", "operationId": "api_serverless_revoke_key_api_v2_serverless_endpoints__endpoint_id__keys__key_id__delete", "parameters": [ { "name": "endpoint_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Endpoint Id" } }, { "name": "key_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Key Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/serverless/{endpoint_id}/run": { "post": { "tags": [ "Serverless" ], "summary": "Run", "operationId": "api_serverless_run_v1_serverless__endpoint_id__run_post", "parameters": [ { "name": "endpoint_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Endpoint Id" } }, { "name": "endpoint_slug", "in": "query", "required": false, "schema": { "type": "string", "default": "", "title": "Endpoint Slug" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RunJobRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/serverless/{endpoint_id}/runsync": { "post": { "tags": [ "Serverless" ], "summary": "Runsync", "operationId": "api_serverless_runsync_v1_serverless__endpoint_id__runsync_post", "parameters": [ { "name": "endpoint_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Endpoint Id" } }, { "name": "endpoint_slug", "in": "query", "required": false, "schema": { "type": "string", "default": "", "title": "Endpoint Slug" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RunJobRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/serverless/{endpoint_id}/status/{job_id}": { "get": { "tags": [ "Serverless" ], "summary": "Job Status", "operationId": "api_serverless_job_status_v1_serverless__endpoint_id__status__job_id__get", "parameters": [ { "name": "endpoint_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Endpoint Id" } }, { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } }, { "name": "endpoint_slug", "in": "query", "required": false, "schema": { "type": "string", "default": "", "title": "Endpoint Slug" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/serverless/{endpoint_id}/stream/{job_id}": { "get": { "tags": [ "Serverless" ], "summary": "Job Stream", "operationId": "api_serverless_job_stream_v1_serverless__endpoint_id__stream__job_id__get", "parameters": [ { "name": "endpoint_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Endpoint Id" } }, { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } }, { "name": "endpoint_slug", "in": "query", "required": false, "schema": { "type": "string", "default": "", "title": "Endpoint Slug" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/serverless/{endpoint_id}/cancel/{job_id}": { "post": { "tags": [ "Serverless" ], "summary": "Cancel Job", "operationId": "api_serverless_cancel_job_v1_serverless__endpoint_id__cancel__job_id__post", "parameters": [ { "name": "endpoint_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Endpoint Id" } }, { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } }, { "name": "endpoint_slug", "in": "query", "required": false, "schema": { "type": "string", "default": "", "title": "Endpoint Slug" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/serverless/{endpoint_id}/openai/v1/chat/completions": { "post": { "tags": [ "Serverless" ], "summary": "Openai Chat", "operationId": "api_serverless_openai_chat_v1_serverless__endpoint_id__openai_v1_chat_completions_post", "parameters": [ { "name": "endpoint_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Endpoint Id" } }, { "name": "endpoint_slug", "in": "query", "required": false, "schema": { "type": "string", "default": "", "title": "Endpoint Slug" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatCompletionRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/serverless/{endpoint_id}/openai/v1/models": { "get": { "tags": [ "Serverless" ], "summary": "Openai Models", "operationId": "api_serverless_openai_models_v1_serverless__endpoint_id__openai_v1_models_get", "parameters": [ { "name": "endpoint_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Endpoint Id" } }, { "name": "endpoint_slug", "in": "query", "required": false, "schema": { "type": "string", "default": "", "title": "Endpoint Slug" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/inference/endpoints": { "get": { "tags": [ "Serverless (compat)" ], "summary": "List Endpoints", "operationId": "api_inference_compat_list_endpoints_api_v2_inference_endpoints_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } }, "post": { "tags": [ "Serverless (compat)" ], "summary": "Create Endpoint", "operationId": "api_inference_compat_create_endpoint_api_v2_inference_endpoints_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ServerlessEndpointCreate" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/inference/endpoints/{endpoint_id}": { "get": { "tags": [ "Serverless (compat)" ], "summary": "Get Endpoint", "operationId": "api_inference_compat_get_endpoint_api_v2_inference_endpoints__endpoint_id__get", "parameters": [ { "name": "endpoint_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Endpoint Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Serverless (compat)" ], "summary": "Delete Endpoint", "operationId": "api_inference_compat_delete_endpoint_api_v2_inference_endpoints__endpoint_id__delete", "parameters": [ { "name": "endpoint_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Endpoint Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/inference/endpoints/{endpoint_id}/health": { "get": { "tags": [ "Serverless (compat)" ], "summary": "Endpoint Health", "operationId": "api_inference_compat_endpoint_health_api_v2_inference_endpoints__endpoint_id__health_get", "parameters": [ { "name": "endpoint_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Endpoint Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/inference/endpoints/{endpoint_id}/usage": { "get": { "tags": [ "Serverless (compat)" ], "summary": "Endpoint Usage", "operationId": "api_inference_compat_endpoint_usage_api_v2_inference_endpoints__endpoint_id__usage_get", "parameters": [ { "name": "endpoint_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Endpoint Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/instance": { "post": { "tags": [ "Instances" ], "summary": "Submit Instance", "description": "Submit a job to the queue or directly assign to a host.\n\nIf host_id is provided (marketplace launch), the job is assigned directly\nto that host and container start is attempted immediately — unless the\ntransactional scheduler owns the job (canary/active partition), in which\ncase the pin is recorded and placement/start stay with the claim→reserve\npath. Otherwise the job is queued and process_queue runs to find a host.", "operationId": "api_submit_instance_instance_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JobIn" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/instances": { "get": { "tags": [ "Instances" ], "summary": "List Instances", "description": "List instances for the authenticated user (admins see all).", "operationId": "api_list_instances_instances_get", "parameters": [ { "name": "status", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Status" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/instance/{job_id}": { "get": { "tags": [ "Instances" ], "summary": "Get Instance", "description": "Get a specific instance by ID, enriched with connection info.", "operationId": "api_get_instance_instance__job_id__get", "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/instances/{job_id}/cancel": { "post": { "tags": [ "Instances" ], "summary": "Cancel Instance", "description": "Cancel a running or queued instance. For interactive instances, stops the container.", "operationId": "api_cancel_instance_instances__job_id__cancel_post", "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/instances/{job_id}/logs": { "get": { "tags": [ "Instances" ], "summary": "Logs", "description": "Get buffered log lines for a job (non-streaming).\n\nReturns the last `limit` log lines. Tries in-memory buffer first,\nfalls back to persistent job_logs table in PG.\nFor real-time streaming, use `/jobs/{job_id}/logs/stream` (SSE).", "operationId": "api_instance_logs_instances__job_id__logs_get", "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 100, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/tiers": { "get": { "tags": [ "Instances" ], "summary": "List Tiers", "description": "List all priority tiers with their multipliers.", "operationId": "api_list_tiers_tiers_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/marketplace/search": { "get": { "tags": [ "Marketplace" ], "summary": "Search", "description": "Search marketplace listings with filters and sorting.", "operationId": "api_marketplace_search_marketplace_search_get", "parameters": [ { "name": "gpu_model", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Gpu Model" } }, { "name": "min_vram", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Min Vram" } }, { "name": "max_price", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Max Price" } }, { "name": "province", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Province" } }, { "name": "country", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Country" } }, { "name": "min_reputation", "in": "query", "required": false, "schema": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Min Reputation" } }, { "name": "sort_by", "in": "query", "required": false, "schema": { "type": "string", "default": "price", "title": "Sort By" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 50, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/marketplace": { "get": { "tags": [ "Marketplace" ], "summary": "Get Marketplace", "description": "Browse marketplace listings.", "operationId": "api_get_marketplace_marketplace_get", "parameters": [ { "name": "active_only", "in": "query", "required": false, "schema": { "type": "boolean", "default": true, "title": "Active Only" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/marketplace/stats": { "get": { "tags": [ "Marketplace" ], "summary": "Stats", "description": "Marketplace aggregate stats (platform admin only).", "operationId": "api_marketplace_stats_marketplace_stats_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v2/marketplace/search": { "post": { "tags": [ "Marketplace v2" ], "summary": "Search", "description": "Search available GPU offers with filters.", "operationId": "api_marketplace_search_api_v2_marketplace_search_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MarketplaceSearchParams" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/marketplace/spot-prices": { "get": { "tags": [ "Marketplace v2" ], "summary": "Spot Prices", "description": "Get current spot prices for all GPU models.", "operationId": "api_marketplace_spot_prices_api_v2_marketplace_spot_prices_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v2/marketplace/spot-prices/{gpu_model}/history": { "get": { "tags": [ "Marketplace v2" ], "summary": "Spot History", "description": "Get spot price history for a GPU model.", "operationId": "api_marketplace_spot_history_api_v2_marketplace_spot_prices__gpu_model__history_get", "parameters": [ { "name": "gpu_model", "in": "path", "required": true, "schema": { "type": "string", "title": "Gpu Model" } }, { "name": "hours", "in": "query", "required": false, "schema": { "type": "integer", "default": 24, "title": "Hours" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/marketplace/stats": { "get": { "tags": [ "Marketplace v2" ], "summary": "Stats V2", "description": "Get marketplace aggregate statistics.", "operationId": "api_marketplace_stats_v2_api_v2_marketplace_stats_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v2/marketplace/reservations": { "post": { "tags": [ "Marketplace v2" ], "summary": "Create Reservation", "description": "Create a reserved instance commitment.", "operationId": "api_marketplace_create_reservation_api_v2_marketplace_reservations_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ReservationCreate" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/marketplace/reservations/{reservation_id}": { "delete": { "tags": [ "Marketplace v2" ], "summary": "Cancel Reservation", "description": "Cancel a reserved instance commitment early.\n\nComputes early termination fee: remaining_months * monthly_rate * 50%.", "operationId": "api_marketplace_cancel_reservation_api_v2_marketplace_reservations__reservation_id__delete", "parameters": [ { "name": "reservation_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Reservation Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/volumes": { "get": { "tags": [ "Volumes" ], "summary": "List", "description": "List volumes owned by the current user.", "operationId": "api_volume_list_api_v2_volumes_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } }, "post": { "tags": [ "Volumes" ], "summary": "Create", "description": "Create a new persistent volume. Billed in real-time from credits.", "operationId": "api_volume_create_api_v2_volumes_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VolumeCreate" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/volumes/{volume_id}": { "get": { "tags": [ "Volumes" ], "summary": "Get", "description": "Get volume details.", "operationId": "api_volume_get_api_v2_volumes__volume_id__get", "parameters": [ { "name": "volume_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Volume Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Volumes" ], "summary": "Delete", "description": "Delete a volume. Must not have active attachments.", "operationId": "api_volume_delete_api_v2_volumes__volume_id__delete", "parameters": [ { "name": "volume_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Volume Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/volumes/{volume_id}/attach": { "post": { "tags": [ "Volumes" ], "summary": "Attach", "description": "Attach a volume to a running instance.", "operationId": "api_volume_attach_api_v2_volumes__volume_id__attach_post", "parameters": [ { "name": "volume_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Volume Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VolumeAttachRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/volumes/{volume_id}/detach": { "post": { "tags": [ "Volumes" ], "summary": "Detach", "description": "Detach a volume from its current instance.", "operationId": "api_volume_detach_api_v2_volumes__volume_id__detach_post", "parameters": [ { "name": "volume_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Volume Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } } }, "components": { "schemas": { "ApiKeyCreateRequest": { "properties": { "name": { "type": "string", "title": "Name", "default": "default" }, "scopes": { "type": "string", "title": "Scopes", "default": "inference:write" }, "rate_limit_rpm": { "type": "integer", "maximum": 10000.0, "minimum": 1.0, "title": "Rate Limit Rpm", "default": 60 } }, "type": "object", "title": "ApiKeyCreateRequest" }, "AutoTopupConfig": { "properties": { "enabled": { "type": "boolean", "title": "Enabled", "default": true }, "amount_cad": { "type": "number", "title": "Amount Cad", "default": 25.0 }, "threshold_cad": { "type": "number", "title": "Threshold Cad", "default": 5.0 }, "stripe_payment_method_id": { "type": "string", "title": "Stripe Payment Method Id", "default": "" } }, "type": "object", "title": "AutoTopupConfig" }, "ChatCompletionRequest": { "properties": { "model": { "type": "string", "title": "Model" }, "messages": { "items": { "additionalProperties": true, "type": "object" }, "type": "array", "title": "Messages" }, "max_tokens": { "type": "integer", "maximum": 32768.0, "minimum": 1.0, "title": "Max Tokens", "default": 512 }, "temperature": { "type": "number", "maximum": 2.0, "minimum": 0.0, "title": "Temperature", "default": 1.0 }, "stream": { "type": "boolean", "title": "Stream", "default": false } }, "type": "object", "required": [ "model" ], "title": "ChatCompletionRequest" }, "DepositRequest": { "properties": { "amount_cad": { "type": "number", "maximum": 10000.0, "exclusiveMinimum": 0.0, "title": "Amount Cad" }, "description": { "type": "string", "maxLength": 500, "title": "Description", "default": "Credit deposit" } }, "type": "object", "required": [ "amount_cad" ], "title": "DepositRequest" }, "DownloadRequest": { "properties": { "job_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Job Id" }, "filename": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Filename" }, "artifact_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Artifact Id" }, "artifact_type": { "type": "string", "title": "Artifact Type", "default": "job_output" } }, "type": "object", "title": "DownloadRequest" }, "EstimateRequest": { "properties": { "gpu_model": { "type": "string", "maxLength": 64, "title": "Gpu Model", "default": "RTX 4090" }, "duration_hours": { "type": "number", "maximum": 8760.0, "minimum": 0.0, "title": "Duration Hours", "default": 1.0 }, "spot": { "type": "boolean", "title": "Spot", "default": false } }, "type": "object", "title": "EstimateRequest" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "InferenceRequest": { "properties": { "model": { "type": "string", "title": "Model", "description": "Model name or HuggingFace repo (e.g. 'distilbert-base-uncased-finetuned-sst-2-english')" }, "inputs": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "string" } ], "title": "Inputs", "description": "Text input(s) for inference" }, "gpu_model": { "type": "string", "title": "Gpu Model", "description": "Preferred GPU model or 'any'", "default": "any" }, "max_tokens": { "type": "integer", "maximum": 8192.0, "minimum": 1.0, "title": "Max Tokens", "default": 512 }, "temperature": { "type": "number", "maximum": 2.0, "minimum": 0.0, "title": "Temperature", "default": 1.0 }, "timeout_sec": { "type": "integer", "maximum": 3600.0, "minimum": 10.0, "title": "Timeout Sec", "default": 300 } }, "type": "object", "required": [ "model", "inputs" ], "title": "InferenceRequest" }, "JobIn": { "properties": { "name": { "type": "string", "maxLength": 128, "minLength": 1, "title": "Name" }, "vram_needed_gb": { "type": "number", "minimum": 0.0, "title": "Vram Needed Gb", "default": 0 }, "priority": { "type": "integer", "maximum": 10.0, "minimum": 0.0, "title": "Priority", "default": 0 }, "tier": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tier" }, "num_gpus": { "type": "integer", "maximum": 64.0, "minimum": 1.0, "title": "Num Gpus", "default": 1 }, "host_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Host Id" }, "gpu_model": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Gpu Model" }, "nfs_server": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Nfs Server" }, "nfs_path": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Nfs Path" }, "nfs_mount_point": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Nfs Mount Point" }, "image": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Image" }, "interactive": { "type": "boolean", "title": "Interactive", "default": true }, "command": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Command" }, "ssh_port": { "type": "integer", "maximum": 65535.0, "minimum": 1.0, "title": "Ssh Port", "default": 22 }, "pricing_mode": { "type": "string", "enum": [ "on_demand", "spot" ], "title": "Pricing Mode", "default": "on_demand" }, "volume_ids": { "anyOf": [ { "items": { "type": "string" }, "type": "array", "maxItems": 16 }, { "type": "null" } ], "title": "Volume Ids" }, "encrypted_workspace": { "type": "boolean", "title": "Encrypted Workspace", "default": false }, "init_script": { "anyOf": [ { "type": "string", "maxLength": 4096 }, { "type": "null" } ], "title": "Init Script" }, "git_repo": { "anyOf": [ { "type": "string", "maxLength": 512 }, { "type": "null" } ], "title": "Git Repo" }, "auto_launch": { "anyOf": [ { "items": { "type": "string" }, "type": "array", "maxItems": 4 }, { "type": "null" } ], "title": "Auto Launch" }, "exposed_ports": { "anyOf": [ { "items": { "type": "integer" }, "type": "array", "maxItems": 8 }, { "type": "null" } ], "title": "Exposed Ports" }, "template_image_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Template Image Id" } }, "type": "object", "required": [ "name" ], "title": "JobIn" }, "LoginRequest": { "properties": { "email": { "type": "string", "maxLength": 128, "minLength": 5, "title": "Email" }, "password": { "type": "string", "maxLength": 128, "minLength": 8, "title": "Password" } }, "type": "object", "required": [ "email", "password" ], "title": "LoginRequest" }, "MarketplaceSearchParams": { "properties": { "gpu_model": { "type": "string", "maxLength": 64, "title": "Gpu Model", "default": "" }, "min_vram_gb": { "type": "number", "maximum": 1024.0, "minimum": 0.0, "title": "Min Vram Gb", "default": 0 }, "max_price_cents": { "type": "integer", "minimum": 0.0, "title": "Max Price Cents", "default": 0 }, "region": { "type": "string", "maxLength": 32, "title": "Region", "default": "" }, "spot_available": { "type": "boolean", "title": "Spot Available", "default": false }, "sort_by": { "type": "string", "pattern": "^(price|reputation|region|vram)$", "title": "Sort By", "default": "price" }, "limit": { "type": "integer", "maximum": 500.0, "minimum": 1.0, "title": "Limit", "default": 50 } }, "type": "object", "title": "MarketplaceSearchParams" }, "PayPalCaptureRequest": { "properties": { "customer_id": { "type": "string", "maxLength": 128, "minLength": 1, "title": "Customer Id" }, "order_id": { "type": "string", "maxLength": 128, "minLength": 1, "title": "Order Id" } }, "type": "object", "required": [ "customer_id", "order_id" ], "title": "PayPalCaptureRequest" }, "PayPalCreateOrderRequest": { "properties": { "customer_id": { "type": "string", "maxLength": 128, "minLength": 1, "title": "Customer Id" }, "amount_cad": { "type": "number", "maximum": 10000.0, "exclusiveMinimum": 0.0, "title": "Amount Cad" } }, "type": "object", "required": [ "customer_id", "amount_cad" ], "title": "PayPalCreateOrderRequest" }, "PaymentIntentRequest": { "properties": { "customer_id": { "type": "string", "maxLength": 128, "minLength": 1, "title": "Customer Id" }, "amount_cad": { "type": "number", "maximum": 10000.0, "exclusiveMinimum": 0.0, "title": "Amount Cad" }, "description": { "type": "string", "maxLength": 500, "title": "Description", "default": "Compute credits" } }, "type": "object", "required": [ "customer_id", "amount_cad" ], "title": "PaymentIntentRequest" }, "RegisterRequest": { "properties": { "email": { "type": "string", "maxLength": 128, "minLength": 5, "title": "Email" }, "password": { "type": "string", "maxLength": 128, "minLength": 8, "title": "Password" }, "name": { "type": "string", "maxLength": 64, "title": "Name", "default": "" }, "role": { "type": "string", "maxLength": 32, "title": "Role", "default": "submitter" } }, "type": "object", "required": [ "email", "password" ], "title": "RegisterRequest" }, "ReservationCreate": { "properties": { "gpu_model": { "type": "string", "title": "Gpu Model" }, "gpu_count": { "type": "integer", "title": "Gpu Count", "default": 1 }, "period_months": { "type": "integer", "title": "Period Months", "default": 1 } }, "type": "object", "required": [ "gpu_model" ], "title": "ReservationCreate" }, "RunJobRequest": { "properties": { "input": { "additionalProperties": true, "type": "object", "title": "Input" }, "webhook": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Webhook" } }, "type": "object", "title": "RunJobRequest" }, "ServerlessEndpointCreate": { "properties": { "name": { "type": "string", "title": "Name", "default": "" }, "mode": { "type": "string", "title": "Mode", "default": "preset" }, "managed_engine": { "type": "string", "title": "Managed Engine", "default": "vllm" }, "model_name": { "type": "string", "title": "Model Name", "default": "" }, "model_ref": { "type": "string", "title": "Model Ref", "default": "" }, "image_ref": { "type": "string", "title": "Image Ref", "default": "" }, "docker_image": { "type": "string", "title": "Docker Image", "default": "" }, "source_type": { "type": "string", "title": "Source Type", "default": "" }, "source_ref": { "type": "string", "title": "Source Ref", "default": "" }, "source_ref_branch": { "type": "string", "title": "Source Ref Branch", "default": "main" }, "gpu_type": { "type": "string", "title": "Gpu Type", "default": "" }, "gpu_tier": { "type": "string", "title": "Gpu Tier", "default": "" }, "gpu_count": { "type": "integer", "maximum": 8.0, "minimum": 1.0, "title": "Gpu Count", "default": 1 }, "region": { "type": "string", "title": "Region", "default": "ca-east" }, "min_workers": { "type": "integer", "maximum": 32.0, "minimum": 0.0, "title": "Min Workers", "default": 1 }, "max_workers": { "type": "integer", "maximum": 32.0, "minimum": 1.0, "title": "Max Workers", "default": 3 }, "max_concurrency": { "type": "integer", "maximum": 256.0, "minimum": 1.0, "title": "Max Concurrency", "default": 1 }, "idle_timeout_sec": { "type": "integer", "maximum": 86400.0, "minimum": 60.0, "title": "Idle Timeout Sec", "default": 60 }, "scaledown_window_sec": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Scaledown Window Sec" }, "scaling_policy_type": { "type": "string", "title": "Scaling Policy Type", "default": "queue_request_count" }, "scaling_policy_value": { "type": "integer", "minimum": 1.0, "title": "Scaling Policy Value", "default": 1 }, "execution_mode": { "type": "string", "title": "Execution Mode", "default": "sync" }, "queue_timeout_sec": { "type": "integer", "maximum": 3600.0, "minimum": 1.0, "title": "Queue Timeout Sec", "default": 120 }, "startup_command": { "type": "string", "title": "Startup Command", "default": "" }, "http_port": { "type": "integer", "maximum": 65535.0, "minimum": 1.0, "title": "Http Port", "default": 8080 }, "health_check_path": { "type": "string", "title": "Health Check Path", "default": "/health" }, "health_endpoint": { "type": "string", "title": "Health Endpoint", "default": "" }, "cuda_version": { "type": "string", "title": "Cuda Version", "default": "12.4" }, "request_timeout_sec": { "type": "integer", "maximum": 3600.0, "minimum": 10.0, "title": "Request Timeout Sec", "default": 120 }, "max_request_bytes": { "type": "integer", "maximum": 52428800.0, "minimum": 1024.0, "title": "Max Request Bytes", "default": 10485760 }, "env": { "additionalProperties": { "type": "string" }, "type": "object", "title": "Env" }, "lora_adapters": { "items": { "additionalProperties": { "type": "string" }, "type": "object" }, "type": "array", "title": "Lora Adapters" } }, "type": "object", "title": "ServerlessEndpointCreate" }, "ServerlessEndpointPatch": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "min_workers": { "anyOf": [ { "type": "integer", "maximum": 32.0, "minimum": 0.0 }, { "type": "null" } ], "title": "Min Workers" }, "max_workers": { "anyOf": [ { "type": "integer", "maximum": 32.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Max Workers" }, "max_concurrency": { "anyOf": [ { "type": "integer", "maximum": 256.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Max Concurrency" }, "idle_timeout_sec": { "anyOf": [ { "type": "integer", "maximum": 86400.0, "minimum": 60.0 }, { "type": "null" } ], "title": "Idle Timeout Sec" }, "scaling_policy_type": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Scaling Policy Type" }, "scaling_policy_value": { "anyOf": [ { "type": "integer", "minimum": 1.0 }, { "type": "null" } ], "title": "Scaling Policy Value" }, "execution_mode": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Execution Mode" }, "queue_timeout_sec": { "anyOf": [ { "type": "integer", "maximum": 3600.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Queue Timeout Sec" }, "request_timeout_sec": { "anyOf": [ { "type": "integer", "maximum": 3600.0, "minimum": 10.0 }, { "type": "null" } ], "title": "Request Timeout Sec" }, "max_queue_size": { "anyOf": [ { "type": "integer", "maximum": 10000.0, "minimum": 1.0 }, { "type": "null" } ], "title": "Max Queue Size" }, "keep_warm": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Keep Warm" } }, "type": "object", "title": "ServerlessEndpointPatch" }, "UploadRequest": { "properties": { "job_id": { "type": "string", "title": "Job Id" }, "filename": { "type": "string", "title": "Filename" }, "artifact_type": { "type": "string", "title": "Artifact Type", "default": "job_output" }, "storage_policy": { "type": "string", "title": "Storage Policy", "default": "any" } }, "type": "object", "required": [ "job_id", "filename" ], "title": "UploadRequest" }, "V1InferenceRequest": { "properties": { "model": { "type": "string", "title": "Model", "description": "Model name or HuggingFace repo" }, "inputs": { "anyOf": [ { "items": { "type": "string" }, "type": "array" }, { "type": "string" } ], "title": "Inputs", "description": "Text input(s) for inference" }, "max_tokens": { "type": "integer", "maximum": 8192.0, "minimum": 1.0, "title": "Max Tokens", "default": 512 }, "temperature": { "type": "number", "maximum": 2.0, "minimum": 0.0, "title": "Temperature", "default": 1.0 }, "stream": { "type": "boolean", "title": "Stream", "description": "Stream response via SSE", "default": false } }, "type": "object", "required": [ "model", "inputs" ], "title": "V1InferenceRequest", "description": "OpenAI-compatible inference request for /v1/inference." }, "ValidationError": { "properties": { "loc": { "items": { "anyOf": [ { "type": "string" }, { "type": "integer" } ] }, "type": "array", "title": "Location" }, "msg": { "type": "string", "title": "Message" }, "type": { "type": "string", "title": "Error Type" }, "input": { "title": "Input" }, "ctx": { "type": "object", "title": "Context" } }, "type": "object", "required": [ "loc", "msg", "type" ], "title": "ValidationError" }, "VolumeAttachRequest": { "properties": { "instance_id": { "type": "string", "title": "Instance Id" }, "mount_path": { "type": "string", "pattern": "^/(workspace|mnt/[a-zA-Z0-9._-]+|data)$", "title": "Mount Path", "default": "/workspace" }, "mode": { "type": "string", "enum": [ "rw", "ro" ], "title": "Mode", "default": "rw" } }, "type": "object", "required": [ "instance_id" ], "title": "VolumeAttachRequest" }, "VolumeCreate": { "properties": { "name": { "type": "string", "maxLength": 128, "minLength": 1, "title": "Name" }, "size_gb": { "type": "integer", "maximum": 2000.0, "minimum": 1.0, "title": "Size Gb", "default": 50 }, "region": { "type": "string", "title": "Region", "default": "ca-east" }, "encrypted": { "type": "boolean", "title": "Encrypted", "default": true } }, "type": "object", "required": [ "name" ], "title": "VolumeCreate" } }, "securitySchemes": { "bearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "OAuth access token or API key. Obtain one via the OAuth flow (`POST /oauth/token`) or from your dashboard, then send it as `Authorization: Bearer `." } } }, "tags": [ { "name": "Artifacts", "description": "Presigned upload/download URLs for model weights, checkpoints, outputs." }, { "name": "Auth" }, { "name": "Billing", "description": "Wallet management, invoicing, refunds. Credit-first billing in CAD." }, { "name": "Inference" }, { "name": "Inference v2" }, { "name": "Instances" }, { "name": "Marketplace", "description": "Rig listings, browsing, and marketplace billing." }, { "name": "Marketplace v2" }, { "name": "Serverless" }, { "name": "Serverless (compat)" }, { "name": "Volumes" } ], "security": [ { "bearerAuth": [] } ] }