Create and provision a provider-routed training session.
request_id is the session-creation idempotency key. provider: auto
uses preferences then Whitney’s provider order. The returned capability
snapshot is immutable for the session. Modal idle TTL is capped by the
runtime’s trainer lifetime even when a larger value is requested.
POST
/
v1
/
training
/
sessions
Create and provision a provider-routed training session.
Optional immutable session ceiling in micro-USD. A request value replaces the organization default and is reserved exactly. If both are absent, a platform-funded session atomically reserves up to $100 of remaining organization headroom without crossing the shared -$100 credit floor. BYOK sessions may remain null while time and lease bounds still apply.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Whitney","description":"Build caller-owned training loops with the Whitney HTTP API.","colors":{"primary":"#18181b","light":"#3f3f46","dark":"#fafafa"},"logo":{"light":"https://mintcdn.com/whitney-ai/31oF5lBZ51KYlN_v/logo.png?fit=max\u0026auto=format\u0026n=31oF5lBZ51KYlN_v\u0026q=85\u0026s=2834a6f45fc024ab73570b4179951fb9","dark":"https://mintcdn.com/whitney-ai/31oF5lBZ51KYlN_v/logo.png?fit=max\u0026auto=format\u0026n=31oF5lBZ51KYlN_v\u0026q=85\u0026s=2834a6f45fc024ab73570b4179951fb9","href":"/"},"api":{"playground":{"display":"interactive"},"examples":{"languages":["curl","python","javascript"]}},"footer":{"socials":{"x":"https://x.com/try_whitney","linkedin":"https://www.linkedin.com/company/whitney-ai"}},"seo":{"metatags":{"robots":"noindex, nofollow"}},"contextual":{"options":["copy","view","mcp","cursor","vscode","download-spec"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"whitney-ai","hasAudioNarration":false,"actualSubdomain":"whitney-ai","customDomains":["staging.docs.trywhitney.com"],"gitSource":{"type":"github","owner":"whitney-ai","repo":"lonepine","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6a9dff02b6b8641bb5563466","collectionId":"106bed20-47df-437d-85f6-8e8de33ded44","liveDeploymentHistoryId":"6a9dff02b6b8641bb5563466","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6a9dff02b6b8641bb5563466","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"API Reference","count":28},{"language":"default","tag":"unified-training","count":28},{"language":"default","tag":"Guides","count":17},{"language":"default","tag":"Cookbooks","count":6},{"language":"default","tag":"Distillation","count":4},{"language":"default","tag":"How it works","count":3},{"language":"default","tag":"Get started","count":3},{"language":"default","tag":"Coding agents","count":1}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/unified-training/create-and-provision-a-provider-routed-training-session","slug":"/api-reference/unified-training/create-and-provision-a-provider-routed-training-session","pageMetadata":{"title":"Create and provision a provider-routed training session.","description":"`request_id` is the session-creation idempotency key. `provider: auto`\nuses preferences then Whitney's provider order. The returned capability\nsnapshot is immutable for the session. Modal idle TTL is capped by the\nruntime's trainer lifetime even when a larger value is requested.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/training/sessions","href":"/api-reference/unified-training/create-and-provision-a-provider-routed-training-session","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [_jsx(_components.code, {\n children: \"request_id\"\n }), \" is the session-creation idempotency key. \", _jsx(_components.code, {\n children: \"provider: auto\"\n }), \"\\nuses preferences then Whitney’s provider order. The returned capability\\nsnapshot is immutable for the session. Modal idle TTL is capped by the\\nruntime’s trainer lifetime even when a larger value is requested.\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create and provision a provider-routed training session.","description":"`request_id` is the session-creation idempotency key. `provider: auto`\nuses preferences then Whitney's provider order. The returned capability\nsnapshot is immutable for the session. Modal idle TTL is capped by the\nruntime's trainer lifetime even when a larger value is requested.\n","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/training/sessions","href":"/api-reference/unified-training/create-and-provision-a-provider-routed-training-session","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"createTrainingSession","tags":["unified-training"],"summary":"Create and provision a provider-routed training session.","description":"`request_id` is the session-creation idempotency key. `provider: auto`\nuses preferences then Whitney's provider order. The returned capability\nsnapshot is immutable for the session. Modal idle TTL is capped by the\nruntime's trainer lifetime even when a larger value is requested.\n","requestBody":"ee5743c9-1933-4bea-85bb-408f02ce2bcc","responses":{"202":"d843982c-4888-4942-ab85-2ae7ed830ea0","default":"1992b14b-e049-4fc5-a872-ec829c78589b"},"method":"post","type":"path","servers":["96e481fd-899f-48e9-89df-d5e034dd1c24","ce30c90c-3171-4297-a375-dcb07251f5e4","b815a73a-d1eb-49f5-9cd5-ab9899a39804"],"security":["9dcc3350-b07b-4961-9f03-9a7ded9ff8ab"],"path":"/v1/training/sessions","baseUrlOptions":["http://localhost:3001","https://api.staging.trywhitney.com","https://api.trywhitney.com"],"title":"Create and provision a provider-routed training session.","codeSamples":[],"requestExampleLanguages":["bash","python","javascript"],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["request_id"],"properties":{"request_id":{"type":"string","minLength":1,"maxLength":200,"isRequired":true,"uniqueKey":"request_id","typeLabel":"string"},"provider":{"type":"string","enum":["auto","modal","tinker"],"default":"auto","uniqueKey":"provider","typeLabel":"enum\u003cstring>"},"provider_preferences":{"type":"array","maxItems":2,"items":{"type":"string","enum":["modal","tinker"],"uniqueKey":"provider_preferences.items.[INDEX]","typeLabel":"enum\u003cstring>"},"uniqueKey":"provider_preferences","typeLabel":"enum\u003cstring>[]"},"funding_preference":{"type":"string","enum":["auto","platform","byok"],"default":"auto","uniqueKey":"funding_preference","typeLabel":"enum\u003cstring>"},"credential_id":{"oneOf":[{"type":"string","minLength":1,"maxLength":200,"uniqueKey":"credential_id.oneOf.0","typeLabel":"string"},{"type":"null","minLength":1,"maxLength":200,"uniqueKey":"credential_id.oneOf.1","typeLabel":"null"}],"uniqueKey":"credential_id","typeLabel":"string | null"},"max_cost_microusd":{"oneOf":[{"type":"integer","minimum":1,"description":"Optional immutable session ceiling in micro-USD. A request value replaces the organization default and is reserved exactly. If both are absent, a platform-funded session atomically reserves up to $100 of remaining organization headroom without crossing the shared -$100 credit floor. BYOK sessions may remain null while time and lease bounds still apply.","uniqueKey":"max_cost_microusd.oneOf.0","typeLabel":"integer"},{"type":"null","minimum":1,"description":"Optional immutable session ceiling in micro-USD. A request value replaces the organization default and is reserved exactly. If both are absent, a platform-funded session atomically reserves up to $100 of remaining organization headroom without crossing the shared -$100 credit floor. BYOK sessions may remain null while time and lease bounds still apply.","uniqueKey":"max_cost_microusd.oneOf.1","typeLabel":"null"}],"uniqueKey":"max_cost_microusd","typeLabel":"integer | null"},"idle_ttl_s":{"oneOf":[{"type":"integer","minimum":60,"maximum":86400,"uniqueKey":"idle_ttl_s.oneOf.0","typeLabel":"integer"},{"type":"null","minimum":60,"maximum":86400,"uniqueKey":"idle_ttl_s.oneOf.1","typeLabel":"null"}],"uniqueKey":"idle_ttl_s","typeLabel":"integer | null"},"metadata":{"type":"object","maxProperties":32,"additionalProperties":{"type":"string","uniqueKey":"metadata.additionalProperties","typeLabel":"string"},"uniqueKey":"metadata","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"request_id":"\u003cstring>","provider":"auto","provider_preferences":[],"funding_preference":"auto","credential_id":"\u003cstring>","max_cost_microusd":2,"idle_ttl_s":43230,"metadata":{}}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"d843982c-4888-4942-ab85-2ae7ed830ea0":{"description":"The session was created or an idempotent equivalent was returned.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["id","status","provider","funding_source","lease_epoch","lease_expires_at","max_cost_microusd","error_code","capability","capability_snapshot","created_at","updated_at"],"properties":{"id":{"type":"string","pattern":"^wts_[0-9a-f]{32}$","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"status":{"type":"string","enum":["provisioning","ready","failed","closing","closed","interrupted","timed_out"],"isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"provider":{"type":"string","enum":["modal","tinker"],"isRequired":true,"uniqueKey":"provider","typeLabel":"enum\u003cstring>"},"funding_source":{"type":"string","enum":["platform","byok"],"isRequired":true,"uniqueKey":"funding_source","typeLabel":"enum\u003cstring>"},"lease_epoch":{"type":"integer","minimum":0,"isRequired":true,"uniqueKey":"lease_epoch","typeLabel":"integer"},"lease_expires_at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"lease_expires_at","typeLabel":"string\u003cdate-time>"},"max_cost_microusd":{"oneOf":[{"type":"integer","isRequired":true,"uniqueKey":"max_cost_microusd.oneOf.0","typeLabel":"integer"},{"type":"null","isRequired":true,"uniqueKey":"max_cost_microusd.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"max_cost_microusd","typeLabel":"integer | null"},"error_code":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"error_code.oneOf.0","typeLabel":"string"},{"type":"null","isRequired":true,"uniqueKey":"error_code.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"error_code","typeLabel":"string | null"},"capability":{"type":"object","additionalProperties":false,"required":["provider","models","operations","sampler_operations","resource_profiles","billing_snapshot"],"properties":{"provider":{"type":"string","enum":["modal","tinker"],"isRequired":true,"uniqueKey":"capability.provider","typeLabel":"enum\u003cstring>"},"models":{"type":"array","items":{"type":"string","uniqueKey":"capability.models.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"capability.models","typeLabel":"string[]"},"operations":{"type":"array","items":{"type":"string","uniqueKey":"capability.operations.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"capability.operations","typeLabel":"string[]"},"sampler_operations":{"type":"array","items":{"type":"string","uniqueKey":"capability.sampler_operations.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"capability.sampler_operations","typeLabel":"string[]"},"resource_profiles":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"capability.resource_profiles.additionalProperties.additionalProperties","typeLabel":"string"},"uniqueKey":"capability.resource_profiles.additionalProperties","typeLabel":"object"},"isRequired":true,"uniqueKey":"capability.resource_profiles","typeLabel":"object"},"billing_snapshot":{"type":"object","description":"Immutable provider pricing and conservative spend-guard inputs frozen at session creation.","additionalProperties":true,"isRequired":true,"uniqueKey":"capability.billing_snapshot","typeLabel":"object"}},"isRequired":true,"uniqueKey":"capability","typeLabel":"object"},"capability_snapshot":{"type":"object","additionalProperties":false,"required":["provider","models","operations","sampler_operations","resource_profiles","billing_snapshot"],"properties":{"provider":{"type":"string","enum":["modal","tinker"],"isRequired":true,"uniqueKey":"capability_snapshot.provider","typeLabel":"enum\u003cstring>"},"models":{"type":"array","items":{"type":"string","uniqueKey":"capability_snapshot.models.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"capability_snapshot.models","typeLabel":"string[]"},"operations":{"type":"array","items":{"type":"string","uniqueKey":"capability_snapshot.operations.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"capability_snapshot.operations","typeLabel":"string[]"},"sampler_operations":{"type":"array","items":{"type":"string","uniqueKey":"capability_snapshot.sampler_operations.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"capability_snapshot.sampler_operations","typeLabel":"string[]"},"resource_profiles":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"string","uniqueKey":"capability_snapshot.resource_profiles.additionalProperties.additionalProperties","typeLabel":"string"},"uniqueKey":"capability_snapshot.resource_profiles.additionalProperties","typeLabel":"object"},"isRequired":true,"uniqueKey":"capability_snapshot.resource_profiles","typeLabel":"object"},"billing_snapshot":{"type":"object","description":"Immutable provider pricing and conservative spend-guard inputs frozen at session creation.","additionalProperties":true,"isRequired":true,"uniqueKey":"capability_snapshot.billing_snapshot","typeLabel":"object"}},"isRequired":true,"uniqueKey":"capability_snapshot","typeLabel":"object"},"created_at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"type":"string","format":"date-time","isRequired":true,"uniqueKey":"updated_at","typeLabel":"string\u003cdate-time>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"\u003cstring>","status":"provisioning","provider":"modal","funding_source":"platform","lease_epoch":1,"lease_expires_at":"2023-11-07T05:31:56Z","max_cost_microusd":123,"error_code":"\u003cstring>","capability":{"provider":"modal","models":["\u003cstring>"],"operations":["\u003cstring>"],"sampler_operations":["\u003cstring>"],"resource_profiles":{},"billing_snapshot":{}},"capability_snapshot":{"provider":"modal","models":["\u003cstring>"],"operations":["\u003cstring>"],"sampler_operations":["\u003cstring>"],"resource_profiles":{},"billing_snapshot":{}},"created_at":"2023-11-07T05:31:56Z","updated_at":"2023-11-07T05:31:56Z"}}},"exampleType":"generated"}},"exampleType":"generated"},"1992b14b-e049-4fc5-a872-ec829c78589b":{"description":"Whitney API error envelope.","content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["error"],"properties":{"error":{"type":"object","additionalProperties":false,"required":["code","message"],"properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"error.code","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"request_id":{"type":"string","uniqueKey":"request_id","typeLabel":"string"},"funding_source":{"type":"string","enum":["platform","byok"],"uniqueKey":"funding_source","typeLabel":"enum\u003cstring>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"\u003cstring>","message":"\u003cstring>"},"request_id":"\u003cstring>","funding_source":"platform"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"9dcc3350-b07b-4961-9f03-9a7ded9ff8ab":{"WhitneyApiKey":{"type":"http","scheme":"bearer","bearerFormat":"whitney_test_|whitney_live_","description":"Whitney-issued API key. No organization-selection header is accepted.","scopes":[]}}},"servers":{"96e481fd-899f-48e9-89df-d5e034dd1c24":{"url":"http://localhost:3001","description":"Local API"},"ce30c90c-3171-4297-a375-dcb07251f5e4":{"url":"https://api.staging.trywhitney.com","description":"Staging API"},"b815a73a-d1eb-49f5-9cd5-ab9899a39804":{"url":"https://api.trywhitney.com","description":"Production API"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"whitney_test_|whitney_live_","description":"Whitney-issued API key. No organization-selection header is accepted.","scopes":[]},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Whitney-issued API key. No organization-selection header is accepted.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"WhitneyApiKey","name":"Authorization"}],"title":"WhitneyApiKey"}]},"originalFileLocation":"openapi.yaml"},"subdomain":"whitney-ai","siteName":"Whitney","title":"Create and provision a provider-routed training session. - Whitney","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-03T18:51:47.382Z","originalFileLocation":"api-reference/unified-training/create-and-provision-a-provider-routed-training-session.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"request_id is the session-creation idempotency key. provider: auto uses preferences then Whitney\u0026#x27;s provider order. The returned capability snapshot is immutable for the session. Modal idle TTL is capped by the runtime\u0026#x27;s trainer lifetime even when a larger value is requested.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Whitney\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003cmeta data-mint-head name=\"robots\" content=\"noindex, nofollow\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/whitney-ai/_generated/favicon/apple-touch-icon.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/whitney-ai/_generated/favicon/favicon-32x32.png?v=3\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/whitney-ai/_generated/favicon/favicon-16x16.png?v=3\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/whitney-ai/_generated/favicon/favicon.ico?v=3\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create and provision a provider-routed training session. - Whitney\">\u003cmeta data-mint-head property=\"og:description\" content=\"request_id is the session-creation idempotency key. provider: auto uses preferences then Whitney\u0026#x27;s provider order. The returned capability snapshot is immutable for the session. Modal idle TTL is capped by the runtime\u0026#x27;s trainer lifetime even when a larger value is requested.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Whitney\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://staging.docs.trywhitney.com/api-reference/unified-training/create-and-provision-a-provider-routed-training-session\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://whitney-ai.mintlify.app/_mintlify/api/og/v2?division=unified-training\u0026amp;title=Create+and+provision+a+provider-routed+training+session.\u0026amp;description=%60request_id%60+is+the+session-creation+idempotency+key.+%60provider%3A+auto%60%0Auses+preferences+then+Whitney%27s+provider+order.+The+returned+capability%0Asnapshot+is+immut\u0026amp;theme=72f845fa4fed9e550803d595\u0026amp;signature=1711a344db64819002b1bff9526d297c7004308e57e07f38966f6ab980dc8737\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create and provision a provider-routed training session. - Whitney\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"request_id is the session-creation idempotency key. provider: auto uses preferences then Whitney\u0026#x27;s provider order. The returned capability snapshot is immutable for the session. Modal idle TTL is capped by the runtime\u0026#x27;s trainer lifetime even when a larger value is requested.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://whitney-ai.mintlify.app/_mintlify/api/og/v2?division=unified-training\u0026amp;title=Create+and+provision+a+provider-routed+training+session.\u0026amp;description=%60request_id%60+is+the+session-creation+idempotency+key.+%60provider%3A+auto%60%0Auses+preferences+then+Whitney%27s+provider+order.+The+returned+capability%0Asnapshot+is+immut\u0026amp;theme=72f845fa4fed9e550803d595\u0026amp;signature=1711a344db64819002b1bff9526d297c7004308e57e07f38966f6ab980dc8737\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"https://mintlify.s3.us-west-1.amazonaws.com/whitney-ai/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Whitney\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#18181b\">\u003clink data-mint-head rel=\"canonical\" href=\"https://staging.docs.trywhitney.com/api-reference/unified-training/create-and-provision-a-provider-routed-training-session\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/unified-training/create-and-provision-a-provider-routed-training-session.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://staging.docs.trywhitney.com/#organization\",\"name\":\"Whitney\",\"url\":\"https://staging.docs.trywhitney.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/whitney-ai/31oF5lBZ51KYlN_v/logo.png?fit=max\u0026auto=format\u0026n=31oF5lBZ51KYlN_v\u0026q=85\u0026s=2834a6f45fc024ab73570b4179951fb9\"}},{\"@type\":\"WebSite\",\"@id\":\"https://staging.docs.trywhitney.com#website\",\"name\":\"Whitney\",\"url\":\"https://staging.docs.trywhitney.com\",\"publisher\":{\"@id\":\"https://staging.docs.trywhitney.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://staging.docs.trywhitney.com/api-reference/unified-training/create-and-provision-a-provider-routed-training-session#webpage\",\"url\":\"https://staging.docs.trywhitney.com/api-reference/unified-training/create-and-provision-a-provider-routed-training-session\",\"name\":\"Create and provision a provider-routed training session.\",\"description\":\"request_id is the session-creation idempotency key. provider: auto uses preferences then Whitney's provider order. The returned capability snapshot is immutable for the session. Modal idle TTL is capped by the runtime's trainer lifetime even when a larger value is requested.\",\"dateModified\":\"2026-09-03T18:51:47.382Z\",\"isPartOf\":{\"@id\":\"https://staging.docs.trywhitney.com#website\"},\"breadcrumb\":{\"@id\":\"https://staging.docs.trywhitney.com/api-reference/unified-training/create-and-provision-a-provider-routed-training-session#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://staging.docs.trywhitney.com/api-reference/unified-training/create-and-provision-a-provider-routed-training-session#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"unified-training\",\"item\":\"https://staging.docs.trywhitney.com/api-reference/unified-training/list-supported-providermodel-pairs-and-primitive-capabilities\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create and provision a provider-routed training session.\",\"item\":\"https://staging.docs.trywhitney.com/api-reference/unified-training/create-and-provision-a-provider-routed-training-session\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://staging.docs.trywhitney.com/api-reference/unified-training/create-and-provision-a-provider-routed-training-session#apireference\",\"headline\":\"Create and provision a provider-routed training session.\",\"name\":\"Create and provision a provider-routed training session.\",\"description\":\"request_id is the session-creation idempotency key. provider: auto uses preferences then Whitney's provider order. The returned capability snapshot is immutable for the session. Modal idle TTL is capped by the runtime's trainer lifetime even when a larger value is requested.\",\"url\":\"https://staging.docs.trywhitney.com/api-reference/unified-training/create-and-provision-a-provider-routed-training-session\",\"mainEntityOfPage\":{\"@id\":\"https://staging.docs.trywhitney.com/api-reference/unified-training/create-and-provision-a-provider-routed-training-session#webpage\"},\"dateModified\":\"2026-09-03T18:51:47.382Z\",\"publisher\":{\"@id\":\"https://staging.docs.trywhitney.com/#organization\"},\"isPartOf\":{\"@id\":\"https://staging.docs.trywhitney.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Whitney\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Whitney","nav":{"global":null,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":""}]},{"tab":"API Reference","groups":[{"group":"unified-training","pages":[{"title":"List supported provider/model pairs and primitive capabilities.","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/training/capabilities","href":"/api-reference/unified-training/list-supported-providermodel-pairs-and-primitive-capabilities"},{"title":"List this organization's training sessions.","description":null,"deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/training/sessions","href":"/api-reference/unified-training/list-this-organizations-training-sessions"},{"title":"Create and provision a provider-routed training session.","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/training/sessions","href":"/api-reference/unified-training/create-and-provision-a-provider-routed-training-session"},{"title":"Get v1trainingsessions","description":null,"deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/training/sessions/{session_id}","href":"/api-reference/unified-training/get-v1trainingsessions"},{"title":"Extend a live session's provider lease.","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/training/sessions/{session_id}/heartbeat","href":"/api-reference/unified-training/extend-a-live-sessions-provider-lease"},{"title":"Create and provision the session's one training run.","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/training/sessions/{session_id}/runs","href":"/api-reference/unified-training/create-and-provision-the-sessions-one-training-run"},{"title":"Idempotently release provider resources for a session.","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/training/sessions/{session_id}/close","href":"/api-reference/unified-training/idempotently-release-provider-resources-for-a-session"},{"title":"List usage observations, reconciling provider billing when possible.","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/training/sessions/{session_id}/usage","href":"/api-reference/unified-training/list-usage-observations-reconciling-provider-billing-when-possible"},{"title":"Return cost status and usage components for a session.","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/training/sessions/{session_id}/cost","href":"/api-reference/unified-training/return-cost-status-and-usage-components-for-a-session"},{"title":"Get v1trainingruns","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/training/runs","href":"/api-reference/unified-training/get-v1trainingruns"},{"title":"Get v1trainingruns 1","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/training/runs/{run_id}","href":"/api-reference/unified-training/get-v1trainingruns-1"},{"title":"List durable operation summaries in sequence order.","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/training/runs/{run_id}/operations","href":"/api-reference/unified-training/list-durable-operation-summaries-in-sequence-order"},{"title":"Submit an ordered training primitive.","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/training/runs/{run_id}/operations","href":"/api-reference/unified-training/submit-an-ordered-training-primitive"},{"title":"Poll the durable status of an operation.","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/training/operations/{operation_id}","href":"/api-reference/unified-training/poll-the-durable-status-of-an-operation"},{"title":"Retrieve a completed raw result while it remains available at the origin.","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/training/operations/{operation_id}/result","href":"/api-reference/unified-training/retrieve-a-completed-raw-result-while-it-remains-available-at-the-origin"},{"title":"Submit the ordered terminal finish transition.","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/training/runs/{run_id}/finish","href":"/api-reference/unified-training/submit-the-ordered-terminal-finish-transition"},{"title":"Preempt a current primitive and submit a terminal cancel transition.","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/training/runs/{run_id}/cancel","href":"/api-reference/unified-training/preempt-a-current-primitive-and-submit-a-terminal-cancel-transition"},{"title":"List resume and sampler checkpoint metadata for a run.","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/training/runs/{run_id}/checkpoints","href":"/api-reference/unified-training/list-resume-and-sampler-checkpoint-metadata-for-a-run"},{"title":"Get v1trainingcheckpoints","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/training/checkpoints/{checkpoint_id}","href":"/api-reference/unified-training/get-v1trainingcheckpoints"},{"title":"List downloadable or exportable run artifacts.","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/training/runs/{run_id}/artifacts","href":"/api-reference/unified-training/list-downloadable-or-exportable-run-artifacts"},{"title":"Get v1trainingartifacts","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/training/artifacts/{artifact_id}","href":"/api-reference/unified-training/get-v1trainingartifacts"},{"title":"Create a signed, time-limited download for an available artifact.","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/training/artifacts/{artifact_id}/download","href":"/api-reference/unified-training/create-a-signed-time-limited-download-for-an-available-artifact"},{"title":"Publish a completed LoRA artifact to a customer Hugging Face repository.","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/training/runs/{run_id}/exports","href":"/api-reference/unified-training/publish-a-completed-lora-artifact-to-a-customer-hugging-face-repository"},{"title":"Retire a terminal run's artifact prefix.","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/training/runs/{run_id}/retire","href":"/api-reference/unified-training/retire-a-terminal-runs-artifact-prefix"},{"title":"Read persisted training metrics and W\u0026B-derived summaries.","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/training/runs/{run_id}/metrics","href":"/api-reference/unified-training/read-persisted-training-metrics-and-w\u0026b-derived-summaries"},{"title":"List durable lifecycle events for a run.","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/training/runs/{run_id}/events","href":"/api-reference/unified-training/list-durable-lifecycle-events-for-a-run"},{"title":"Get lazy sampler state and synchronized weight version.","deprecated":null,"version":null,"openapi":"/openapi.yaml get /v1/training/samplers/{sampler_id}","href":"/api-reference/unified-training/get-lazy-sampler-state-and-synchronized-weight-version"},{"title":"Submit an ordered sample or logprobs primitive.","deprecated":null,"version":null,"openapi":"/openapi.yaml post /v1/training/samplers/{sampler_id}/operations","href":"/api-reference/unified-training/submit-an-ordered-sample-or-logprobs-primitive"}]}]}]},"basePath":"","title":"Create and provision a provider-routed training session. - Whitney","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CS552b7R.js","utils-DDTCYAF2.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-De8ttokP.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DrwRDvAh.js","snippetPresets-DtAN0nWx.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-D5rWArI6.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-O2i12wsz.js","shallow-DV8xABTt.js","getApiPlaygroundDisplay-DBZ0B5Jx.js","CodeSnippet-BVi0tPUX.js","CodeSnippets-CqASbIwY.js","Page-m07pfKpT.js","getPastedJson-DG9vsMS8.js","icon-CXzRSCr8.js","MethodPill-BdKVtEuX.js","DuplicateIcon-CZlmBrJI.js","createIcon-biFEUKPL.js","DynamicMarkdown-B54_zNBF.js","SectionHeading-DwwHK3Pt.js","axios-vUo_bRtp.js","Markdown-DfhCTwyA.js","clsx-xpJZXxdP.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-BTZUMDnx.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-DqdKa2R4.js"]}