A cost estimation resolves the repositories you plan to scan, detects applications within them, and returns a predicted credit cost. A completed or partial cost estimation with a positive total_credits value is required before calling POST /scans.Cost estimations run asynchronously. The POST returns a record in pending or running state; poll GET /cost-estimations/{id} until status reaches completed, partial, or failed.
All repos were estimated successfully. total_credits is populated.
partial
Some repos completed, others failed. Check repo_results[].status for details.
failed
The whole estimation failed. error contains a message.
Once in a terminal state, an estimation is immutable. Pass its id as cost_estimation_id to POST /scans to start the scan. The scan must use repositories and branches that were included in the estimate.
Whether human triage is mandatory for a scan of this estimation (large app, above the predicted-cost threshold). The customer cannot opt out when true.
{"docsConfig":{"theme":"willow","$schema":"https://mintlify.com/docs.json","name":"Hacktron Docs","colors":{"primary":"#060000","light":"#FDF6E3","dark":"#181611"},"logo":{"light":"https://mintcdn.com/hacktronai/YwinZOi1ZhshTNrW/logo/light.svg?fit=max\u0026auto=format\u0026n=YwinZOi1ZhshTNrW\u0026q=85\u0026s=6394df2b0118979b4240f0a3d716cd43","dark":"https://mintcdn.com/hacktronai/YwinZOi1ZhshTNrW/logo/dark.svg?fit=max\u0026auto=format\u0026n=YwinZOi1ZhshTNrW\u0026q=85\u0026s=0576e6ea05148ce70a461d9aa6f1d804"},"favicon":"https://mintcdn.com/hacktronai/2HX1cw_Fj0x4iRoX/favicon.png?fit=max\u0026auto=format\u0026n=2HX1cw_Fj0x4iRoX\u0026q=85\u0026s=828d46d89782771a6d4bff0d14c092b0","background":{"color":{"light":"#FDF6E3","dark":"#181611"}},"navbar":{"links":[{"href":"mailto:hello@hacktron.ai","label":"Support"},{"href":"https://trust.hacktron.ai","label":"Trust Center"}],"primary":{"type":"button","label":"Start for Free","href":"https://app.hacktron.ai"}},"footer":{"socials":{"x":"https://x.com/hacktronai","discord":"https://discord.gg/eRHCHsvDKh","github":"https://github.com/HacktronAI","linkedin":"https://linkedin.com/company/hacktron"}},"fonts":{"heading":{"family":"Titillium Web","weight":500},"body":{"family":"Inter"}},"contextual":{"options":["copy","download-spec","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"thumbnails":{"appearance":"dark"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"Code Review","icon":"code-branch","href":"/code-review/overview"},{"anchor":"White-box Pentest","icon":"magnifying-glass","href":"/white-box-pentest/overview"},{"anchor":"Community","icon":"discord","href":"https://discord.gg/eRHCHsvDKh"},{"anchor":"Changelog","icon":"clock-rotate-left","href":"/changelog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"hacktronai","hasAudioNarration":false,"actualSubdomain":"hacktronai","customDomains":["docs.hacktron.ai"],"gitSource":{"type":"github","owner":"hacktronai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ad89c03b264ebf3acb4757f","collectionId":"3e1f648c-2171-4070-9d62-a1547ce93252","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ad89c03b264ebf3acb4757f"},"entitlements":{},"buildId":"6ad89c03b264ebf3acb4757f","clientVersion":"0.0.3965","searchFilterCounts":[{"language":"default","tag":"Platform","count":28},{"language":"default","tag":"API Reference","count":24},{"language":"default","tag":"Setup","count":13},{"language":"default","tag":"Code Review","count":11},{"language":"default","tag":"Getting started","count":8},{"language":"default","tag":"Repositories","count":7},{"language":"default","tag":"Scans","count":6},{"language":"default","tag":"Findings","count":5},{"language":"default","tag":"Overview","count":5},{"language":"default","tag":"Dependency Firewall","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"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":"editor-v7-file-tree","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":"pause-universal-search-reconcile","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":"per-site-search-delta","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":"editor-private-page-search","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":"editor-nav-generations","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":"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":"editor-agent-model-picker","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":"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}],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"#banner *,.bg-primary-dark,.bg-primary-dark *{color:#060000!important}.dark #content-area>div{background-color:rgb(var(--background-dark))!important}.dark .prose :where(a):not(:where([class~=\"not-prose\"], [class~=\"not-prose\"] *, [class~=\"border-0\"])){border-bottom:1px solid rgb(var(--primary-light))!important}#changelog-filters-content button,.update-container span.inline-block.rounded-lg.font-medium{border-radius:9999px!important;text-transform:uppercase!important;letter-spacing:.04em!important;font-size:.6875rem!important;font-weight:600!important}.update-container span.inline-block.rounded-lg.font-medium{display:inline-block!important;padding:.1875rem .5rem!important;line-height:1.35!important;white-space:nowrap!important;background-color:rgb(var(--primary-dark)/.08)!important;color:rgb(var(--primary-dark))!important;border:1px solid rgb(var(--primary-dark)/.15)!important}#changelog-filters-content button{padding:.25rem .6875rem!important;border:1px solid transparent!important;transition:background-color .15s ease,border-color .15s ease,color .15s ease!important}#changelog-filters-content button.bg-gray-100{background-color:rgb(var(--primary-dark)/.08)!important;color:rgb(var(--primary-dark))!important;border-color:rgb(var(--primary-dark)/.15)!important}#changelog-filters-content button.bg-gray-100:hover{background-color:rgb(var(--primary-dark)/.14)!important;border-color:rgb(var(--primary-dark)/.28)!important}.dark #changelog-filters-content button.bg-gray-100,.dark .update-container span.inline-block.rounded-lg.font-medium{background-color:rgb(var(--primary-light)/.1)!important;color:rgb(var(--primary-light))!important;border-color:rgb(var(--primary-light)/.2)!important}.dark #changelog-filters-content button.bg-gray-100:hover{background-color:rgb(var(--primary-light)/.18)!important;border-color:rgb(var(--primary-light)/.38)!important}#changelog-filters-content button.bg-primary{background-color:rgb(var(--primary-dark))!important;color:rgb(var(--primary-light))!important;border-color:rgb(var(--primary-dark))!important}.dark #changelog-filters-content button.bg-primary{background-color:rgb(var(--primary-light))!important;color:rgb(var(--primary-dark))!important;border-color:rgb(var(--primary-light))!important}"}],"page":{"pagePath":"api-reference/cost-estimations/create-cost-estimation","slug":"/api-reference/cost-estimations/create-cost-estimation","pageMetadata":{"title":"Create cost estimation","openapi":"POST /cost-estimations","description":"Estimate the credit cost of scanning one or more repositories before starting a scan.","href":"/api-reference/cost-estimations/create-cost-estimation"},"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: \"Estimate the credit cost of scanning one or more repositories before starting a scan.\"\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,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{Heading,Info,Table}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Info)_missingMdxReference(`Info`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`A cost estimation resolves the repositories you plan to scan, detects applications within them, and returns a predicted credit cost. A `,_jsx(_components.code,{children:`completed`}),` or `,_jsx(_components.code,{children:`partial`}),` cost estimation with a positive `,_jsx(_components.code,{children:`total_credits`}),` value is required before calling `,_jsx(_components.a,{href:`/api-reference/scans/create-scan`,children:_jsx(_components.code,{children:`POST /scans`})}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Cost estimations run asynchronously. The `,_jsx(_components.code,{children:`POST`}),` returns a record in `,_jsx(_components.code,{children:`pending`}),` or `,_jsx(_components.code,{children:`running`}),` state; poll `,_jsx(_components.a,{href:`/api-reference/cost-estimations/get-cost-estimation`,children:_jsx(_components.code,{children:`GET /cost-estimations/{id}`})}),` until `,_jsx(_components.code,{children:`status`}),` reaches `,_jsx(_components.code,{children:`completed`}),`, `,_jsx(_components.code,{children:`partial`}),`, or `,_jsx(_components.code,{children:`failed`}),`.`]}),`\n`,_jsxs(Info,{children:[_jsx(_components.strong,{children:`Scope required`}),`: `,_jsx(_components.code,{children:`write`})]}),`\n`,_jsx(Heading,{level:`3`,id:`terminal-statuses`,children:`Terminal statuses`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Status`}),_jsx(_components.th,{children:`Meaning`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`completed`})}),_jsxs(_components.td,{children:[`All repos were estimated successfully. `,_jsx(_components.code,{children:`total_credits`}),` is populated.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`partial`})}),_jsxs(_components.td,{children:[`Some repos completed, others failed. Check `,_jsx(_components.code,{children:`repo_results[].status`}),` for details.`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`failed`})}),_jsxs(_components.td,{children:[`The whole estimation failed. `,_jsx(_components.code,{children:`error`}),` contains a message.`]})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Once in a terminal state, an estimation is immutable. Pass its `,_jsx(_components.code,{children:`id`}),` as `,_jsx(_components.code,{children:`cost_estimation_id`}),` to `,_jsx(_components.a,{href:`/api-reference/scans/create-scan`,children:_jsx(_components.code,{children:`POST /scans`})}),` to start the scan. The scan must use repositories and branches that were included in the estimate.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create cost estimation","openapi":"POST /cost-estimations","description":"Estimate the credit cost of scanning one or more repositories before starting a scan.","href":"/api-reference/cost-estimations/create-cost-estimation"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Terminal statuses","slug":"terminal-statuses","depth":3,"children":[]}],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"RestCostEstimationController_create","parameters":[],"requestBody":"387604ef-370c-4d9a-a7b9-f41dd3fa789c","responses":{"201":"d52e9766-96b8-4224-a470-5c5e140c4eed"},"summary":"Create a cost estimation for one or more repos","tags":["REST API - Cost Estimations"],"method":"post","type":"path","servers":["16bd04f2-d476-449c-9842-f2fa3ba6bf52"],"security":["317c51ef-08dd-45bf-81ff-b6842fe6aa02"],"path":"/cost-estimations","baseUrlOptions":["https://api.hacktron.ai/v1"],"title":"Create a cost estimation for one or more repos","description":"Estimate the credit cost of scanning one or more repositories before starting a scan.","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"repos":{"type":"array","description":"Repositories to estimate","items":{"oneOf":[{"type":"object","required":["source","repo_url","branch"],"properties":{"source":{"type":"string","description":"Source type","enum":["connected"],"default":"connected","isRequired":true,"uniqueKey":"repos.items.[INDEX].oneOf.0.source","typeLabel":"enum\u003cstring>"},"repo_url":{"type":"string","description":"Repository URL","isRequired":true,"uniqueKey":"repos.items.[INDEX].oneOf.0.repo_url","typeLabel":"string"},"branch":{"type":"string","description":"Branch name","isRequired":true,"uniqueKey":"repos.items.[INDEX].oneOf.0.branch","typeLabel":"string"},"github_installation_id":{"type":"number","description":"GitHub App installation ID. Omitted for PAT-based connections (e.g. GitHub Enterprise), where the installation is resolved from repo_url and the organization instead.","uniqueKey":"repos.items.[INDEX].oneOf.0.github_installation_id","typeLabel":"number"}},"uniqueKey":"repos.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","required":["source","repo_url","branch"],"properties":{"source":{"type":"string","description":"Source type","enum":["public"],"isRequired":true,"uniqueKey":"repos.items.[INDEX].oneOf.1.source","typeLabel":"enum\u003cstring>"},"repo_url":{"type":"string","description":"Repository URL","isRequired":true,"uniqueKey":"repos.items.[INDEX].oneOf.1.repo_url","typeLabel":"string"},"branch":{"type":"string","description":"Branch name","isRequired":true,"uniqueKey":"repos.items.[INDEX].oneOf.1.branch","typeLabel":"string"}},"uniqueKey":"repos.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","required":["source","archive_id"],"properties":{"source":{"type":"string","description":"Source type","enum":["upload"],"isRequired":true,"uniqueKey":"repos.items.[INDEX].oneOf.2.source","typeLabel":"enum\u003cstring>"},"archive_id":{"type":"string","description":"Scan archive ID","isRequired":true,"uniqueKey":"repos.items.[INDEX].oneOf.2.archive_id","typeLabel":"string"}},"uniqueKey":"repos.items.[INDEX].oneOf.2","typeLabel":"object"}],"uniqueKey":"repos.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"repos","typeLabel":"object[]"},"name":{"type":"string","description":"Friendly name for this estimation","uniqueKey":"name","typeLabel":"string"}},"required":["repos"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"repos":[{"source":"connected","repo_url":"\u003cstring>","branch":"\u003cstring>","github_installation_id":123}],"name":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"d52e9766-96b8-4224-a470-5c5e140c4eed":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Estimation UUID","example":"123e4567-e89b-12d3-a456-426614174000","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"organization_id":{"type":"string","description":"Organization UUID","example":"f336d0bc-b841-465b-8045-024475c079dd","isRequired":true,"uniqueKey":"organization_id","typeLabel":"string"},"user_id":{"type":"string","description":"User UUID","example":"f336d0bc-b841-465b-8045-024475c079dd","isRequired":true,"uniqueKey":"user_id","typeLabel":"string"},"task_id":{"type":"string","description":"Task identifier","example":"cost_est_owner-repo_12345","isRequired":true,"uniqueKey":"task_id","typeLabel":"string"},"status":{"type":"string","description":"Estimation status","enum":["pending","running","completed","partial","failed"],"example":"completed","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"repos":{"description":"Input repositories","type":"array","items":{"type":"object","properties":{"source":{"type":"string","description":"Source type","enum":["connected","public","upload"],"uniqueKey":"repos.items.[INDEX].source","typeLabel":"enum\u003cstring>"},"repo_url":{"type":"string","description":"Repository URL","example":"https://github.com/owner/repo","uniqueKey":"repos.items.[INDEX].repo_url","typeLabel":"string"},"branch":{"type":"string","description":"Branch name","example":"main","uniqueKey":"repos.items.[INDEX].branch","typeLabel":"string"},"commit_sha":{"type":"string","description":"Resolved commit SHA","example":"abc123def456","uniqueKey":"repos.items.[INDEX].commit_sha","typeLabel":"string"},"archive_id":{"type":"string","description":"Archive ID (for upload sources)","uniqueKey":"repos.items.[INDEX].archive_id","typeLabel":"string"}},"uniqueKey":"repos.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"repos","typeLabel":"object[]"},"triage_required":{"type":"boolean","description":"Whether human triage is mandatory for a scan of this estimation (large app, above the predicted-cost threshold). The customer cannot opt out when true.","example":false,"isRequired":true,"uniqueKey":"triage_required","typeLabel":"boolean"},"triage_fee_credits":{"type":"number","description":"Triage fee in credits (a percentage of the scan base credits) added when triage is enabled","example":1600,"isRequired":true,"uniqueKey":"triage_fee_credits","typeLabel":"number"},"created_at":{"format":"date-time","type":"string","description":"Timestamp when estimation was created","example":"2026-03-10T12:00:00.000Z","isRequired":true,"uniqueKey":"created_at","typeLabel":"string\u003cdate-time>"},"updated_at":{"format":"date-time","type":"string","description":"Timestamp when estimation was last updated","example":"2026-03-10T12:05:00.000Z","isRequired":true,"uniqueKey":"updated_at","typeLabel":"string\u003cdate-time>"},"name":{"type":"string","description":"Friendly name for this estimation","uniqueKey":"name","typeLabel":"string"},"total_credits":{"type":"number","description":"Total estimated credits across all repos","example":8000,"uniqueKey":"total_credits","typeLabel":"number"},"repo_results":{"description":"Per-repo estimation results","type":"array","items":{"type":"object","properties":{"repo_url":{"type":"string","description":"Repository URL","example":"https://github.com/owner/repo","isRequired":true,"uniqueKey":"repo_results.items.[INDEX].repo_url","typeLabel":"string"},"status":{"type":"string","description":"Result status","enum":["completed","failed"],"example":"completed","isRequired":true,"uniqueKey":"repo_results.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"from_cache":{"type":"boolean","description":"Whether result was served from cache","example":false,"isRequired":true,"uniqueKey":"repo_results.items.[INDEX].from_cache","typeLabel":"boolean"},"branch":{"type":"string","description":"Branch name","example":"main","uniqueKey":"repo_results.items.[INDEX].branch","typeLabel":"string"},"commit_sha":{"type":"string","description":"Commit SHA","example":"abc123def456","uniqueKey":"repo_results.items.[INDEX].commit_sha","typeLabel":"string"},"applications":{"description":"Detected applications","type":"array","items":{"type":"object","properties":{"app_name":{"type":"string","description":"Application name","example":"backend-api","isRequired":true,"uniqueKey":"repo_results.items.[INDEX].applications.items.[INDEX].app_name","typeLabel":"string"},"app_root_path":{"type":"string","description":"Application root path","example":"apps/api","isRequired":true,"uniqueKey":"repo_results.items.[INDEX].applications.items.[INDEX].app_root_path","typeLabel":"string"},"architecture":{"type":"string","description":"Architecture description","example":"NestJS REST API with PostgreSQL","uniqueKey":"repo_results.items.[INDEX].applications.items.[INDEX].architecture","typeLabel":"string"}},"required":["app_name","app_root_path"],"uniqueKey":"repo_results.items.[INDEX].applications.items.[INDEX]","typeLabel":"object"},"uniqueKey":"repo_results.items.[INDEX].applications","typeLabel":"object[]"},"credits":{"type":"number","description":"Estimated credits for this repo","example":4000,"uniqueKey":"repo_results.items.[INDEX].credits","typeLabel":"number"},"error":{"type":"string","description":"Error message (when status is failed)","uniqueKey":"repo_results.items.[INDEX].error","typeLabel":"string"},"failure_reason":{"type":"string","description":"Structured failure reason","enum":["unsupported_language"],"uniqueKey":"repo_results.items.[INDEX].failure_reason","typeLabel":"enum\u003cstring>"},"unsupported_languages":{"description":"Detected unsupported languages among the top languages","type":"array","items":{"type":"string","uniqueKey":"repo_results.items.[INDEX].unsupported_languages.items.[INDEX]","typeLabel":"string"},"uniqueKey":"repo_results.items.[INDEX].unsupported_languages","typeLabel":"string[]"}},"required":["repo_url","status","from_cache"],"uniqueKey":"repo_results.items.[INDEX]","typeLabel":"object"},"uniqueKey":"repo_results","typeLabel":"object[]"},"error":{"type":"string","description":"Error message","uniqueKey":"error","typeLabel":"string"}},"required":["id","organization_id","user_id","task_id","status","repos","triage_required","triage_fee_credits","created_at","updated_at"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"123e4567-e89b-12d3-a456-426614174000","organization_id":"f336d0bc-b841-465b-8045-024475c079dd","user_id":"f336d0bc-b841-465b-8045-024475c079dd","task_id":"cost_est_owner-repo_12345","status":"completed","repos":[{"source":"connected","repo_url":"https://github.com/owner/repo","branch":"main","commit_sha":"abc123def456","archive_id":"\u003cstring>"}],"triage_required":false,"triage_fee_credits":1600,"created_at":"2026-03-10T12:00:00.000Z","updated_at":"2026-03-10T12:05:00.000Z","name":"\u003cstring>","total_credits":8000,"repo_results":[{"repo_url":"https://github.com/owner/repo","status":"completed","from_cache":false,"branch":"main","commit_sha":"abc123def456","applications":[{"app_name":"backend-api","app_root_path":"apps/api","architecture":"NestJS REST API with PostgreSQL"}],"credits":4000,"error":"\u003cstring>","failure_reason":"unsupported_language","unsupported_languages":["\u003cstring>"]}],"error":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"317c51ef-08dd-45bf-81ff-b6842fe6aa02":{"api-key":{"type":"apiKey","in":"header","name":"X-Api-Key","scopes":[],"schemeName":"api-key"}}},"servers":{"16bd04f2-d476-449c-9842-f2fa3ba6bf52":{"url":"https://api.hacktron.ai/v1"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"X-Api-Key","scopes":[],"schemeName":"api-key"},"schema":{"title":"X-Api-Key","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"api-key","name":"X-Api-Key"}],"title":"api-key"}]},"originalFileLocation":"openapi.json"},"subdomain":"hacktronai","siteName":"Hacktron Docs","title":"Create cost estimation - Hacktron Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-07-22T05:45:23.800Z","originalFileLocation":"api-reference/cost-estimations/create-cost-estimation.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=\"Estimate the credit cost of scanning one or more repositories before starting a scan.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Hacktron Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/hacktronai/hzWn8wWFyff5WuAd/_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/hacktronai/hzWn8wWFyff5WuAd/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/hacktronai/hzWn8wWFyff5WuAd/_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/hacktronai/hzWn8wWFyff5WuAd/_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/hacktronai/hzWn8wWFyff5WuAd/_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/hacktronai/hzWn8wWFyff5WuAd/_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/hacktronai/hzWn8wWFyff5WuAd/_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/hacktronai/hzWn8wWFyff5WuAd/_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/hacktronai/hzWn8wWFyff5WuAd/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create cost estimation - Hacktron Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Estimate the credit cost of scanning one or more repositories before starting a scan.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Hacktron Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.hacktron.ai/api-reference/cost-estimations/create-cost-estimation\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://hacktronai.mintlify.app/_mintlify/api/og/v2?division=Cost+Estimations\u0026amp;title=Create+cost+estimation\u0026amp;description=Estimate+the+credit+cost+of+scanning+one+or+more+repositories+before+starting+a+scan.\u0026amp;theme=e42d35541910bc84d6a7c86c\u0026amp;signature=62b8affe4193d160083a10cbded91b8a900012aaf65c117be17ec58d638a3f21\">\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 cost estimation - Hacktron Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Estimate the credit cost of scanning one or more repositories before starting a scan.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://hacktronai.mintlify.app/_mintlify/api/og/v2?division=Cost+Estimations\u0026amp;title=Create+cost+estimation\u0026amp;description=Estimate+the+credit+cost+of+scanning+one+or+more+repositories+before+starting+a+scan.\u0026amp;theme=e42d35541910bc84d6a7c86c\u0026amp;signature=62b8affe4193d160083a10cbded91b8a900012aaf65c117be17ec58d638a3f21\">\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/hacktronai/hzWn8wWFyff5WuAd/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Hacktron Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#060000\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.hacktron.ai/api-reference/cost-estimations/create-cost-estimation\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/cost-estimations/create-cost-estimation.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.hacktron.ai/#organization\",\"name\":\"Hacktron Docs\",\"url\":\"https://docs.hacktron.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/hacktronai/YwinZOi1ZhshTNrW/logo/light.svg?fit=max\u0026auto=format\u0026n=YwinZOi1ZhshTNrW\u0026q=85\u0026s=6394df2b0118979b4240f0a3d716cd43\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.hacktron.ai#website\",\"name\":\"Hacktron Docs\",\"url\":\"https://docs.hacktron.ai\",\"publisher\":{\"@id\":\"https://docs.hacktron.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.hacktron.ai/api-reference/cost-estimations/create-cost-estimation#webpage\",\"url\":\"https://docs.hacktron.ai/api-reference/cost-estimations/create-cost-estimation\",\"name\":\"Create cost estimation\",\"description\":\"Estimate the credit cost of scanning one or more repositories before starting a scan.\",\"dateModified\":\"2026-07-22T05:45:23.800Z\",\"isPartOf\":{\"@id\":\"https://docs.hacktron.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.hacktron.ai/api-reference/cost-estimations/create-cost-estimation#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.hacktron.ai/api-reference/cost-estimations/create-cost-estimation#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Hacktron Docs\",\"item\":\"https://docs.hacktron.ai\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create cost estimation\",\"item\":\"https://docs.hacktron.ai/api-reference/cost-estimations/create-cost-estimation\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.hacktron.ai/api-reference/cost-estimations/create-cost-estimation#apireference\",\"headline\":\"Create cost estimation\",\"name\":\"Create cost estimation\",\"description\":\"Estimate the credit cost of scanning one or more repositories before starting a scan.\",\"url\":\"https://docs.hacktron.ai/api-reference/cost-estimations/create-cost-estimation\",\"mainEntityOfPage\":{\"@id\":\"https://docs.hacktron.ai/api-reference/cost-estimations/create-cost-estimation#webpage\"},\"dateModified\":\"2026-07-22T05:45:23.800Z\",\"publisher\":{\"@id\":\"https://docs.hacktron.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.hacktron.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Hacktron Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Hacktron Docs","nav":{"global":{"anchors":[{"anchor":"Code Review","icon":"code-branch","href":"/code-review/overview"},{"anchor":"White-box Pentest","icon":"magnifying-glass","href":"/white-box-pentest/overview"},{"anchor":"Community","icon":"discord","href":"https://discord.gg/eRHCHsvDKh"},{"anchor":"Changelog","icon":"clock-rotate-left","href":"/changelog"}]},"products":[{"product":"Platform","icon":"house","pages":[{"title":"Platform","href":""}]},{"product":"Code Review","icon":"code-branch","pages":[{"title":"Code Review","href":"/code-review/overview"}]},{"product":"White-box Pentest","icon":"magnifying-glass","pages":[{"title":"White-box Pentest","href":"/white-box-pentest/overview"}]},{"product":"API Reference","icon":"code","groups":[{"group":"Getting started","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"Authentication","href":"/api-reference/authentication"},{"title":"Rate limits","href":"/api-reference/rate-limits"},{"title":"Pagination, filtering \u0026 sorting","href":"/api-reference/pagination-filtering"},{"title":"Errors","description":"HTTP status codes and error response shapes.","href":"/api-reference/errors"}]},{"group":"Cost Estimations","pages":[{"title":"Create cost estimation","openapi":"POST /cost-estimations","href":"/api-reference/cost-estimations/create-cost-estimation"},{"title":"List cost estimations","openapi":"GET /cost-estimations","description":"List cost estimations for your organization.","href":"/api-reference/cost-estimations/list-cost-estimations"},{"title":"Get cost estimation","openapi":"GET /cost-estimations/{id}","href":"/api-reference/cost-estimations/get-cost-estimation"}]},{"group":"Scans","pages":[{"title":"Trigger a Whitebox Scan","openapi":"POST /scans","href":"/api-reference/scans/create-scan"},{"title":"List scans","openapi":"GET /scans","href":"/api-reference/scans/list-scans"},{"title":"Get scan","openapi":"GET /scans/{id}","href":"/api-reference/scans/get-scan"},{"title":"Get scan status","openapi":"GET /scans/{id}/status","href":"/api-reference/scans/get-scan-status"},{"title":"List scan findings","openapi":"GET /scans/{id}/findings","href":"/api-reference/scans/list-scan-findings"},{"title":"Export scan findings","openapi":"GET /scans/{id}/findings/export","href":"/api-reference/scans/export-scan-findings"}]},{"group":"Findings","pages":[{"title":"List findings","openapi":"openapi.json GET /findings","href":"/api-reference/findings/list-findings"},{"title":"Get finding","openapi":"GET /findings/{id}","href":"/api-reference/findings/get-finding"},{"title":"Update finding","openapi":"PATCH /findings/{id}","href":"/api-reference/findings/update-finding"},{"title":"Add finding comment","openapi":"POST /findings/{id}/comments","href":"/api-reference/findings/add-finding-comment"},{"title":"Export findings","openapi":"openapi.json GET /findings/export","href":"/api-reference/findings/export-findings"}]},{"group":"Repositories","pages":[{"title":"List repositories","openapi":"openapi.json GET /repos","href":"/api-reference/repos/list-repos"}]},{"group":"Dependency Firewall","pages":[{"title":"Get package verdict","openapi":"openapi.json GET /hfw/verdict/{ecosystem}/{packageName}","href":"/api-reference/hfw/get-package-verdict"},{"title":"Get scoped npm package verdict","openapi":"openapi.json GET /hfw/verdict/{ecosystem}/{scope}/{packageName}","href":"/api-reference/hfw/get-scoped-npm-verdict"},{"title":"Get batch verdicts","openapi":"openapi.json POST /hfw/verdicts/batch","href":"/api-reference/hfw/batch-verdicts"},{"title":"List malware feed","openapi":"openapi.json GET /hfw/osv/feed","href":"/api-reference/hfw/osv-feed"}]}]},{"product":"MCP","icon":"plug","pages":[{"title":"MCP","href":"/mcp/get-started"}]},{"product":"Changelog","icon":"clock-rotate-left","pages":[{"title":"Changelog","href":"/changelog"}]}]},"title":"Create cost estimation - Hacktron Docs","buildId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","deploymentId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-Bbp7I60D.js","utils-C3RIvJha.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DqD-vLt8.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-B31Loprg.js","snippetPresets-DKpk-b8t.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-Cj65AhOR.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BXtn5gcC.js","shallow-RY2b03Cp.js","getApiPlaygroundDisplay-B0jeiPk3.js","CodeSnippet-CYgBjjwn.js","CodeSnippets-DOngDrYB.js","Page-n7I5XbKb.js","getPastedJson-DRQbJx-T.js","icon-CQiQCicY.js","MethodPill-BKTLdNtu.js","DuplicateIcon-B9jpAdat.js","createIcon-DCddRrXv.js","DynamicMarkdown-a8hUKrw6.js","SectionHeading-eECVV2eH.js","axios-vUo_bRtp.js","Markdown--GF7ZIpf.js","clsx-DZLdJUrt.js","lib--scc4DXi.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-2LoAhjKH.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-Zwc0ZncM.js"]}