{ "openapi": "3.1.0", "info": { "title": "Xcelsior", "description": "Distributed GPU orchestration platform for AI/ML workloads. Canadian-first data sovereignty (PIPEDA/Law 25), automated trust scoring, Stripe Connect marketplace billing, and real-time GPU telemetry.\n\n**Authentication**: Bearer token via `Authorization: Bearer ` header.\n\n**Regions**: Canada-first with province-level filtering (ON, QC, BC, AB, etc.).\n\n**SDK**: Generate idiomatic Python/TypeScript SDKs with [Fern](https://buildwithfern.com).\n\n**LLM Integration**: See `/llms.txt` for AI agent\u2013optimized documentation.", "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", "x-fern-server-name": "Production" }, { "url": "http://localhost:9500", "description": "Development", "x-fern-server-name": "Local Dev" } ], "paths": { "/host": { "put": { "tags": [ "Hosts" ], "summary": "Register Host", "description": "Register or update a host with strict admission gating.\n\nPer REPORT_FEATURE_FINAL.md \u00a762 and REPORT_FEATURE_2.md \u00a737:\n- Hosts must pass node admission (version gating) before accepting work\n- Country/province recorded for jurisdiction-aware scheduling\n- Hosts register as 'pending' until agent completes benchmark + admission\n- If versions are provided inline, admission is checked immediately", "operationId": "api_register_host_host_put", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HostIn" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/host/{host_id}": { "get": { "tags": [ "Hosts" ], "summary": "Get Host", "description": "Get a single host by ID.", "operationId": "api_get_host_host__host_id__get", "parameters": [ { "name": "host_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Host Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Hosts" ], "summary": "Remove Host", "description": "Remove a host.", "operationId": "api_remove_host_host__host_id__delete", "parameters": [ { "name": "host_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Host Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/hosts": { "get": { "tags": [ "Hosts" ], "summary": "List Hosts", "description": "List all hosts.", "operationId": "api_list_hosts_hosts_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" } } } } } } }, "/hosts/check": { "post": { "tags": [ "Hosts" ], "summary": "Check Hosts", "description": "Ping all hosts and update status.", "operationId": "api_check_hosts_hosts_check_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/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. Otherwise,\nthe 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 jobs. Optional filter by status.", "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" } } } } } }, "patch": { "tags": [ "Instances" ], "summary": "Update Instance", "description": "Update a job's status.", "operationId": "api_update_instance_instance__job_id__patch", "parameters": [ { "name": "job_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Job Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StatusUpdate" } } } }, "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" } } } } } } }, "/instance/{job_id}/requeue": { "post": { "tags": [ "Instances" ], "summary": "Requeue Instance", "description": "Manually requeue a failed or stuck job.", "operationId": "api_requeue_instance_instance__job_id__requeue_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/stream": { "get": { "tags": [ "Instances" ], "summary": "Instance Log Stream", "description": "Stream real-time logs for a specific job via Server-Sent Events.\n\nConnect with `EventSource('/jobs/{job_id}/logs/stream')` in the browser\nor `curl -N` from the CLI. Replays buffered log lines on connect, then\nlive-tails new log entries until the client disconnects or the job completes.\n\nEvents emitted:\n- `job_log` \u2014 individual log line (data: {job_id, timestamp, line, level})\n- `job_status` \u2014 status change (data: {job_id, status})\n- `connected` \u2014 initial handshake (data: {job_id, status: \"streaming\"})", "operationId": "api_instance_log_stream_instances__job_id__logs_stream_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}/logs": { "get": { "tags": [ "Instances" ], "summary": "Instance Logs", "description": "Get buffered log lines for a job (non-streaming).\n\nReturns the last `limit` log lines from the in-memory buffer.\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" } } } } } } }, "/api/ssh/keys": { "get": { "tags": [ "SSH Keys" ], "summary": "List Ssh Keys", "description": "List the authenticated user's SSH public keys.", "operationId": "api_list_ssh_keys_api_ssh_keys_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } }, "post": { "tags": [ "SSH Keys" ], "summary": "Add Ssh Key", "description": "Upload a user SSH public key. Like GitHub/AWS key management.", "operationId": "api_add_ssh_key_api_ssh_keys_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/ssh/keys/{key_id}": { "delete": { "tags": [ "SSH Keys" ], "summary": "Delete Ssh Key", "description": "Delete a user SSH public key by ID.", "operationId": "api_delete_ssh_key_api_ssh_keys__key_id__delete", "parameters": [ { "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" } } } } } } }, "/api/auth/register": { "post": { "tags": [ "Auth" ], "summary": "Auth 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" } } } } } } }, "/api/auth/login": { "post": { "tags": [ "Auth" ], "summary": "Auth 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" } } } } } } }, "/api/auth/oauth/{provider}": { "post": { "tags": [ "Auth" ], "summary": "Auth Oauth Initiate", "description": "Initiate OAuth flow \u2014 returns the provider's authorization URL.\n\nThe frontend should redirect the user to the returned URL.", "operationId": "api_auth_oauth_initiate_api_auth_oauth__provider__post", "parameters": [ { "name": "provider", "in": "path", "required": true, "schema": { "type": "string", "title": "Provider" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/auth/me": { "get": { "tags": [ "Auth" ], "summary": "Auth Me", "description": "Get the currently authenticated user's profile.\n\nRequires Authorization: Bearer header.", "operationId": "api_auth_me_api_auth_me_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } }, "patch": { "tags": [ "Auth" ], "summary": "Auth Update Profile", "description": "Update the current user's profile fields.", "operationId": "api_auth_update_profile_api_auth_me_patch", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProfileUpdateRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/auth/refresh": { "post": { "tags": [ "Auth" ], "summary": "Auth Refresh", "description": "Refresh an existing session token.\n\nReturns a new token with a fresh 30-day expiry.", "operationId": "api_auth_refresh_api_auth_refresh_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/auth/logout": { "post": { "tags": [ "Auth" ], "summary": "Auth Logout", "description": "Logout \u2014 invalidate session and clear cookie.", "operationId": "api_auth_logout_api_auth_logout_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/keys/generate": { "post": { "tags": [ "Auth" ], "summary": "Generate Api Key", "description": "Generate a named API key for the authenticated user.\n\nAPI keys can be used as Bearer tokens for programmatic access.\nScope: 'full-access' (default) or 'read-only' (GET requests only).", "operationId": "api_generate_api_key_api_keys_generate_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/keys": { "get": { "tags": [ "Auth" ], "summary": "List Keys", "description": "List all API keys for the authenticated user (keys are redacted).", "operationId": "api_list_keys_api_keys_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/keys/{key_preview}": { "delete": { "tags": [ "Auth" ], "summary": "Revoke Key", "description": "Revoke an API key by its preview string.", "operationId": "api_revoke_key_api_keys__key_preview__delete", "parameters": [ { "name": "key_preview", "in": "path", "required": true, "schema": { "type": "string", "title": "Key Preview" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/auth/mfa/methods": { "get": { "tags": [ "Auth \u2013 MFA" ], "summary": "Mfa List Methods", "description": "List the user's configured MFA methods.", "operationId": "api_mfa_list_methods_api_auth_mfa_methods_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/auth/mfa/totp/setup": { "post": { "tags": [ "Auth \u2013 MFA" ], "summary": "Mfa Totp Setup", "description": "Generate a TOTP secret and QR code URI for setup.", "operationId": "api_mfa_totp_setup_api_auth_mfa_totp_setup_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/auth/mfa/totp/verify": { "post": { "tags": [ "Auth \u2013 MFA" ], "summary": "Mfa Totp Verify", "description": "Verify a TOTP code to complete setup and enable TOTP.", "operationId": "api_mfa_totp_verify_api_auth_mfa_totp_verify_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TotpVerifyRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/auth/mfa/sms/setup": { "post": { "tags": [ "Auth \u2013 MFA" ], "summary": "Mfa Sms Setup", "description": "Register a phone number for SMS MFA. Sends a verification code.", "operationId": "api_mfa_sms_setup_api_auth_mfa_sms_setup_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SmsSetupRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/auth/mfa/sms/verify": { "post": { "tags": [ "Auth \u2013 MFA" ], "summary": "Mfa Sms Verify", "description": "Verify the SMS code to complete SMS MFA setup.", "operationId": "api_mfa_sms_verify_api_auth_mfa_sms_verify_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SmsVerifyRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/auth/mfa/verify": { "post": { "tags": [ "Auth \u2013 MFA" ], "summary": "Mfa Verify Login", "description": "Verify MFA code during login to complete authentication.", "operationId": "api_mfa_verify_login_api_auth_mfa_verify_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MfaVerifyLogin" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/auth/sessions": { "get": { "tags": [ "Auth" ], "summary": "Auth List Sessions", "description": "List active sessions for the current user.", "operationId": "api_auth_list_sessions_api_auth_sessions_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/auth/sessions/{token_prefix}": { "delete": { "tags": [ "Auth" ], "summary": "Auth Revoke Session", "description": "Revoke a specific session by its token prefix.", "operationId": "api_auth_revoke_session_api_auth_sessions__token_prefix__delete", "parameters": [ { "name": "token_prefix", "in": "path", "required": true, "schema": { "type": "string", "title": "Token Prefix" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/teams": { "post": { "tags": [ "Teams" ], "summary": "Create Team", "description": "Create a new team/organization. Creator becomes team admin.", "operationId": "api_create_team_api_teams_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateTeamRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/teams/me": { "get": { "tags": [ "Teams" ], "summary": "My Teams", "description": "Get teams the current user belongs to.", "operationId": "api_my_teams_api_teams_me_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/teams/{team_id}": { "get": { "tags": [ "Teams" ], "summary": "Get Team", "description": "Get team details including members.", "operationId": "api_get_team_api_teams__team_id__get", "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Team Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "delete": { "tags": [ "Teams" ], "summary": "Delete Team", "description": "Delete a team. Only the team owner can delete it.", "operationId": "api_delete_team_api_teams__team_id__delete", "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Team Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/teams/{team_id}/members": { "post": { "tags": [ "Teams" ], "summary": "Add Team Member", "description": "Add a member to a team. Only team admins can add members.", "operationId": "api_add_team_member_api_teams__team_id__members_post", "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Team Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddTeamMemberRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/teams/{team_id}/members/{email}": { "delete": { "tags": [ "Teams" ], "summary": "Remove Team Member", "description": "Remove a member from a team. Admins can remove anyone; members can leave.", "operationId": "api_remove_team_member_api_teams__team_id__members__email__delete", "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Team Id" } }, { "name": "email", "in": "path", "required": true, "schema": { "type": "string", "title": "Email" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } }, "patch": { "tags": [ "Teams" ], "summary": "Update Team Member Role", "description": "Update a team member's role. Only admins can change roles.", "operationId": "api_update_team_member_role_api_teams__team_id__members__email__patch", "parameters": [ { "name": "team_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Team Id" } }, { "name": "email", "in": "path", "required": true, "schema": { "type": "string", "title": "Email" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateTeamMemberRoleRequest" } } } }, "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": { "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": "Marketplace Stats", "description": "Marketplace aggregate stats.", "operationId": "api_marketplace_stats_marketplace_stats_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/hosts/ca": { "get": { "tags": [ "Jurisdiction" ], "summary": "List Canadian Hosts", "description": "List only Canadian hosts.", "operationId": "api_list_canadian_hosts_hosts_ca_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/compute-score/{host_id}": { "get": { "tags": [ "Hosts" ], "summary": "Get Compute Score", "description": "Get the compute score (XCU) for a host.", "operationId": "api_get_compute_score_compute_score__host_id__get", "parameters": [ { "name": "host_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Host Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/compute-scores": { "get": { "tags": [ "Hosts" ], "summary": "List Compute Scores", "description": "List compute scores for all hosts.", "operationId": "api_list_compute_scores_compute_scores_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/healthz": { "get": { "tags": [ "Infrastructure" ], "summary": "Healthz", "description": "Health check \u2014 verifies database connectivity and returns real system status.", "operationId": "healthz_healthz_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/events/{entity_type}/{entity_id}": { "get": { "tags": [ "Events" ], "summary": "Get Events", "description": "Get event history for a job or host.", "operationId": "api_get_events_api_events__entity_type___entity_id__get", "parameters": [ { "name": "entity_type", "in": "path", "required": true, "schema": { "type": "string", "title": "Entity Type" } }, { "name": "entity_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Entity 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/verify/{host_id}": { "post": { "tags": [ "Verification" ], "summary": "Verify Host", "description": "Run verification checks on a host.", "operationId": "api_verify_host_api_verify__host_id__post", "parameters": [ { "name": "host_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Host Id" } } ], "requestBody": { "required": true, "content": { "application/json": { "schema": { "$ref": "#/components/schemas/VerifyHostRequest" } } } }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/verify/{host_id}/status": { "get": { "tags": [ "Verification" ], "summary": "Verification Status", "description": "Get current verification status for a host.", "operationId": "api_verification_status_api_verify__host_id__status_get", "parameters": [ { "name": "host_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Host Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/verified-hosts": { "get": { "tags": [ "Verification" ], "summary": "Verified Hosts", "description": "List all verified hosts with full verification details.\n\nReturns host_id, state, gpu_model, country, last_check, overall_score\nfor every host that has any verification record (not just 'verified').", "operationId": "api_verified_hosts_api_verified_hosts_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/jurisdiction/hosts": { "post": { "tags": [ "Jurisdiction" ], "summary": "Jurisdiction Hosts", "description": "Filter hosts by jurisdiction constraints.", "operationId": "api_jurisdiction_hosts_api_jurisdiction_hosts_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/JurisdictionFilterRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/jurisdiction/residency-trace/{job_id}": { "get": { "tags": [ "Jurisdiction" ], "summary": "Residency Trace", "description": "Generate a residency trace for a job (compliance artifact).", "operationId": "api_residency_trace_api_jurisdiction_residency_trace__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/trust-tiers": { "get": { "tags": [ "Jurisdiction" ], "summary": "Trust Tiers", "description": "List available trust tiers and their requirements.", "operationId": "api_trust_tiers_api_trust_tiers_get", "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\nReturns client_secret for front-end Stripe Elements confirmation.\nOn payment_intent.succeeded webhook the wallet is credited automatically.", "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/wallet/{customer_id}/deposit": { "post": { "tags": [ "Billing" ], "summary": "Deposit", "description": "Deposit credits into a customer wallet.", "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/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 AI Compute Access Fund\u2013aligned invoice.", "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/billing/refund": { "post": { "tags": [ "Billing" ], "summary": "Process Refund", "description": "Process a refund for a failed job.\n\nFrom REPORT_FEATURE_1.md:\n- Hardware error \u2192 full refund\n- User OOM (exit 137) \u2192 zero refund", "operationId": "api_process_refund_api_billing_refund_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RefundRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/reputation/leaderboard": { "get": { "tags": [ "Reputation" ], "summary": "Reputation Leaderboard", "description": "Top hosts/users by reputation score.", "operationId": "api_reputation_leaderboard_api_reputation_leaderboard_get", "parameters": [ { "name": "entity_type", "in": "query", "required": false, "schema": { "type": "string", "default": "host", "title": "Entity Type" } }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 20, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/reputation/me": { "get": { "tags": [ "Reputation" ], "summary": "Reputation Me", "description": "Get reputation for the currently authenticated user.", "operationId": "api_reputation_me_api_reputation_me_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/reputation/{entity_id}": { "get": { "tags": [ "Reputation" ], "summary": "Get Reputation", "description": "Get reputation score and tier for a host or user.", "operationId": "api_get_reputation_api_reputation__entity_id__get", "parameters": [ { "name": "entity_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Entity Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/reputation/{entity_id}/history": { "get": { "tags": [ "Reputation" ], "summary": "Reputation History", "description": "Get reputation event history.", "operationId": "api_reputation_history_api_reputation__entity_id__history_get", "parameters": [ { "name": "entity_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Entity 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/pricing/estimate": { "post": { "tags": [ "Billing" ], "summary": "Estimate Cost", "description": "Estimate job cost with AI Compute Access Fund rebate preview.\n\nFrom REPORT_FEATURE_2.md: --estimate-rebate / simulate=true", "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.", "operationId": "api_reference_pricing_api_pricing_reference_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/analytics/usage": { "get": { "tags": [ "Billing" ], "summary": "Usage Analytics", "description": "Usage analytics for both providers and submitters.\n\nProvides cost breakdowns, GPU utilization trends, and hardware health\naggregates over time. Supports grouping by day, week, GPU model,\nor province for detailed reporting.\n\nQuery params:\n- `customer_id` \u2014 filter to one customer (submitter view)\n- `provider_id` \u2014 filter to one provider (earnings view)\n- `days` \u2014 lookback window (default 30)\n- `group_by` \u2014 aggregation: `day`, `week`, `gpu_model`, `province`", "operationId": "api_usage_analytics_api_analytics_usage_get", "parameters": [ { "name": "customer_id", "in": "query", "required": false, "schema": { "type": "string", "default": "", "title": "Customer Id" } }, { "name": "provider_id", "in": "query", "required": false, "schema": { "type": "string", "default": "", "title": "Provider Id" } }, { "name": "days", "in": "query", "required": false, "schema": { "type": "integer", "default": 30, "title": "Days" } }, { "name": "group_by", "in": "query", "required": false, "schema": { "type": "string", "default": "day", "title": "Group By" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/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/compliance/status": { "get": { "tags": [ "Compliance" ], "summary": "Compliance Status", "description": "Return high-level compliance check summary with live verification.\n\nChecks reflect actual user/platform configuration state \u2014 items require\nspecific action before they show as passing. Each non-passing check\nincludes an ``action`` with a CTA label and dashboard link.", "operationId": "api_compliance_status_api_compliance_status_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/compliance/provinces": { "get": { "tags": [ "Compliance" ], "summary": "Compliance Provinces", "description": "Province-specific compliance matrix for scheduling guidance.", "operationId": "api_compliance_provinces_api_compliance_provinces_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/compliance/tax-rates": { "get": { "tags": [ "Compliance" ], "summary": "Tax Rates", "description": "Canadian GST/HST/PST rates by province for billing.", "operationId": "api_tax_rates_api_compliance_tax_rates_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/transparency/report": { "get": { "tags": [ "Transparency" ], "summary": "Transparency Report", "description": "Generate transparency report \u2014 CLOUD Act diligence artifact.\n\nReturns summary of all legal requests and data disclosures.\nMonthly JSON per REPORT_FEATURE_2.md Phase B \u00a73.", "operationId": "api_transparency_report_api_transparency_report_get", "parameters": [ { "name": "months", "in": "query", "required": false, "schema": { "type": "integer", "default": 12, "title": "Months" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/audit/instance/{job_id}": { "get": { "tags": [ "Events" ], "summary": "Instance Audit Trail", "description": "Full auditable trail for a job \u2014 every event with hash chain.\n\nThis is the dispute-resolution artifact: every state change,\nlease renewal, billing event, ordered by time with tamper-evident hashes.", "operationId": "api_instance_audit_trail_api_audit_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" } } } } } } }, "/agent/telemetry/{host_id}": { "get": { "tags": [ "Telemetry" ], "summary": "Get Telemetry", "description": "Get latest telemetry for a host (dashboard live gauges).", "operationId": "api_get_telemetry_agent_telemetry__host_id__get", "parameters": [ { "name": "host_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Host Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/telemetry/all": { "get": { "tags": [ "Telemetry" ], "summary": "All Telemetry", "description": "Get latest telemetry for all hosts (dashboard overview).", "operationId": "api_all_telemetry_api_telemetry_all_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/sla/hosts-summary": { "get": { "tags": [ "SLA" ], "summary": "Sla Hosts Summary", "description": "Get SLA status summary for all known hosts.\n\nReturns per-host cards with uptime %, violation count, and SLA tier.\nUsed by dashboard UI-8.1 SLA Dashboard.", "operationId": "api_sla_hosts_summary_api_sla_hosts_summary_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/sla/{host_id}": { "get": { "tags": [ "SLA" ], "summary": "Sla Status", "description": "Get SLA record and rolling uptime for a host.", "operationId": "api_sla_status_api_sla__host_id__get", "parameters": [ { "name": "host_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Host Id" } }, { "name": "month", "in": "query", "required": false, "schema": { "type": "string", "default": "", "title": "Month" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/sla/violations/{host_id}": { "get": { "tags": [ "SLA" ], "summary": "Sla Violations", "description": "Get SLA violation history for a host.", "operationId": "api_sla_violations_api_sla_violations__host_id__get", "parameters": [ { "name": "host_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Host Id" } }, { "name": "since", "in": "query", "required": false, "schema": { "type": "number", "default": 0, "title": "Since" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/providers/register": { "post": { "tags": [ "Providers" ], "summary": "Register Provider", "description": "Register a GPU provider with Stripe Connect onboarding.\n\nFor Canadian companies, include corporation_name, business_number,\nand gst_hst_number. Returns a Stripe onboarding URL for KYC completion.\n\nPer Report #1.B \"Five Pillars of Compliance\":\n1. Identity Verification (Stripe Identity)\n2. Financial Enrollment (bank details via Stripe Express)\n3. Credentialing (GPU/bandwidth checked at admission)\n4. Tax Compliance (GST/HST auto-collected per province)", "operationId": "api_register_provider_api_providers_register_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProviderRegisterRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/providers/{provider_id}": { "get": { "tags": [ "Providers" ], "summary": "Get Provider", "description": "Get provider account details including company info and payout status.", "operationId": "api_get_provider_api_providers__provider_id__get", "parameters": [ { "name": "provider_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Provider Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/providers": { "get": { "tags": [ "Providers" ], "summary": "List Providers", "description": "List all provider accounts, optionally filtered by status.", "operationId": "api_list_providers_api_providers_get", "parameters": [ { "name": "status", "in": "query", "required": false, "schema": { "type": "string", "default": "", "title": "Status" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/providers/{provider_id}/earnings": { "get": { "tags": [ "Providers" ], "summary": "Provider Earnings", "description": "Get aggregate earnings and payout history for a provider.", "operationId": "api_provider_earnings_api_providers__provider_id__earnings_get", "parameters": [ { "name": "provider_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Provider Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/providers/{provider_id}/payout": { "post": { "tags": [ "Providers" ], "summary": "Provider Payout", "description": "Split a job payment between provider (85%) and platform (15%).\n\nApplies province-specific GST/HST. If Stripe is configured,\ncreates a real Transfer to the provider's connected account.", "operationId": "api_provider_payout_api_providers__provider_id__payout_post", "parameters": [ { "name": "provider_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Provider Id" } }, { "name": "job_id", "in": "query", "required": false, "schema": { "type": "string", "default": "", "title": "Job Id" } }, { "name": "total_cad", "in": "query", "required": false, "schema": { "type": "number", "default": 0, "title": "Total Cad" } } ], "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": "Artifact 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" } } } } } } }, "/api/reputation/{entity_id}/breakdown": { "get": { "tags": [ "Reputation" ], "summary": "Reputation Breakdown", "description": "Get a detailed breakdown of how a reputation score is calculated.\n\nReturns component scores: jobs completed, uptime bonus, penalties, decay.", "operationId": "api_reputation_breakdown_api_reputation__entity_id__breakdown_get", "parameters": [ { "name": "entity_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Entity Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/v1/inference": { "post": { "tags": [ "Inference v2" ], "summary": "V1 Inference 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": "V1 Inference Async", "description": "Asynchronous inference \u2014 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": "V1 Inference 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/artifacts": { "get": { "tags": [ "Artifacts" ], "summary": "List All Artifacts", "description": "List all artifacts (no job filter).", "operationId": "api_list_all_artifacts_api_artifacts_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/events": { "get": { "tags": [ "Events" ], "summary": "Get All Events", "description": "Get recent events across all entities.", "operationId": "api_get_all_events_api_events_get", "parameters": [ { "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" } } } } } } }, "/api/users/me/preferences": { "get": { "tags": [ "Auth" ], "summary": "Get User Preferences", "description": "Get user preferences.", "operationId": "api_get_user_preferences_api_users_me_preferences_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } }, "put": { "tags": [ "Auth" ], "summary": "Set User Preferences", "description": "Update user preferences.", "operationId": "api_set_user_preferences_api_users_me_preferences_put", "requestBody": { "content": { "application/json": { "schema": { "additionalProperties": true, "type": "object", "title": "Body" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/notifications": { "get": { "tags": [ "Notifications" ], "summary": "List Notifications", "description": "List notifications for the current user.", "operationId": "api_list_notifications_api_notifications_get", "parameters": [ { "name": "unread", "in": "query", "required": false, "schema": { "type": "boolean", "default": false, "title": "Unread" } }, { "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/notifications/unread-count": { "get": { "tags": [ "Notifications" ], "summary": "Notification Unread Count", "description": "Get the unread notification count for the current user.", "operationId": "api_notification_unread_count_api_notifications_unread_count_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/notifications/{notification_id}/read": { "post": { "tags": [ "Notifications" ], "summary": "Mark Notification Read", "description": "Mark a single notification as read.", "operationId": "api_mark_notification_read_api_notifications__notification_id__read_post", "parameters": [ { "name": "notification_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Notification Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/notifications/read-all": { "post": { "tags": [ "Notifications" ], "summary": "Mark All Read", "description": "Mark all notifications as read for the current user.", "operationId": "api_mark_all_read_api_notifications_read_all_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/notifications/{notification_id}": { "delete": { "tags": [ "Notifications" ], "summary": "Delete Notification", "description": "Delete a single notification.", "operationId": "api_delete_notification_api_notifications__notification_id__delete", "parameters": [ { "name": "notification_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Notification Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/marketplace/offers": { "post": { "tags": [ "Marketplace v2" ], "summary": "Marketplace Create Offer", "description": "Create or update a GPU offer on the marketplace.", "operationId": "api_marketplace_create_offer_api_v2_marketplace_offers_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GPUOfferCreate" } } }, "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/search": { "post": { "tags": [ "Marketplace v2" ], "summary": "Marketplace 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": "Marketplace 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": "Marketplace 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": "Marketplace 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": "Marketplace 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": "Marketplace 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/gpu/available": { "get": { "tags": [ "GPU" ], "summary": "Gpu Available", "description": "List available GPU types with regions, VRAM, pricing, and counts.\n\nUsed by both Serverless and Volumes to populate GPU/region pickers.\nQueries gpu_offers first, then hosts table. If neither has data,\nreturns an empty list \u2014 no fake inventory.", "operationId": "api_gpu_available_api_v2_gpu_available_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v2/inference/endpoints": { "get": { "tags": [ "Inference v2" ], "summary": "Inference List Endpoints", "description": "List inference endpoints for the current user.", "operationId": "api_inference_list_endpoints_api_v2_inference_endpoints_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } }, "post": { "tags": [ "Inference v2" ], "summary": "Inference Create Endpoint", "description": "Create a serverless inference endpoint.\n\nIf min_workers >= 1, a worker container is provisioned immediately.\nBilling is real-time from credits (per-second compute + per-token inference).", "operationId": "api_inference_create_endpoint_api_v2_inference_endpoints_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InferenceEndpointCreate" } } }, "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": [ "Inference v2" ], "summary": "Inference Get Endpoint", "description": "Get inference endpoint details.", "operationId": "api_inference_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": [ "Inference v2" ], "summary": "Inference Delete Endpoint", "description": "Delete an inference endpoint.", "operationId": "api_inference_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": [ "Inference v2" ], "summary": "Inference Endpoint Health", "description": "Get health status for an inference endpoint and its workers.", "operationId": "api_inference_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": [ "Inference v2" ], "summary": "Inference Endpoint Usage", "description": "Get usage stats for an inference endpoint.", "operationId": "api_inference_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" } } } } } } }, "/v1/chat/completions": { "post": { "tags": [ "Inference v2" ], "summary": "Openai Chat Completions", "description": "OpenAI-compatible chat completions endpoint.\n\nRoutes to a serverless inference endpoint running the requested model.", "operationId": "api_openai_chat_completions_v1_chat_completions_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatCompletionRequest" } } }, "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": { "get": { "tags": [ "Volumes" ], "summary": "Volume 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": "Volume 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": "Volume 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": "Volume 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": "Volume 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": "Volume 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" } } } } } } }, "/api/v2/billing/auto-topup": { "get": { "tags": [ "Billing" ], "summary": "Billing 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": "Billing 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/v2/privacy/consent": { "post": { "tags": [ "Privacy" ], "summary": "Privacy Record Consent", "description": "Record CASL consent for a purpose.", "operationId": "api_privacy_record_consent_api_v2_privacy_consent_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/api__ConsentRequest__2" } } }, "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/privacy/consent/{purpose}": { "delete": { "tags": [ "Privacy" ], "summary": "Privacy Withdraw Consent", "description": "Withdraw CASL consent for a purpose (unsubscribe).", "operationId": "api_privacy_withdraw_consent_api_v2_privacy_consent__purpose__delete", "parameters": [ { "name": "purpose", "in": "path", "required": true, "schema": { "type": "string", "title": "Purpose" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/v2/privacy/consents": { "get": { "tags": [ "Privacy" ], "summary": "Privacy List Consents", "description": "List all consent records for the current user.", "operationId": "api_privacy_list_consents_api_v2_privacy_consents_get", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/v2/privacy/erase": { "post": { "tags": [ "Privacy" ], "summary": "Privacy Right To Erasure", "description": "Execute right-to-erasure (PIPEDA/Law 25). Irreversible.", "operationId": "api_privacy_right_to_erasure_api_v2_privacy_erase_post", "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } } } } }, "/api/ai/chat": { "post": { "tags": [ "AI Assistant" ], "summary": "Ai Chat", "description": "Stream an AI assistant response with tool-calling support via SSE.", "operationId": "api_ai_chat_api_ai_chat_post", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AiChatRequest" } } }, "required": true }, "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/ai/conversations": { "get": { "tags": [ "AI Assistant" ], "summary": "Ai List Conversations", "description": "List the current user's AI assistant conversations.", "operationId": "api_ai_list_conversations_api_ai_conversations_get", "parameters": [ { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "default": 30, "title": "Limit" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } }, "/api/ai/conversations/{conversation_id}": { "get": { "tags": [ "AI Assistant" ], "summary": "Ai Get Conversation", "description": "Get messages for an AI assistant conversation.", "operationId": "api_ai_get_conversation_api_ai_conversations__conversation_id__get", "parameters": [ { "name": "conversation_id", "in": "path", "required": true, "schema": { "type": "string", "title": "Conversation Id" } } ], "responses": { "200": { "description": "Successful Response", "content": { "application/json": { "schema": {} } } }, "422": { "description": "Validation Error", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HTTPValidationError" } } } } } } } }, "components": { "schemas": { "AddTeamMemberRequest": { "properties": { "email": { "type": "string", "title": "Email" }, "role": { "type": "string", "title": "Role", "default": "member" } }, "type": "object", "required": [ "email" ], "title": "AddTeamMemberRequest" }, "AiChatRequest": { "properties": { "message": { "type": "string", "maxLength": 4000, "minLength": 1, "title": "Message" }, "conversation_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Conversation Id" }, "page_context": { "type": "string", "title": "Page Context", "default": "" } }, "type": "object", "required": [ "message" ], "title": "AiChatRequest" }, "AiConfirmRequest": { "properties": { "confirmation_id": { "type": "string", "title": "Confirmation Id" }, "approved": { "type": "boolean", "title": "Approved" } }, "type": "object", "required": [ "confirmation_id", "approved" ], "title": "AiConfirmRequest" }, "AlertConfig": { "properties": { "email_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Email Enabled" }, "smtp_host": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Smtp Host" }, "smtp_port": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Smtp Port" }, "smtp_user": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Smtp User" }, "smtp_pass": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Smtp Pass" }, "email_from": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Email From" }, "email_to": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Email To" }, "telegram_enabled": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ], "title": "Telegram Enabled" }, "telegram_bot_token": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Telegram Bot Token" }, "telegram_chat_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Telegram Chat Id" } }, "type": "object", "title": "AlertConfig" }, "AllocateGPURequest": { "properties": { "offer_id": { "type": "string", "title": "Offer Id" }, "job_id": { "type": "string", "title": "Job Id" }, "gpu_count": { "type": "integer", "title": "Gpu Count", "default": 1 }, "spot": { "type": "boolean", "title": "Spot", "default": false } }, "type": "object", "required": [ "offer_id", "job_id" ], "title": "AllocateGPURequest" }, "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" }, "BenchmarkReport": { "properties": { "host_id": { "type": "string", "title": "Host Id" }, "gpu_model": { "type": "string", "title": "Gpu Model" }, "score": { "type": "number", "title": "Score" }, "tflops": { "type": "number", "title": "Tflops" }, "details": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Details" } }, "type": "object", "required": [ "host_id", "gpu_model", "score", "tflops" ], "title": "BenchmarkReport" }, "BuildIn": { "properties": { "model": { "type": "string", "title": "Model" }, "base_image": { "type": "string", "title": "Base Image", "default": "python:3.11-slim" }, "quantize": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Quantize" }, "push": { "type": "boolean", "title": "Push", "default": false } }, "type": "object", "required": [ "model" ], "title": "BuildIn" }, "CanadaToggle": { "properties": { "enabled": { "type": "boolean", "title": "Enabled" } }, "type": "object", "required": [ "enabled" ], "title": "CanadaToggle" }, "ChangePasswordRequest": { "properties": { "current_password": { "type": "string", "title": "Current Password" }, "new_password": { "type": "string", "title": "New Password" } }, "type": "object", "required": [ "current_password", "new_password" ], "title": "ChangePasswordRequest" }, "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", "description": "OpenAI-compatible chat completion request." }, "ChatFeedbackRequest": { "properties": { "message_id": { "type": "string", "title": "Message Id" }, "vote": { "type": "string", "title": "Vote" } }, "type": "object", "required": [ "message_id", "vote" ], "title": "ChatFeedbackRequest" }, "ChatRequest": { "properties": { "message": { "type": "string", "maxLength": 2000, "minLength": 1, "title": "Message" }, "conversation_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Conversation Id" } }, "type": "object", "required": [ "message" ], "title": "ChatRequest" }, "CreateTeamRequest": { "properties": { "name": { "type": "string", "title": "Name" }, "plan": { "type": "string", "title": "Plan", "default": "free" } }, "type": "object", "required": [ "name" ], "title": "CreateTeamRequest" }, "CryptoDepositRequest": { "properties": { "customer_id": { "type": "string", "title": "Customer Id" }, "amount_cad": { "type": "number", "title": "Amount Cad" } }, "type": "object", "required": [ "customer_id", "amount_cad" ], "title": "CryptoDepositRequest" }, "DepositRequest": { "properties": { "amount_cad": { "type": "number", "title": "Amount Cad" }, "description": { "type": "string", "title": "Description", "default": "Credit deposit" } }, "type": "object", "required": [ "amount_cad" ], "title": "DepositRequest" }, "DeviceTokenRequest": { "properties": { "device_code": { "type": "string", "title": "Device Code" }, "grant_type": { "type": "string", "title": "Grant Type", "default": "urn:ietf:params:oauth:grant-type:device_code" } }, "type": "object", "required": [ "device_code" ], "title": "DeviceTokenRequest" }, "DeviceVerifyRequest": { "properties": { "user_code": { "type": "string", "title": "User Code" } }, "type": "object", "required": [ "user_code" ], "title": "DeviceVerifyRequest" }, "DownloadRequest": { "properties": { "job_id": { "type": "string", "title": "Job Id" }, "filename": { "type": "string", "title": "Filename" }, "artifact_type": { "type": "string", "title": "Artifact Type", "default": "job_output" } }, "type": "object", "required": [ "job_id", "filename" ], "title": "DownloadRequest" }, "EstimateRequest": { "properties": { "gpu_model": { "type": "string", "title": "Gpu Model", "default": "RTX 4090" }, "duration_hours": { "type": "number", "title": "Duration Hours", "default": 1.0 }, "spot": { "type": "boolean", "title": "Spot", "default": false }, "sovereignty": { "type": "boolean", "title": "Sovereignty", "default": false }, "is_canadian": { "type": "boolean", "title": "Is Canadian", "default": true } }, "type": "object", "title": "EstimateRequest" }, "GPUOfferCreate": { "properties": { "host_id": { "type": "string", "title": "Host Id" }, "gpu_model": { "type": "string", "title": "Gpu Model" }, "gpu_count_total": { "type": "integer", "title": "Gpu Count Total", "default": 1 }, "vram_gb": { "type": "number", "title": "Vram Gb", "default": 0 }, "ask_cents_per_hour": { "type": "integer", "title": "Ask Cents Per Hour", "default": 20 }, "region": { "type": "string", "title": "Region", "default": "ca-east" }, "spot_enabled": { "type": "boolean", "title": "Spot Enabled", "default": true }, "spot_min_cents": { "type": "integer", "title": "Spot Min Cents", "default": 10 } }, "type": "object", "required": [ "host_id", "gpu_model" ], "title": "GPUOfferCreate" }, "HTTPValidationError": { "properties": { "detail": { "items": { "$ref": "#/components/schemas/ValidationError" }, "type": "array", "title": "Detail" } }, "type": "object", "title": "HTTPValidationError" }, "HostIn": { "properties": { "host_id": { "type": "string", "title": "Host Id" }, "ip": { "type": "string", "title": "Ip" }, "gpu_model": { "type": "string", "title": "Gpu Model" }, "total_vram_gb": { "type": "number", "title": "Total Vram Gb" }, "free_vram_gb": { "type": "number", "title": "Free Vram Gb" }, "cost_per_hour": { "type": "number", "title": "Cost Per Hour", "default": 0.2 }, "country": { "type": "string", "title": "Country", "default": "CA" }, "province": { "type": "string", "title": "Province", "default": "" }, "versions": { "anyOf": [ { "additionalProperties": true, "type": "object" }, { "type": "null" } ], "title": "Versions" }, "corporation_name": { "type": "string", "title": "Corporation Name", "default": "" }, "business_number": { "type": "string", "title": "Business Number", "default": "" }, "gst_hst_number": { "type": "string", "title": "Gst Hst Number", "default": "" }, "legal_name": { "type": "string", "title": "Legal Name", "default": "" } }, "type": "object", "required": [ "host_id", "ip", "gpu_model", "total_vram_gb", "free_vram_gb" ], "title": "HostIn" }, "IncorporationUploadRequest": { "properties": { "file_id": { "type": "string", "title": "File Id" } }, "type": "object", "required": [ "file_id" ], "title": "IncorporationUploadRequest" }, "InferenceEndpointCreate": { "properties": { "model_name": { "type": "string", "title": "Model Name" }, "gpu_type": { "type": "string", "title": "Gpu Type", "default": "" }, "region": { "type": "string", "title": "Region", "default": "ca-east" }, "docker_image": { "type": "string", "title": "Docker Image", "default": "xcelsior/vllm:latest" }, "min_workers": { "type": "integer", "title": "Min Workers", "default": 0 }, "max_workers": { "type": "integer", "title": "Max Workers", "default": 3 }, "max_batch_size": { "type": "integer", "title": "Max Batch Size", "default": 8 }, "max_concurrent": { "type": "integer", "title": "Max Concurrent", "default": 4 }, "scaledown_window_sec": { "type": "integer", "title": "Scaledown Window Sec", "default": 300 }, "mode": { "type": "string", "title": "Mode", "default": "sync" }, "health_endpoint": { "type": "string", "title": "Health Endpoint", "default": "/health" }, "api_format": { "type": "string", "title": "Api Format", "default": "openai" } }, "type": "object", "required": [ "model_name" ], "title": "InferenceEndpointCreate" }, "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" }, "InferenceResultCallback": { "properties": { "outputs": { "items": {}, "type": "array", "title": "Outputs" }, "model": { "type": "string", "title": "Model", "default": "" }, "latency_ms": { "type": "number", "title": "Latency Ms", "default": 0 } }, "type": "object", "title": "InferenceResultCallback" }, "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 } }, "type": "object", "required": [ "name" ], "title": "JobIn" }, "JurisdictionFilterRequest": { "properties": { "canada_only": { "type": "boolean", "title": "Canada Only", "default": true }, "province": { "type": "string", "title": "Province" }, "trust_tier": { "type": "string", "title": "Trust Tier" } }, "type": "object", "title": "JurisdictionFilterRequest" }, "LeaseClaimRequest": { "properties": { "host_id": { "type": "string", "title": "Host Id" }, "job_id": { "type": "string", "title": "Job Id" } }, "type": "object", "required": [ "host_id", "job_id" ], "title": "LeaseClaimRequest" }, "LeaseReleaseRequest": { "properties": { "job_id": { "type": "string", "title": "Job Id" }, "reason": { "type": "string", "title": "Reason", "default": "completed" } }, "type": "object", "required": [ "job_id" ], "title": "LeaseReleaseRequest" }, "LeaseRenewRequest": { "properties": { "host_id": { "type": "string", "title": "Host Id" }, "job_id": { "type": "string", "title": "Job Id" } }, "type": "object", "required": [ "host_id", "job_id" ], "title": "LeaseRenewRequest" }, "LegalRequestRecord": { "properties": { "request_type": { "type": "string", "title": "Request Type", "default": "subpoena" }, "jurisdiction": { "type": "string", "title": "Jurisdiction", "default": "CA" }, "authority": { "type": "string", "title": "Authority", "default": "" }, "scope": { "type": "string", "title": "Scope", "default": "" }, "notes": { "type": "string", "title": "Notes", "default": "" } }, "type": "object", "title": "LegalRequestRecord" }, "LoginRequest": { "properties": { "email": { "type": "string", "title": "Email" }, "password": { "type": "string", "title": "Password" } }, "type": "object", "required": [ "email", "password" ], "title": "LoginRequest" }, "MarketplaceSearchParams": { "properties": { "gpu_model": { "type": "string", "title": "Gpu Model", "default": "" }, "min_vram_gb": { "type": "number", "title": "Min Vram Gb", "default": 0 }, "max_price_cents": { "type": "integer", "title": "Max Price Cents", "default": 0 }, "region": { "type": "string", "title": "Region", "default": "" }, "canada_only": { "type": "boolean", "title": "Canada Only", "default": false }, "sort_by": { "type": "string", "title": "Sort By", "default": "price" }, "limit": { "type": "integer", "title": "Limit", "default": 50 } }, "type": "object", "title": "MarketplaceSearchParams" }, "MfaSendSmsRequest": { "properties": { "challenge_id": { "type": "string", "title": "Challenge Id" } }, "type": "object", "required": [ "challenge_id" ], "title": "MfaSendSmsRequest" }, "MfaVerifyLogin": { "properties": { "challenge_id": { "type": "string", "title": "Challenge Id" }, "method": { "type": "string", "title": "Method" }, "code": { "type": "string", "title": "Code" } }, "type": "object", "required": [ "challenge_id", "method", "code" ], "title": "MfaVerifyLogin" }, "MiningAlert": { "properties": { "host_id": { "type": "string", "title": "Host Id" }, "gpu_index": { "type": "integer", "title": "Gpu Index" }, "confidence": { "type": "number", "title": "Confidence" }, "reason": { "type": "string", "title": "Reason" }, "timestamp": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "title": "Timestamp" } }, "type": "object", "required": [ "host_id", "gpu_index", "confidence", "reason" ], "title": "MiningAlert" }, "PIACheckRequest": { "properties": { "data_origin_province": { "type": "string", "title": "Data Origin Province", "default": "QC" }, "processing_province": { "type": "string", "title": "Processing Province", "default": "ON" }, "data_contains_pi": { "type": "boolean", "title": "Data Contains Pi", "default": false } }, "type": "object", "title": "PIACheckRequest" }, "PasskeyAuthenticateCompleteRequest": { "properties": { "state_id": { "type": "string", "title": "State Id" }, "credential": { "additionalProperties": true, "type": "object", "title": "Credential" } }, "type": "object", "required": [ "state_id", "credential" ], "title": "PasskeyAuthenticateCompleteRequest" }, "PasskeyAuthenticateOptionsRequest": { "properties": { "challenge_id": { "type": "string", "title": "Challenge Id" } }, "type": "object", "required": [ "challenge_id" ], "title": "PasskeyAuthenticateOptionsRequest" }, "PasskeyDeleteRequest": { "properties": { "method_id": { "type": "integer", "title": "Method Id" } }, "type": "object", "required": [ "method_id" ], "title": "PasskeyDeleteRequest" }, "PasskeyRegisterCompleteRequest": { "properties": { "state_id": { "type": "string", "title": "State Id" }, "credential": { "additionalProperties": true, "type": "object", "title": "Credential" } }, "type": "object", "required": [ "state_id", "credential" ], "title": "PasskeyRegisterCompleteRequest" }, "PasskeyRegisterRequest": { "properties": { "device_name": { "type": "string", "title": "Device Name", "default": "Security Key" } }, "type": "object", "title": "PasskeyRegisterRequest" }, "PasswordResetConfirm": { "properties": { "token": { "type": "string", "title": "Token" }, "new_password": { "type": "string", "title": "New Password" } }, "type": "object", "required": [ "token", "new_password" ], "title": "PasswordResetConfirm" }, "PasswordResetRequest": { "properties": { "email": { "type": "string", "title": "Email" } }, "type": "object", "required": [ "email" ], "title": "PasswordResetRequest" }, "PaymentIntentRequest": { "properties": { "customer_id": { "type": "string", "title": "Customer Id" }, "amount_cad": { "type": "number", "title": "Amount Cad" }, "description": { "type": "string", "title": "Description", "default": "Compute credits" } }, "type": "object", "required": [ "customer_id", "amount_cad" ], "title": "PaymentIntentRequest" }, "PoolHost": { "properties": { "host_id": { "type": "string", "title": "Host Id" }, "ip": { "type": "string", "title": "Ip" }, "gpu_model": { "type": "string", "title": "Gpu Model" }, "vram_gb": { "type": "number", "title": "Vram Gb" }, "cost_per_hour": { "type": "number", "title": "Cost Per Hour", "default": 0.2 }, "country": { "type": "string", "title": "Country", "default": "CA" } }, "type": "object", "required": [ "host_id", "ip", "gpu_model", "vram_gb" ], "title": "PoolHost" }, "PrivacyConfigRequest": { "properties": { "org_id": { "type": "string", "title": "Org Id" }, "privacy_level": { "type": "string", "title": "Privacy Level", "default": "strict" }, "privacy_officer_name": { "type": "string", "title": "Privacy Officer Name", "default": "" }, "privacy_officer_email": { "type": "string", "title": "Privacy Officer Email", "default": "" }, "enable_identification": { "type": "boolean", "title": "Enable Identification", "default": false }, "enable_location_tracking": { "type": "boolean", "title": "Enable Location Tracking", "default": false }, "enable_profiling": { "type": "boolean", "title": "Enable Profiling", "default": false }, "redact_pii_in_logs": { "type": "boolean", "title": "Redact Pii In Logs", "default": true }, "redact_env_vars": { "type": "boolean", "title": "Redact Env Vars", "default": true }, "redact_ip_addresses": { "type": "boolean", "title": "Redact Ip Addresses", "default": true }, "log_retention_days": { "type": "integer", "title": "Log Retention Days" }, "telemetry_retention_days": { "type": "integer", "title": "Telemetry Retention Days" } }, "type": "object", "required": [ "org_id" ], "title": "PrivacyConfigRequest" }, "ProfileUpdateRequest": { "properties": { "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Name" }, "role": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Role" }, "country": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Country" }, "province": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Province" } }, "type": "object", "title": "ProfileUpdateRequest" }, "ProviderRegisterRequest": { "properties": { "provider_id": { "type": "string", "title": "Provider Id" }, "email": { "type": "string", "title": "Email" }, "provider_type": { "type": "string", "title": "Provider Type", "default": "individual" }, "corporation_name": { "type": "string", "title": "Corporation Name", "default": "" }, "business_number": { "type": "string", "title": "Business Number", "default": "" }, "gst_hst_number": { "type": "string", "title": "Gst Hst Number", "default": "" }, "province": { "type": "string", "title": "Province", "default": "" }, "legal_name": { "type": "string", "title": "Legal Name", "default": "" } }, "type": "object", "required": [ "provider_id", "email" ], "title": "ProviderRegisterRequest" }, "RefundRequest": { "properties": { "job_id": { "type": "string", "title": "Job Id" }, "exit_code": { "type": "integer", "title": "Exit Code" }, "failure_reason": { "type": "string", "title": "Failure Reason", "default": "" } }, "type": "object", "required": [ "job_id", "exit_code" ], "title": "RefundRequest" }, "RegisterRequest": { "properties": { "email": { "type": "string", "title": "Email" }, "password": { "type": "string", "title": "Password" }, "name": { "type": "string", "title": "Name", "default": "" }, "role": { "type": "string", "title": "Role", "default": "submitter" } }, "type": "object", "required": [ "email", "password" ], "title": "RegisterRequest" }, "ResendVerificationRequest": { "properties": { "email": { "type": "string", "title": "Email" } }, "type": "object", "required": [ "email" ], "title": "ResendVerificationRequest" }, "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" }, "ReservedCommitmentRequest": { "properties": { "customer_id": { "type": "string", "title": "Customer Id" }, "gpu_model": { "type": "string", "title": "Gpu Model", "default": "RTX 4090" }, "commitment_type": { "type": "string", "title": "Commitment Type", "default": "1_month" }, "quantity": { "type": "integer", "title": "Quantity", "default": 1 }, "province": { "type": "string", "title": "Province", "default": "ON" } }, "type": "object", "required": [ "customer_id" ], "title": "ReservedCommitmentRequest" }, "RigListing": { "properties": { "host_id": { "type": "string", "title": "Host Id" }, "gpu_model": { "type": "string", "title": "Gpu Model" }, "vram_gb": { "type": "number", "title": "Vram Gb" }, "price_per_hour": { "type": "number", "title": "Price Per Hour" }, "description": { "type": "string", "title": "Description", "default": "" }, "owner": { "type": "string", "title": "Owner", "default": "anonymous" } }, "type": "object", "required": [ "host_id", "gpu_model", "vram_gb", "price_per_hour" ], "title": "RigListing" }, "SLAEnforceRequest": { "properties": { "host_id": { "type": "string", "title": "Host Id" }, "month": { "type": "string", "title": "Month" }, "tier": { "type": "string", "title": "Tier", "default": "community" }, "monthly_spend_cad": { "type": "number", "title": "Monthly Spend Cad", "default": 0.0 } }, "type": "object", "required": [ "host_id", "month" ], "title": "SLAEnforceRequest" }, "SlurmSubmitIn": { "properties": { "name": { "type": "string", "title": "Name" }, "vram_needed_gb": { "type": "number", "title": "Vram Needed Gb", "default": 0 }, "priority": { "type": "integer", "title": "Priority", "default": 0 }, "tier": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tier" }, "num_gpus": { "type": "integer", "title": "Num Gpus", "default": 1 }, "image": { "type": "string", "title": "Image", "default": "" }, "profile": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Profile" }, "dry_run": { "type": "boolean", "title": "Dry Run", "default": false } }, "type": "object", "required": [ "name" ], "title": "SlurmSubmitIn" }, "SmsSetupRequest": { "properties": { "phone_number": { "type": "string", "title": "Phone Number" } }, "type": "object", "required": [ "phone_number" ], "title": "SmsSetupRequest" }, "SmsVerifyRequest": { "properties": { "code": { "type": "string", "title": "Code" } }, "type": "object", "required": [ "code" ], "title": "SmsVerifyRequest" }, "SovereignQueueRequest": { "properties": { "canada_only": { "type": "boolean", "title": "Canada Only", "default": true }, "province": { "type": "string", "title": "Province" }, "trust_tier": { "type": "string", "title": "Trust Tier" } }, "type": "object", "title": "SovereignQueueRequest" }, "SpotJobIn": { "properties": { "name": { "type": "string", "maxLength": 128, "minLength": 1, "title": "Name" }, "vram_needed_gb": { "type": "number", "exclusiveMinimum": 0.0, "title": "Vram Needed Gb" }, "max_bid": { "type": "number", "exclusiveMinimum": 0.0, "title": "Max Bid" }, "priority": { "type": "integer", "maximum": 10.0, "minimum": 0.0, "title": "Priority", "default": 0 }, "tier": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Tier" } }, "type": "object", "required": [ "name", "vram_needed_gb", "max_bid" ], "title": "SpotJobIn" }, "StatusUpdate": { "properties": { "status": { "type": "string", "title": "Status" }, "host_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Host Id" }, "container_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Container Id" }, "container_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "title": "Container Name" } }, "type": "object", "required": [ "status" ], "title": "StatusUpdate" }, "TelemetryPayload": { "properties": { "host_id": { "type": "string", "title": "Host Id" }, "timestamp": { "type": "number", "title": "Timestamp", "default": 0 }, "metrics": { "additionalProperties": true, "type": "object", "title": "Metrics", "default": {} } }, "type": "object", "required": [ "host_id" ], "title": "TelemetryPayload" }, "TotpVerifyRequest": { "properties": { "code": { "type": "string", "title": "Code" }, "method_id": { "anyOf": [ { "type": "integer" }, { "type": "null" } ], "title": "Method Id" } }, "type": "object", "required": [ "code" ], "title": "TotpVerifyRequest" }, "UpdateTeamMemberRoleRequest": { "properties": { "role": { "type": "string", "title": "Role" } }, "type": "object", "required": [ "role" ], "title": "UpdateTeamMemberRoleRequest" }, "UploadRequest": { "properties": { "job_id": { "type": "string", "title": "Job Id" }, "filename": { "type": "string", "title": "Filename" }, "artifact_type": { "type": "string", "title": "Artifact Type", "default": "job_output" }, "residency_policy": { "type": "string", "title": "Residency Policy", "default": "canada_only" } }, "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" }, "VerificationGrant": { "properties": { "entity_id": { "type": "string", "title": "Entity Id" }, "verification_type": { "type": "string", "title": "Verification Type" } }, "type": "object", "required": [ "entity_id", "verification_type" ], "title": "VerificationGrant" }, "VerificationReportPayload": { "properties": { "host_id": { "type": "string", "title": "Host Id" }, "report": { "additionalProperties": true, "type": "object", "title": "Report" } }, "type": "object", "required": [ "host_id", "report" ], "title": "VerificationReportPayload" }, "VerifyEmailRequest": { "properties": { "token": { "type": "string", "title": "Token" } }, "type": "object", "required": [ "token" ], "title": "VerifyEmailRequest" }, "VerifyHostRequest": { "properties": { "gpu_info": { "additionalProperties": true, "type": "object", "title": "Gpu Info" }, "network_info": { "additionalProperties": true, "type": "object", "title": "Network Info" } }, "type": "object", "title": "VerifyHostRequest" }, "VersionReport": { "properties": { "host_id": { "type": "string", "title": "Host Id" }, "versions": { "additionalProperties": true, "type": "object", "title": "Versions" } }, "type": "object", "required": [ "host_id", "versions" ], "title": "VersionReport" }, "VolumeAttachRequest": { "properties": { "instance_id": { "type": "string", "title": "Instance Id" }, "mount_path": { "type": "string", "title": "Mount Path", "default": "/workspace" }, "mode": { "type": "string", "title": "Mode", "default": "rw" } }, "type": "object", "required": [ "instance_id" ], "title": "VolumeAttachRequest" }, "VolumeCreate": { "properties": { "name": { "type": "string", "title": "Name" }, "size_gb": { "type": "integer", "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" }, "api__ConsentRequest__1": { "properties": { "entity_id": { "type": "string", "title": "Entity Id" }, "consent_type": { "type": "string", "title": "Consent Type" }, "details": { "additionalProperties": true, "type": "object", "title": "Details" } }, "type": "object", "required": [ "entity_id", "consent_type" ], "title": "ConsentRequest" }, "api__ConsentRequest__2": { "properties": { "purpose": { "type": "string", "title": "Purpose" }, "consent_type": { "type": "string", "title": "Consent Type", "default": "express" } }, "type": "object", "required": [ "purpose" ], "title": "ConsentRequest" } }, "securitySchemes": { "BearerAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "API token from your Xcelsior dashboard. Pass as: Authorization: Bearer " } } }, "tags": [ { "name": "Hosts", "description": "GPU host registration, admission gating, and management." }, { "name": "Jobs", "description": "Job submission, scheduling, and lifecycle management." }, { "name": "Billing", "description": "Wallet management, invoicing, CAF exports, refunds. Credit-first CAD billing." }, { "name": "Marketplace", "description": "Rig listings, browsing, and marketplace billing." }, { "name": "Spot Pricing", "description": "Dynamic spot pricing, interruptible jobs, preemption cycles." }, { "name": "Reputation", "description": "Trust scoring, verification tiers (Bronze\u2192Platinum), leaderboards." }, { "name": "Verification", "description": "Automated hardware attestation: GPU identity, CUDA, thermals, network." }, { "name": "SLA", "description": "Service Level Agreement enforcement, uptime tracking, credit calculation." }, { "name": "Providers", "description": "Stripe Connect onboarding, Canadian company registration, payouts." }, { "name": "Artifacts", "description": "Presigned upload/download URLs for model weights, checkpoints, outputs." }, { "name": "Jurisdiction", "description": "Canada-first scheduling, province filtering, data residency traces." }, { "name": "Compliance", "description": "Province compliance matrix, tax rates, Quebec PIA checks." }, { "name": "Privacy", "description": "PIPEDA consent management, retention policies, privacy officer config." }, { "name": "Transparency", "description": "Legal request handling, CLOUD Act canary, transparency reports." }, { "name": "Telemetry", "description": "Real-time GPU metrics: utilization, temperature, memory, power." }, { "name": "Agent", "description": "Worker agent endpoints: work assignment, leases, benchmarks, mining alerts." }, { "name": "Autoscale", "description": "Auto-scaling pool management and provisioning cycles." }, { "name": "Events", "description": "Event sourcing, state machine transitions, audit trail." }, { "name": "Infrastructure", "description": "Health checks, readiness probes, metrics, SSE streaming, dashboard." }, { "name": "Marketplace v2", "description": "GPU marketplace offers, allocations, spot pricing, reservations." }, { "name": "Volumes", "description": "Persistent volume lifecycle management." }, { "name": "Cloud Burst", "description": "Cloud provider burst auto-scaling." }, { "name": "Inference v2", "description": "Production serverless inference with OpenAI-compatible API." } ], "security": [ { "BearerAuth": [] } ] }