How long to wait before asking again. Absent once the job has finished — there is nothing further to wait for, and a client that honours this stops polling.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"MathFi.ai","colors":{"primary":"#0D5E4F","light":"#4ADE80","dark":"#0D5E4F"},"logo":{"light":"https://mintcdn.com/mathficast/obGjwhvkcHRG-84d/logo/light.svg?fit=max\u0026auto=format\u0026n=obGjwhvkcHRG-84d\u0026q=85\u0026s=0d58083744fd1f821588093372fdf5bf","dark":"https://mintcdn.com/mathficast/obGjwhvkcHRG-84d/logo/dark.svg?fit=max\u0026auto=format\u0026n=obGjwhvkcHRG-84d\u0026q=85\u0026s=19477dd054446b9035d2b5a62c2f9053","href":"https://mathfi.ai"},"favicon":"https://mintcdn.com/mathficast/obGjwhvkcHRG-84d/favicon.svg?fit=max\u0026auto=format\u0026n=obGjwhvkcHRG-84d\u0026q=85\u0026s=cda0bc0ee08c401c35cb53e3635d4ffa","api":{"examples":{"languages":["curl","python"]}},"navbar":{},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"mathficast","hasAudioNarration":false,"actualSubdomain":"mathficast","customDomains":["docs.mathfi.ai"],"gitSource":{"type":"github","owner":"mathfi-ai","repo":"mathfi-ai-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ad385e785ceb1c912c842c7","collectionId":"7643eed5-d1ae-4c8a-855f-a54304d6c976","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ad385e785ceb1c912c842c7"},"entitlements":{},"buildId":"6ad385e785ceb1c912c842c7","clientVersion":"0.0.4054","searchFilterCounts":[{"language":"default","tag":"API Reference","count":33},{"language":"default","tag":"Model Crucible","count":20},{"language":"default","tag":"Documentation","count":11},{"language":"default","tag":"Feature Refinery","count":8},{"language":"default","tag":"Training","count":7},{"language":"default","tag":"Getting started","count":7},{"language":"default","tag":"Predictions","count":6},{"language":"default","tag":"Datasets","count":5},{"language":"default","tag":"Guides","count":3},{"language":"default","tag":"Use cases","count":3}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":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},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/training/cancel-training-job","slug":"/api-reference/training/cancel-training-job","pageMetadata":{"title":"Cancel a training job","openapi":"api-reference/openapi.yaml PATCH /api/v1/training/{trainingJobKey}/cancel","description":"Cancel a training job given its key","href":"/api-reference/training/cancel-training-job"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Cancel a training job given its key\"\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":"Cancel a training job","openapi":"api-reference/openapi.yaml PATCH /api/v1/training/{trainingJobKey}/cancel","description":"Cancel a training job given its key","href":"/api-reference/training/cancel-training-job"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["Training"],"summary":"Cancel a training job","description":"Cancel a training job given its key","operationId":"cancelTrainingJob","parameters":["433961d7-825c-439a-8c77-9e5d5dd49d51"],"responses":{"200":"383a3552-fee5-4e07-9e30-f785e3a2643c","400":"8ba5963f-ea12-4c5b-9553-f06e50e05ad0","404":"aaaeea62-6a93-4955-910d-8c2df0ac8eca","500":"b716fec4-3311-4275-9174-1594e91090aa"},"method":"patch","type":"path","servers":["0215795f-7d3c-442e-bfcb-454b8d8c6f91"],"security":["2c19ac19-2b76-4d55-b5ab-dc0439ed3ca2"],"path":"/api/v1/training/{trainingJobKey}/cancel","baseUrlOptions":["https://{tenant}-api.mathfi.ai"],"title":"Cancel a training job","codeSamples":[],"requestExampleLanguages":["bash","python"],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"433961d7-825c-439a-8c77-9e5d5dd49d51":{"name":"trainingJobKey","in":"path","required":true,"schema":{"type":"string","format":"uuid","isRequired":true,"uniqueKey":"","typeLabel":"string\u003cuuid>"}}},"responses":{"383a3552-fee5-4e07-9e30-f785e3a2643c":{"description":"Training job cancelling successful response","content":{"application/json":{"schema":{"required":["status"],"type":"object","properties":{"status":{"type":"string","description":"Status of training: \n\n* `PENDING` - The training job has been created and is pending execution\n* `RUNNING` - The training job is currently executing and progressing\n* `COMPLETED` - The training job has completed execution successfully, reaching the target performance. A model has been generated. \n* `TIMED_OUT` - The training job could not reach the target performance in the configured \n* `CANCELLED` - The training job has been cancelled by the user \n* `NOT_COMPLETED` - The training job has stalled without making progress in a specified timeframe\n* `FAILED` - The training job has failed due to an error\n","enum":["PENDING","RUNNING","COMPLETED","TIMED_OUT","CANCELLED","FAILED","NOT_COMPLETED"],"isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"targetPerformance":{"type":"number","format":"double","uniqueKey":"targetPerformance","typeLabel":"number\u003cdouble>"},"jobs":{"type":"array","items":{"type":"object","properties":{"trainingJobKey":{"type":"string","format":"uuid","uniqueKey":"jobs.items.[INDEX].trainingJobKey","typeLabel":"string\u003cuuid>"},"attemptNumber":{"oneOf":[{"description":"Which of the job's attempts this is, counting from one. Present where a job runs many attempts rather than one job per algorithm — the attempts have no key of their own.","type":"integer","uniqueKey":"jobs.items.[INDEX].attemptNumber.oneOf.0","typeLabel":"integer"},{"description":"Which of the job's attempts this is, counting from one. Present where a job runs many attempts rather than one job per algorithm — the attempts have no key of their own.","type":"null","uniqueKey":"jobs.items.[INDEX].attemptNumber.oneOf.1","typeLabel":"null"}],"uniqueKey":"jobs.items.[INDEX].attemptNumber","typeLabel":"integer | null"},"algorithm":{"type":"string","uniqueKey":"jobs.items.[INDEX].algorithm","typeLabel":"string"},"status":{"type":"string","description":"Status of training: \n\n* `PENDING` - The training job has been created and is pending execution\n* `RUNNING` - The training job is currently executing and progressing\n* `COMPLETED` - The training job has completed execution successfully, reaching the target performance. A model has been generated. \n* `TIMED_OUT` - The training job could not reach the target performance in the configured \n* `CANCELLED` - The training job has been cancelled by the user \n* `NOT_COMPLETED` - The training job has stalled without making progress in a specified timeframe\n* `FAILED` - The training job has failed due to an error\n","enum":["PENDING","RUNNING","COMPLETED","TIMED_OUT","CANCELLED","FAILED","NOT_COMPLETED"],"uniqueKey":"jobs.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"latestPerformance":{"type":"number","format":"double","uniqueKey":"jobs.items.[INDEX].latestPerformance","typeLabel":"number\u003cdouble>"},"recentPerformances":{"type":"array","items":{"type":"number","format":"double","uniqueKey":"jobs.items.[INDEX].recentPerformances.items.[INDEX]","typeLabel":"number\u003cdouble>"},"uniqueKey":"jobs.items.[INDEX].recentPerformances","typeLabel":"number\u003cdouble>[]"}},"uniqueKey":"jobs.items.[INDEX]","typeLabel":"object"},"uniqueKey":"jobs","typeLabel":"object[]"},"nextPollAfterSeconds":{"oneOf":[{"description":"How long to wait before asking again. Absent once the job has finished — there is nothing further to wait for, and a client that honours this stops polling.","type":"integer","uniqueKey":"nextPollAfterSeconds.oneOf.0","typeLabel":"integer"},{"description":"How long to wait before asking again. Absent once the job has finished — there is nothing further to wait for, and a client that honours this stops polling.","type":"null","uniqueKey":"nextPollAfterSeconds.oneOf.1","typeLabel":"null"}],"uniqueKey":"nextPollAfterSeconds","typeLabel":"integer | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Successful cancelling of training job":{"title":"Successful cancelling of training job","value":{"status":"CANCELLED"}}},"exampleType":"examples"}},"exampleType":"examples"},"8ba5963f-ea12-4c5b-9553-f06e50e05ad0":{"description":"Invalid training job key provided","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"aaaeea62-6a93-4955-910d-8c2df0ac8eca":{"description":"Training job not found","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"b716fec4-3311-4275-9174-1594e91090aa":{"description":"Internal server error","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}}},"security":{"2c19ac19-2b76-4d55-b5ab-dc0439ed3ca2":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","scopes":[],"schemeName":"BearerAuth"}}},"servers":{"0215795f-7d3c-442e-bfcb-454b8d8c6f91":{"url":"https://{tenant}-api.mathfi.ai","description":"Your tenant's API. Each customer has their own, so the host varies. Replace {tenant} with the name issued when your tenant was created.","variables":{"tenant":{"default":"your-tenant","description":"The tenant name issued to you."}}}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","bearerFormat":"JWT","scopes":[],"schemeName":"BearerAuth"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token.","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"BearerAuth","name":"Authorization"}],"title":"BearerAuth"}]},"originalFileLocation":"api-reference/openapi.yaml"},"subdomain":"mathficast","siteName":"MathFi.ai","title":"Cancel a training job - MathFi.ai","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-19T20:58:21.602Z","originalFileLocation":"api-reference/training/cancel-training-job.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=\"Cancel a training job given its key\">\u003cmeta data-mint-head name=\"application-name\" content=\"MathFi.ai\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/mathficast/DPpupBGAr--8eP5g/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/mathficast/DPpupBGAr--8eP5g/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/mathficast/DPpupBGAr--8eP5g/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/mathficast/DPpupBGAr--8eP5g/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/mathficast/DPpupBGAr--8eP5g/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/mathficast/DPpupBGAr--8eP5g/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/mathficast/DPpupBGAr--8eP5g/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/mathficast/DPpupBGAr--8eP5g/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/mathficast/DPpupBGAr--8eP5g/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Cancel a training job - MathFi.ai\">\u003cmeta data-mint-head property=\"og:description\" content=\"Cancel a training job given its key\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"MathFi.ai\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.mathfi.ai/api-reference/training/cancel-training-job\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://mathficast.mintlify.app/_mintlify/api/og/v2?division=Training\u0026amp;title=Cancel+a+training+job\u0026amp;description=Cancel+a+training+job+given+its+key\u0026amp;theme=cbd1a49d9809485b2cbd71fb\u0026amp;signature=caa249f4086b641568c516026a47555c7f9846678f6df81fa941c40fff767539\">\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=\"Cancel a training job - MathFi.ai\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Cancel a training job given its key\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://mathficast.mintlify.app/_mintlify/api/og/v2?division=Training\u0026amp;title=Cancel+a+training+job\u0026amp;description=Cancel+a+training+job+given+its+key\u0026amp;theme=cbd1a49d9809485b2cbd71fb\u0026amp;signature=caa249f4086b641568c516026a47555c7f9846678f6df81fa941c40fff767539\">\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=\"/mintlify-assets/_mintlify/favicons/mathficast/DPpupBGAr--8eP5g/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"MathFi.ai\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0D5E4F\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.mathfi.ai/api-reference/training/cancel-training-job\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/training/cancel-training-job.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.mathfi.ai/#organization\",\"name\":\"MathFi.ai\",\"url\":\"https://docs.mathfi.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/mathficast/obGjwhvkcHRG-84d/logo/light.svg?fit=max\u0026auto=format\u0026n=obGjwhvkcHRG-84d\u0026q=85\u0026s=0d58083744fd1f821588093372fdf5bf\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.mathfi.ai#website\",\"name\":\"MathFi.ai\",\"url\":\"https://docs.mathfi.ai\",\"publisher\":{\"@id\":\"https://docs.mathfi.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.mathfi.ai/api-reference/training/cancel-training-job#webpage\",\"url\":\"https://docs.mathfi.ai/api-reference/training/cancel-training-job\",\"name\":\"Cancel a training job\",\"description\":\"Cancel a training job given its key\",\"dateModified\":\"2026-09-19T20:58:21.602Z\",\"isPartOf\":{\"@id\":\"https://docs.mathfi.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.mathfi.ai/api-reference/training/cancel-training-job#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.mathfi.ai/api-reference/training/cancel-training-job#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Model Crucible\",\"item\":\"https://docs.mathfi.ai/api-reference/datasets/create-dataset\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Training\",\"item\":\"https://docs.mathfi.ai/api-reference/training/create-training\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Cancel a training job\",\"item\":\"https://docs.mathfi.ai/api-reference/training/cancel-training-job\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.mathfi.ai/api-reference/training/cancel-training-job#apireference\",\"headline\":\"Cancel a training job\",\"name\":\"Cancel a training job\",\"description\":\"Cancel a training job given its key\",\"url\":\"https://docs.mathfi.ai/api-reference/training/cancel-training-job\",\"mainEntityOfPage\":{\"@id\":\"https://docs.mathfi.ai/api-reference/training/cancel-training-job#webpage\"},\"dateModified\":\"2026-09-19T20:58:21.602Z\",\"publisher\":{\"@id\":\"https://docs.mathfi.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.mathfi.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"MathFi.ai\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"MathFi.ai","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"API Reference","groups":[{"group":"Getting started","pages":[{"title":"API overview","icon":"code","href":"/developers/api-overview"},{"title":"Authentication","icon":"key","href":"/developers/authentication"},{"title":"API recipes","icon":"terminal","href":"/developers/api-recipes"},{"title":"Build a CLI or agent","icon":"robot","href":"/developers/agents"}]},{"group":"Authentication","pages":[{"title":"Log in and obtain a bearer token","openapi":"api-reference/openapi.yaml POST /api/login","href":"/api-reference/authentication/login"}]},{"group":"Feature Refinery","pages":[{"title":"Create a feature refinement","openapi":"api-reference/openapi.yaml POST /api/v1/feature-refinery","href":"/api-reference/feature-refinery/create-feature-refinement"},{"title":"Start the run once inputs are uploaded","openapi":"api-reference/openapi.yaml POST /api/v1/feature-refinery/{featureRefinementKey}/start","href":"/api-reference/feature-refinery/start-feature-refinement"},{"title":"Feature refinement progress","openapi":"api-reference/openapi.yaml GET /api/v1/feature-refinery/{featureRefinementKey}/progress","href":"/api-reference/feature-refinery/get-feature-refinement-progress"},{"title":"Feature refinement result — columnStatus + refined download links","openapi":"api-reference/openapi.yaml GET /api/v1/feature-refinery/{featureRefinementKey}/result","href":"/api-reference/feature-refinery/get-feature-refinement-result"},{"title":"Run detail","openapi":"api-reference/openapi.yaml GET /api/v1/feature-refinery/{featureRefinementKey}","href":"/api-reference/feature-refinery/get-feature-refinement"},{"title":"List the caller's feature refinements","openapi":"api-reference/openapi.yaml GET /api/v1/feature-refinery","href":"/api-reference/feature-refinery/list-feature-refinements"},{"title":"Cancel a run","openapi":"api-reference/openapi.yaml POST /api/v1/feature-refinery/{featureRefinementKey}/cancel","href":"/api-reference/feature-refinery/cancel-feature-refinement"},{"title":"Non-destructive delete of a run","openapi":"api-reference/openapi.yaml DELETE /api/v1/feature-refinery/{featureRefinementKey}","href":"/api-reference/feature-refinery/delete-feature-refinement"}]},{"group":"Model Crucible","pages":[{"group":"Datasets","pages":[{"title":"Create a dataset","openapi":"api-reference/openapi.yaml POST /api/v1/datasets","href":"/api-reference/datasets/create-dataset"},{"title":"Clean the dataset","openapi":"api-reference/openapi.yaml POST /api/v1/datasets/{datasetKey}/clean","href":"/api-reference/datasets/clean-dataset"},{"title":"Retrieve dataset details","openapi":"api-reference/openapi.yaml GET /api/v1/datasets/{datasetKey}","href":"/api-reference/datasets/get-dataset-by-key"},{"title":"List all datasets","openapi":"api-reference/openapi.yaml GET /api/v1/datasets","href":"/api-reference/datasets/list-datasets"},{"title":"Non-destructive delete of a dataset","openapi":"api-reference/openapi.yaml DELETE /api/v1/datasets/{datasetKey}","href":"/api-reference/datasets/delete-dataset"}]},{"group":"Training","pages":[{"title":"Start a training run on a dataset","openapi":"api-reference/openapi.yaml POST /api/v1/training/datasets/{datasetKey}","href":"/api-reference/training/create-training"},{"title":"Get training job progress","openapi":"api-reference/openapi.yaml GET /api/v1/training/{trainingJobKey}/progress","href":"/api-reference/training/get-training-progress"},{"title":"Get training job detail","openapi":"api-reference/openapi.yaml GET /api/v1/training/{trainingJobKey}","href":"/api-reference/training/get-training-detail"},{"title":"Choose which model predictions run against","openapi":"api-reference/openapi.yaml POST /api/v1/training/{trainingJobKey}/champion","description":"Points this run's predictions at a different one of the models it offers.\n\n- Only an attempt the run actually offers can be chosen. Anything else returns `400`.\n- Nothing is rebuilt. A flag moves, so this is cheap and repeatable.\n- Changing it never rewrites history. Every prediction records the version it ran against.\n\nTo predict with a different model, change it here and run the prediction again.\n","href":"/api-reference/training/select-champion"},{"title":"Cancel a training job","openapi":"api-reference/openapi.yaml PATCH /api/v1/training/{trainingJobKey}/cancel","href":"/api-reference/training/cancel-training-job"},{"title":"List training jobs","openapi":"api-reference/openapi.yaml GET /api/v1/training","description":"List all training","href":"/api-reference/training/list-training-by-user"},{"title":"List training jobs by dataset","openapi":"api-reference/openapi.yaml GET /api/v1/training/datasets/{datasetKey}","href":"/api-reference/training/list-training-by-dataset"}]},{"group":"Models","pages":[{"title":"Get model detail","openapi":"api-reference/openapi.yaml GET /api/v1/models/{modelKey}","href":"/api-reference/models/get-model-detail"},{"title":"List models by dataset","openapi":"api-reference/openapi.yaml GET /api/v1/models/datasets/{datasetKey}","href":"/api-reference/models/list-models-by-dataset"}]},{"group":"Predictions","pages":[{"title":"Create a prediction","openapi":"api-reference/openapi.yaml POST /api/v1/predictions","href":"/api-reference/predictions/create-prediction-model-payload"},{"title":"Create a prediction","openapi":"api-reference/openapi.yaml POST /api/v1/predictions/models/{modelKey}","href":"/api-reference/predictions/create-prediction"},{"title":"Get prediction progress","openapi":"api-reference/openapi.yaml GET /api/v1/predictions/{predictionKey}/progress","href":"/api-reference/predictions/get-prediction-progress"},{"title":"Get prediction detail","openapi":"api-reference/openapi.yaml GET /api/v1/predictions/{predictionKey}","href":"/api-reference/predictions/get-prediction-detail"},{"title":"List predictions by model","openapi":"api-reference/openapi.yaml GET /api/v1/predictions/models/{modelKey}","href":"/api-reference/predictions/list-predictions-by-model"},{"title":"List predictions by dataset","openapi":"api-reference/openapi.yaml GET /api/v1/predictions/datasets/{datasetKey}","href":"/api-reference/predictions/list-predictions-by-dataset"}]}]}]},{"tab":"Help","pages":[{"title":"Help","href":"/help/faq"}]}]},"basePath":"","title":"Cancel a training job - MathFi.ai","buildId":"dpl_345ReqzYaAjzS9QpeJemsKdb7KDj","deploymentId":"dpl_345ReqzYaAjzS9QpeJemsKdb7KDj","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-C8RPHPxo.js","utils-0BK-9q6z.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DfjzsUJT.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-B4v9psJ4.js","snippetPresets-CpTQv-Ez.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-BNP-Fvr0.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BSgu6h1D.js","shallow-Biv1i9Gs.js","getApiPlaygroundDisplay-BoGOXhtF.js","CodeSnippet-DvQoT18_.js","CodeSnippets-Dnpa15xT.js","Page-Buji1S4J.js","getPastedJson-xAIyhUFE.js","icon-S6FBih11.js","MethodPill-SaYeUZyk.js","DuplicateIcon-Cs-p3v2Q.js","createIcon-DjCFEoHq.js","DynamicMarkdown-BcnBltEQ.js","SectionHeading-BUBl0eEF.js","axios-vUo_bRtp.js","Markdown-h4cOoD8d.js","clsx-B2v50t8t.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-DJnKvr0g.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BHrrjR1K.js"]}