{
"detail": "You've reached your monthly analysis limit. Upgrade to run more."
}
{
"detail": "Image with id 3fa85f64-5717-4562-b3fc-2c963f66afa6 not found"
}
{
"detail": "Input should be a valid UUID"
}
predict
Run a prediction
Start an asynchronous segmentation of a ready image.
Returns immediately with a prediction_id; the segmentation itself runs on a
GPU worker. Poll GET /predict/{prediction_id} until status is
SUCCEEDED, then hand its image_id and channel to the /export/*
endpoints. Each run counts against your plan’s monthly analysis
quota (402 when exceeded). The image_id and model_id are org-scoped: an
id outside your organization returns 404. A non-UUID model_id is rejected
with 422 before it reaches the database.
{
"detail": "You've reached your monthly analysis limit. Upgrade to run more."
}
{
"detail": "Image with id 3fa85f64-5717-4562-b3fc-2c963f66afa6 not found"
}
{
"detail": "Input should be a valid UUID"
}
Authorizations
Authorization
string
header
required
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Run a model over one uploaded image. image_id must be ready (see
GET /upload/{image_id}) and model_id must be one of the ids returned by
GET /models.
image_id
string
required
Example:
"3fa85f64-5717-4562-b3fc-2c963f66afa6"
model_id
string<uuid>
required
Example:
"c0ffee00-1234-5678-9abc-def012345678"
segmentation_channels
SegmentationChannels · object | null
For a multiplex image only: which channels to segment on, 0-based. Segmentation reads at most 3 channels, so it uses a nuclear stain plus an optional membrane or cytoplasm marker. Defaults to channel 0 as the nucleus and channel 1 as the cytoplasm.
Show child attributes
channel
integer | null
For a multiplex image only: segment this one channel on its own, 0-based, instead of segmentation_channels. Run one prediction per channel to use a different model on each.
Required range: x >= 0
Response
Successful Response
Acknowledgement that a prediction was queued. prediction_id is the
one to poll.
prediction_id
string
required
Example:
"b1e5c7d2-9a4f-4c3b-8e2d-1f6a7b8c9d0e"
status
string
required
Allowed value: "submitted"
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"HalfPage API","description":"Programmatic cell segmentation for microscopy images. Upload, predict, and export ROIs and measurements.","colors":{"primary":"#2563eb","light":"#3b82f6","dark":"#1d4ed8"},"logo":{"light":"https://mintcdn.com/halfpage/rhKdEUCb6V98b2yX/logo/light.svg?fit=max\u0026auto=format\u0026n=rhKdEUCb6V98b2yX\u0026q=85\u0026s=667c16283d8ca68ed577d207d7ce5249","dark":"https://mintcdn.com/halfpage/rhKdEUCb6V98b2yX/logo/dark.svg?fit=max\u0026auto=format\u0026n=rhKdEUCb6V98b2yX\u0026q=85\u0026s=9ac7795cbf02e29170c3287b7fe36264","href":"https://halfpagetechnologies.com"},"favicon":"https://mintcdn.com/halfpage/InD3syZckE7RxDls/favicon.svg?fit=max\u0026auto=format\u0026n=InD3syZckE7RxDls\u0026q=85\u0026s=2da132f5329697949c5eb7aca663000f","navbar":{"links":[{"href":"https://github.com/mdylan2/halfpage","type":"github"}],"primary":{"type":"button","label":"Dashboard","href":"https://halfpagetechnologies.com"}},"footer":{"socials":{"github":"https://github.com/mdylan2/halfpage","website":"https://halfpagetechnologies.com"}},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"halfpage","hasAudioNarration":false,"actualSubdomain":"halfpage","customDomains":["docs.halfpagetechnologies.com"],"gitSource":{"type":"github","owner":"mdylan2","repo":"halfpage","deployBranch":"production","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6af714e9206816990b8bba5c","clientVersion":"0.0.4128","searchFilterCounts":[{"language":"default","tag":"API reference","count":15},{"language":"default","tag":"Guides","count":5},{"language":"default","tag":"Get started","count":4},{"language":"default","tag":"export","count":4},{"language":"default","tag":"shares","count":4},{"language":"default","tag":"upload","count":4},{"language":"default","tag":"predict","count":2},{"language":"default","tag":"AI \u0026 agents","count":1},{"language":"default","tag":"models","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":"custom-rbac-roles","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":"rbac-expansion","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":"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":"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":"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":"editor-metadata","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":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","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}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"api-reference/predict/run-a-prediction","slug":"/api-reference/predict/run-a-prediction","pageMetadata":{"title":"Run a prediction","description":"Start an asynchronous segmentation of a ready image.\n\nReturns immediately with a `prediction_id`; the segmentation itself runs on a\nGPU worker. Poll `GET /predict/{prediction_id}` until `status` is\n`SUCCEEDED`, then hand its `image_id` and `channel` to the `/export/*`\nendpoints. Each run counts against your plan's monthly analysis\nquota (`402` when exceeded). The `image_id` and `model_id` are org-scoped: an\nid outside your organization returns `404`. A non-UUID `model_id` is rejected\nwith `422` before it reaches the database.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/v1/predict","href":"/api-reference/predict/run-a-prediction","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, 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(_Fragment, {\n children: [_jsx(_components.p, {\n children: \"Start an asynchronous segmentation of a ready image.\"\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Returns immediately with a \", _jsx(_components.code, {\n children: \"prediction_id\"\n }), \"; the segmentation itself runs on a\\nGPU worker. Poll \", _jsx(_components.code, {\n children: \"GET /predict/{prediction_id}\"\n }), \" until \", _jsx(_components.code, {\n children: \"status\"\n }), \" is\\n\", _jsx(_components.code, {\n children: \"SUCCEEDED\"\n }), \", then hand its \", _jsx(_components.code, {\n children: \"image_id\"\n }), \" and \", _jsx(_components.code, {\n children: \"channel\"\n }), \" to the \", _jsx(_components.code, {\n children: \"/export/*\"\n }), \"\\nendpoints. Each run counts against your plan’s monthly analysis\\nquota (\", _jsx(_components.code, {\n children: \"402\"\n }), \" when exceeded). The \", _jsx(_components.code, {\n children: \"image_id\"\n }), \" and \", _jsx(_components.code, {\n children: \"model_id\"\n }), \" are org-scoped: an\\nid outside your organization returns \", _jsx(_components.code, {\n children: \"404\"\n }), \". A non-UUID \", _jsx(_components.code, {\n children: \"model_id\"\n }), \" is rejected\\nwith \", _jsx(_components.code, {\n children: \"422\"\n }), \" before it reaches the database.\"]\n })]\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":"Run a prediction","description":"Start an asynchronous segmentation of a ready image.\n\nReturns immediately with a `prediction_id`; the segmentation itself runs on a\nGPU worker. Poll `GET /predict/{prediction_id}` until `status` is\n`SUCCEEDED`, then hand its `image_id` and `channel` to the `/export/*`\nendpoints. Each run counts against your plan's monthly analysis\nquota (`402` when exceeded). The `image_id` and `model_id` are org-scoped: an\nid outside your organization returns `404`. A non-UUID `model_id` is rejected\nwith `422` before it reaches the database.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/v1/predict","href":"/api-reference/predict/run-a-prediction","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"tags":["predict"],"summary":"Run a prediction","description":"Start an asynchronous segmentation of a ready image.\n\nReturns immediately with a `prediction_id`; the segmentation itself runs on a\nGPU worker. Poll `GET /predict/{prediction_id}` until `status` is\n`SUCCEEDED`, then hand its `image_id` and `channel` to the `/export/*`\nendpoints. Each run counts against your plan's monthly analysis\nquota (`402` when exceeded). The `image_id` and `model_id` are org-scoped: an\nid outside your organization returns `404`. A non-UUID `model_id` is rejected\nwith `422` before it reaches the database.","operationId":"create_prediction_api_v1_predict_post","requestBody":"6d478e6f-3cc5-47c5-b63d-dd3465d55e87","responses":{"200":"3f6f4f2b-a270-45e3-b23b-4a6fc49c1b15","400":"e9f8d4af-ee97-4569-bdeb-f11f15aa18be","401":"4c9ff31d-34e7-493e-8365-2f3bfc9588c4","402":"1e34eb1c-a25d-4e97-ae79-9662ce35e22c","404":"627f02c5-2628-46e9-8462-524d70fe5fce","410":"65c76438-8416-4c19-9c1e-73c3775e534b","422":"f3b3a091-9dec-485b-8a4a-c6b83b4bd090"},"security":["82e22f6d-b171-46f3-b7d5-5e4f1d024b02"],"method":"post","type":"path","servers":["479f4945-1cfc-49e3-9171-174aedcb516d","a6585785-966f-49c2-8a2b-d9469c88a061"],"path":"/api/v1/predict","baseUrlOptions":["https://api.halfpagetechnologies.com/backend","https://staging-api.halfpagetechnologies.com/backend"],"title":"Run a prediction","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"schema":{"properties":{"image_id":{"type":"string","title":"Image Id","examples":["3fa85f64-5717-4562-b3fc-2c963f66afa6"],"isRequired":true,"uniqueKey":"image_id","typeLabel":"string"},"model_id":{"type":"string","format":"uuid","title":"Model Id","examples":["c0ffee00-1234-5678-9abc-def012345678"],"isRequired":true,"uniqueKey":"model_id","typeLabel":"string\u003cuuid>"},"segmentation_channels":{"oneOf":[{"type":"object","title":"SegmentationChannels","description":"For a multiplex image only: which channels to segment on, 0-based. Segmentation reads at most 3 channels, so it uses a nuclear stain plus an optional membrane or cytoplasm marker. Defaults to channel 0 as the nucleus and channel 1 as the cytoplasm.","required":["nucleus"],"properties":{"nucleus":{"type":"integer","minimum":0,"title":"Nucleus","description":"The nuclear stain's channel (for example DAPI).","isRequired":true,"uniqueKey":"segmentation_channels.oneOf.0.nucleus","typeLabel":"integer"},"cytoplasm":{"oneOf":[{"type":"integer","title":"Cytoplasm","description":"A membrane or cytoplasm marker's channel, for whole-cell outlines. Leave it out to segment nuclei.","minimum":0,"uniqueKey":"segmentation_channels.oneOf.0.cytoplasm.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Cytoplasm","description":"A membrane or cytoplasm marker's channel, for whole-cell outlines. Leave it out to segment nuclei.","uniqueKey":"segmentation_channels.oneOf.0.cytoplasm.oneOf.1","typeLabel":"null"}],"uniqueKey":"segmentation_channels.oneOf.0.cytoplasm","typeLabel":"integer | null"}},"uniqueKey":"segmentation_channels.oneOf.0","typeLabel":"SegmentationChannels · object"},{"type":"null","description":"For a multiplex image only: which channels to segment on, 0-based. Segmentation reads at most 3 channels, so it uses a nuclear stain plus an optional membrane or cytoplasm marker. Defaults to channel 0 as the nucleus and channel 1 as the cytoplasm.","uniqueKey":"segmentation_channels.oneOf.1","typeLabel":"null"}],"uniqueKey":"segmentation_channels","typeLabel":"SegmentationChannels · object | null"},"channel":{"oneOf":[{"type":"integer","title":"Channel","description":"For a multiplex image only: segment this one channel on its own, 0-based, instead of `segmentation_channels`. Run one prediction per channel to use a different model on each.","minimum":0,"uniqueKey":"channel.oneOf.0","typeLabel":"integer"},{"type":"null","title":"Channel","description":"For a multiplex image only: segment this one channel on its own, 0-based, instead of `segmentation_channels`. Run one prediction per channel to use a different model on each.","uniqueKey":"channel.oneOf.1","typeLabel":"null"}],"uniqueKey":"channel","typeLabel":"integer | null"}},"type":"object","required":["image_id","model_id"],"title":"PredictRequest","description":"Run a model over one uploaded image. `image_id` must be `ready` (see\n`GET /upload/{image_id}`) and `model_id` must be one of the ids returned by\n`GET /models`.","uniqueKey":"","typeLabel":"PredictRequest · object"},"examples":{"Example":{"title":"Example","value":{"image_id":"3fa85f64-5717-4562-b3fc-2c963f66afa6","model_id":"c0ffee00-1234-5678-9abc-def012345678","segmentation_channels":{"nucleus":1,"cytoplasm":1},"channel":1}}},"exampleType":"generated"}},"required":true,"exampleType":"generated"},"responses":{"3f6f4f2b-a270-45e3-b23b-4a6fc49c1b15":{"description":"Successful Response","content":{"application/json":{"schema":{"properties":{"prediction_id":{"type":"string","title":"Prediction Id","examples":["b1e5c7d2-9a4f-4c3b-8e2d-1f6a7b8c9d0e"],"isRequired":true,"uniqueKey":"prediction_id","typeLabel":"string"},"status":{"type":"string","const":"submitted","title":"Status","isRequired":true,"uniqueKey":"status","typeLabel":"string"}},"type":"object","required":["prediction_id","status"],"title":"PredictionAccepted","description":"Acknowledgement that a prediction was queued. `prediction_id` is the\none to poll.","uniqueKey":"","typeLabel":"PredictionAccepted · object"},"examples":{"Example":{"title":"Example","value":{"prediction_id":"b1e5c7d2-9a4f-4c3b-8e2d-1f6a7b8c9d0e","status":"submitted"}}},"exampleType":"generated"}},"exampleType":"generated"},"e9f8d4af-ee97-4569-bdeb-f11f15aa18be":{"description":"`channel` or `segmentation_channels` doesn't fit the image.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"4c9ff31d-34e7-493e-8365-2f3bfc9588c4":{"description":"Missing or invalid credentials. Supply a valid `Authorization: Bearer hp_live_...` API key.","content":{"application/json":{"schema":{"properties":{"detail":{"type":"string","title":"Detail","examples":["Job with id 11111111-1111-1111-1111-111111111111 not found"],"isRequired":true,"uniqueKey":"detail","typeLabel":"string"}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"The body returned for a handled error: a single human-readable\n``detail`` string.","uniqueKey":"","typeLabel":"ErrorResponse · object"},"example":{"detail":"Requires authentication"},"examples":{"Example":{"title":"Example","value":{"detail":"Requires authentication"}}},"exampleType":"examples"}},"exampleType":"examples"},"1e34eb1c-a25d-4e97-ae79-9662ce35e22c":{"description":"Monthly analysis quota exceeded for your plan. Upgrade to run more analyses.","content":{"application/json":{"schema":{"properties":{"detail":{"type":"string","title":"Detail","examples":["Job with id 11111111-1111-1111-1111-111111111111 not found"],"isRequired":true,"uniqueKey":"detail","typeLabel":"string"}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"The body returned for a handled error: a single human-readable\n``detail`` string.","uniqueKey":"","typeLabel":"ErrorResponse · object"},"example":{"detail":"You've reached your monthly analysis limit. Upgrade to run more."},"examples":{"Example":{"title":"Example","value":{"detail":"You've reached your monthly analysis limit. Upgrade to run more."}}},"exampleType":"examples"}},"exampleType":"examples"},"627f02c5-2628-46e9-8462-524d70fe5fce":{"description":"The resource does not exist, or is not in your organization.","content":{"application/json":{"schema":{"properties":{"detail":{"type":"string","title":"Detail","examples":["Job with id 11111111-1111-1111-1111-111111111111 not found"],"isRequired":true,"uniqueKey":"detail","typeLabel":"string"}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"The body returned for a handled error: a single human-readable\n``detail`` string.","uniqueKey":"","typeLabel":"ErrorResponse · object"},"example":{"detail":"Image with id 3fa85f64-5717-4562-b3fc-2c963f66afa6 not found"},"examples":{"Example":{"title":"Example","value":{"detail":"Image with id 3fa85f64-5717-4562-b3fc-2c963f66afa6 not found"}}},"exampleType":"examples"}},"exampleType":"examples"},"65c76438-8416-4c19-9c1e-73c3775e534b":{"description":"The selected model's weights have been cleaned up. Retrain the model to recover.","content":{"_mintlify/placeholder":{"schema":{"type":"object","description":""}}}},"f3b3a091-9dec-485b-8a4a-c6b83b4bd090":{"description":"An id in the path or body is not a valid UUID (rejected before it reaches the database).","content":{"application/json":{"schema":{"properties":{"detail":{"type":"string","title":"Detail","examples":["Job with id 11111111-1111-1111-1111-111111111111 not found"],"isRequired":true,"uniqueKey":"detail","typeLabel":"string"}},"type":"object","required":["detail"],"title":"ErrorResponse","description":"The body returned for a handled error: a single human-readable\n``detail`` string.","uniqueKey":"","typeLabel":"ErrorResponse · object"},"example":{"detail":"Input should be a valid UUID"},"examples":{"Example":{"title":"Example","value":{"detail":"Input should be a valid UUID"}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"82e22f6d-b171-46f3-b7d5-5e4f1d024b02":{"HTTPBearer":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"HTTPBearer"}}},"servers":{"479f4945-1cfc-49e3-9171-174aedcb516d":{"url":"https://api.halfpagetechnologies.com/backend","description":"Production"},"a6585785-966f-49c2-8a2b-d9469c88a061":{"url":"https://staging-api.halfpagetechnologies.com/backend","description":"Staging"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"http","scheme":"bearer","scopes":[],"schemeName":"HTTPBearer"},"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":"HTTPBearer","name":"Authorization"}],"title":"HTTPBearer"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"halfpage","siteName":"HalfPage API","title":"Run a prediction - HalfPage API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-13T13:47:24.859Z","originalFileLocation":"api-reference/predict/run-a-prediction.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=\"Start an asynchronous segmentation of a ready image. Returns immediately with a prediction_id; the segmentation itself runs on a GPU worker. Poll GET /predict/{prediction_id} until status is SUCCEEDED, then hand its image_id and channel to the /export/* endpoints. Each run counts against your plan\u0026#x27;s monthly analysis quota (402 when exceeded). The image_id and model_id are org-scoped: an id outside your organization returns 404. A non-UUID model_id is rejected with 422 before it reaches the database.\">\u003cmeta data-mint-head name=\"application-name\" content=\"HalfPage API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/halfpage/xwTInuIADjWWIjil/_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/halfpage/xwTInuIADjWWIjil/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/halfpage/xwTInuIADjWWIjil/_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/halfpage/xwTInuIADjWWIjil/_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/halfpage/xwTInuIADjWWIjil/_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/halfpage/xwTInuIADjWWIjil/_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/halfpage/xwTInuIADjWWIjil/_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/halfpage/xwTInuIADjWWIjil/_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/halfpage/xwTInuIADjWWIjil/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Run a prediction - HalfPage API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Start an asynchronous segmentation of a ready image. Returns immediately with a prediction_id; the segmentation itself runs on a GPU worker. Poll GET /predict/{prediction_id} until status is SUCCEEDED, then hand its image_id and channel to the /export/* endpoints. Each run counts against your plan\u0026#x27;s monthly analysis quota (402 when exceeded). The image_id and model_id are org-scoped: an id outside your organization returns 404. A non-UUID model_id is rejected with 422 before it reaches the database.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"HalfPage API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.halfpagetechnologies.com/api-reference/predict/run-a-prediction\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://halfpage.mintlify.site/_mintlify/api/og/v2?division=predict\u0026amp;title=Run+a+prediction\u0026amp;description=Start+an+asynchronous+segmentation+of+a+ready+image.%0A%0AReturns+immediately+with+a+%60prediction_id%60%3B+the+segmentation+itself+runs+on+a%0AGPU+worker.+Poll+%60GET+%2Fpredi\u0026amp;theme=51dfeddd43e2841de8834c15\u0026amp;signature=3a54a0f7ba923c8a3d2311ba599d1cc2423bd95f22d3994ac448807d369119dc\">\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=\"Run a prediction - HalfPage API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Start an asynchronous segmentation of a ready image. Returns immediately with a prediction_id; the segmentation itself runs on a GPU worker. Poll GET /predict/{prediction_id} until status is SUCCEEDED, then hand its image_id and channel to the /export/* endpoints. Each run counts against your plan\u0026#x27;s monthly analysis quota (402 when exceeded). The image_id and model_id are org-scoped: an id outside your organization returns 404. A non-UUID model_id is rejected with 422 before it reaches the database.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://halfpage.mintlify.site/_mintlify/api/og/v2?division=predict\u0026amp;title=Run+a+prediction\u0026amp;description=Start+an+asynchronous+segmentation+of+a+ready+image.%0A%0AReturns+immediately+with+a+%60prediction_id%60%3B+the+segmentation+itself+runs+on+a%0AGPU+worker.+Poll+%60GET+%2Fpredi\u0026amp;theme=51dfeddd43e2841de8834c15\u0026amp;signature=3a54a0f7ba923c8a3d2311ba599d1cc2423bd95f22d3994ac448807d369119dc\">\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/halfpage/xwTInuIADjWWIjil/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"HalfPage API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2563eb\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.halfpagetechnologies.com/api-reference/predict/run-a-prediction\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/predict/run-a-prediction.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.halfpagetechnologies.com/#organization\",\"name\":\"HalfPage API\",\"url\":\"https://docs.halfpagetechnologies.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/halfpage/rhKdEUCb6V98b2yX/logo/light.svg?fit=max\u0026auto=format\u0026n=rhKdEUCb6V98b2yX\u0026q=85\u0026s=667c16283d8ca68ed577d207d7ce5249\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.halfpagetechnologies.com#website\",\"name\":\"HalfPage API\",\"url\":\"https://docs.halfpagetechnologies.com\",\"publisher\":{\"@id\":\"https://docs.halfpagetechnologies.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.halfpagetechnologies.com/api-reference/predict/run-a-prediction#webpage\",\"url\":\"https://docs.halfpagetechnologies.com/api-reference/predict/run-a-prediction\",\"name\":\"Run a prediction\",\"description\":\"Start an asynchronous segmentation of a ready image. Returns immediately with a prediction_id; the segmentation itself runs on a GPU worker. Poll GET /predict/{prediction_id} until status is SUCCEEDED, then hand its image_id and channel to the /export/* endpoints. Each run counts against your plan's monthly analysis quota (402 when exceeded). The image_id and model_id are org-scoped: an id outside your organization returns 404. A non-UUID model_id is rejected with 422 before it reaches the database.\",\"dateModified\":\"2026-11-13T13:47:24.859Z\",\"isPartOf\":{\"@id\":\"https://docs.halfpagetechnologies.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.halfpagetechnologies.com/api-reference/predict/run-a-prediction#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.halfpagetechnologies.com/api-reference/predict/run-a-prediction#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"HalfPage API\",\"item\":\"https://docs.halfpagetechnologies.com\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Run a prediction\",\"item\":\"https://docs.halfpagetechnologies.com/api-reference/predict/run-a-prediction\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.halfpagetechnologies.com/api-reference/predict/run-a-prediction#apireference\",\"headline\":\"Run a prediction\",\"name\":\"Run a prediction\",\"description\":\"Start an asynchronous segmentation of a ready image. Returns immediately with a prediction_id; the segmentation itself runs on a GPU worker. Poll GET /predict/{prediction_id} until status is SUCCEEDED, then hand its image_id and channel to the /export/* endpoints. Each run counts against your plan's monthly analysis quota (402 when exceeded). The image_id and model_id are org-scoped: an id outside your organization returns 404. A non-UUID model_id is rejected with 422 before it reaches the database.\",\"url\":\"https://docs.halfpagetechnologies.com/api-reference/predict/run-a-prediction\",\"mainEntityOfPage\":{\"@id\":\"https://docs.halfpagetechnologies.com/api-reference/predict/run-a-prediction#webpage\"},\"dateModified\":\"2026-11-13T13:47:24.859Z\",\"publisher\":{\"@id\":\"https://docs.halfpagetechnologies.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.halfpagetechnologies.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"HalfPage API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"HalfPage API\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/predict/run-a-prediction.md","siteName":"HalfPage API","nav":{"global":null,"tabs":[{"tab":"Guides","pages":[{"title":"Guides","href":"/introduction"}]},{"tab":"API reference","groups":[{"group":"upload","pages":[{"title":"Upload an image","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/v1/upload","href":"/api-reference/upload/upload-an-image"},{"title":"Finish a resumable upload","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/v1/upload/{image_id}/complete","href":"/api-reference/upload/finish-a-resumable-upload"},{"title":"Get upload status","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/upload/{image_id}","href":"/api-reference/upload/get-upload-status"},{"title":"Delete an image","description":"Permanently delete an image and all of its derived storage (converted\nTIFF/PNG, thumbnail, and any training artifacts), freeing its slot against\nyour storage cap. Any resumable upload still in flight is aborted first, so\nits uploaded chunks are released too. Scoped to your organization: an image\noutside it returns `404`, exactly like the reads.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /api/v1/upload/{image_id}","href":"/api-reference/upload/delete-an-image"}]},{"group":"predict","pages":[{"title":"Run a prediction","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/v1/predict","href":"/api-reference/predict/run-a-prediction"},{"title":"Get prediction status","description":"Poll a prediction until it finishes.\n\nKeep polling until `status` is `SUCCEEDED` (or `FAILED`). A finished run\ncarries the `cell_count` detected. Pass its `image_id` and `channel` to the\n`/export/*` endpoints. A non-UUID `prediction_id` is rejected with `422` before it\nreaches the database.","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/predict/{prediction_id}","href":"/api-reference/predict/get-prediction-status"}]},{"group":"export","pages":[{"title":"Export measurements (CSV)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/export/{image_id}/measurements.csv","href":"/api-reference/export/export-measurements-csv"},{"title":"Export ROIs (GeoJSON)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/export/{image_id}/rois.geojson","href":"/api-reference/export/export-rois-geojson"},{"title":"Export image with mask overlay (PNG)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/export/{image_id}/overlay.png","href":"/api-reference/export/export-image-with-mask-overlay-png"},{"title":"Export ROIs (ImageJ ZIP)","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/export/{image_id}/rois.zip","href":"/api-reference/export/export-rois-imagej-zip"}]},{"group":"models","pages":[{"title":"List available models","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/models","href":"/api-reference/models/list-available-models"}]},{"group":"shares","pages":[{"title":"List shares","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/shares","href":"/api-reference/shares/list-shares"},{"title":"Share an image","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json post /api/v1/shares","href":"/api-reference/shares/share-an-image"},{"title":"Get a share","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json get /api/v1/shares/{share_id}","href":"/api-reference/shares/get-a-share"},{"title":"Revoke a share","deprecated":null,"version":null,"openapi":"/api-reference/openapi.json delete /api/v1/shares/{share_id}","href":"/api-reference/shares/revoke-a-share"}]}]}]},"basePath":"","title":"Run a prediction - HalfPage API","buildId":"dpl_5tKr6cUUeuVJdEZ9JAEY3h4soMJ8","deploymentId":"dpl_5tKr6cUUeuVJdEZ9JAEY3h4soMJ8","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DbeN8Wo6.js","utils-CwSb5Doc.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-BmREeM3N.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-AYjWerCj.js","snippetPresets-QD4ULQlp.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","ApiExamples-Digj5cjF.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-CiHrzluR.js","shallow-D7h7pFGg.js","getApiPlaygroundDisplay-mlxkpAUf.js","CodeSnippet-D2rH5lZI.js","CodeSnippets-B53ulOaL.js","Page-CqcDm2To.js","getPastedJson-DxGeNMih.js","icon-BHbyrebp.js","MethodPill-C7F_KEEJ.js","DuplicateIcon-j3c5-73z.js","createIcon-OvCnyFqD.js","DynamicMarkdown-DpAS3GCb.js","SectionHeading-DMPpdrvW.js","axios-vUo_bRtp.js","Markdown-D7pDRguu.js","clsx-2_c6mSt_.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-Cu7_SikL.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-ydqCcy4b.js"]}