# HalfPage API > Programmatic Cellpose cell segmentation for microscopy images — upload, predict, and export ROIs and measurements. ## Docs - [Using with AI agents](https://docs.halfpagetechnologies.com/ai-agents.md): Drive the HalfPage API from an AI agent using the OpenAPI spec, llms.txt, and the hosted MCP server. - [Export measurements (CSV)](https://docs.halfpagetechnologies.com/api-reference/export/export-measurements-csv.md): Download per-cell measurements for a completed segmentation as CSV — one row per detected ROI, with morphometric columns. Returned as a file attachment. - [Export project measurements (CSV)](https://docs.halfpagetechnologies.com/api-reference/export/export-project-measurements-csv.md): Download per-cell measurements for a whole project as a single CSV — every analyzed image in the project, one row per detected ROI. - [Export ROIs (GeoJSON)](https://docs.halfpagetechnologies.com/api-reference/export/export-rois-geojson.md): Download a segmentation's ROIs as a GeoJSON FeatureCollection, one polygon feature per cell in image pixel coordinates. Returned as a file attachment. - [Export ROIs (ImageJ ZIP)](https://docs.halfpagetechnologies.com/api-reference/export/export-rois-imagej-zip.md): Download a segmentation's ROIs as a ZIP of ImageJ-compatible `.roi` files, ready to open in Fiji/ImageJ's ROI Manager. Returned as a file attachment. - [Create an image record](https://docs.halfpagetechnologies.com/api-reference/image/create-an-image-record.md): Create an image record for the resumable upload flow. - [Delete an image](https://docs.halfpagetechnologies.com/api-reference/image/delete-an-image.md): Permanently delete an image and all of its derived storage (converted TIFF/PNG, thumbnail, and any training artifacts). Scoped to your organization — an image outside it returns `404`, exactly like the reads. - [Get image status](https://docs.halfpagetechnologies.com/api-reference/image/get-image-status.md): Fetch an image's upload lifecycle and metadata. - [Get job status](https://docs.halfpagetechnologies.com/api-reference/job/get-job-status.md): Poll a job's status after submitting a prediction or training job. - [Submit a prediction job](https://docs.halfpagetechnologies.com/api-reference/job/submit-a-prediction-job.md): Start an asynchronous segmentation job for a ready image. - [Submit a training job](https://docs.halfpagetechnologies.com/api-reference/job/submit-a-training-job.md): Start an asynchronous job that fine-tunes a custom model on segmented images. Returns a `job_id`; poll `GET /job/{job_id}` until `COMPLETED`. The trained model then appears in `GET /models` for use in future predictions. The base `model_id` and every `image_id` are org-scoped: an id outside your org… - [List available models](https://docs.halfpagetechnologies.com/api-reference/models/list-available-models.md): List the segmentation models available to your organization. - [Create a refinement](https://docs.halfpagetechnologies.com/api-reference/segmentation/create-a-refinement.md): Fork a new, editable segmentation from an existing one, seeded with a copy of its annotations. Use this to iterate on a model prediction without mutating the original — the new segmentation's `parent_segmentation_id` points back to the source. Scoped to your organization — a parent segmentation outs… - [Generate masks from annotations](https://docs.halfpagetechnologies.com/api-reference/segmentation/generate-masks-from-annotations.md): Rasterize a segmentation's ROI annotations into a pixel mask and store it. - [Get segmentation metadata](https://docs.halfpagetechnologies.com/api-reference/segmentation/get-segmentation-metadata.md): Fetch a segmentation's metadata: its source, whether its annotations are `ready`, and its ROI (`annotation_count`). - [Abort a resumable upload](https://docs.halfpagetechnologies.com/api-reference/upload/abort-a-resumable-upload.md): Abort an in-flight resumable upload: discard any uploaded chunks from storage and mark the image `failed`. The image record itself remains and still counts against your storage cap — `DELETE /image/{image_id}` frees the slot. - [Finish a resumable upload](https://docs.halfpagetechnologies.com/api-reference/upload/finish-a-resumable-upload.md): Assemble a resumable upload from its uploaded parts, mark the image `processing`, and kick off async conversion. Returns `202` — conversion runs off the request path, so poll `GET /image/{image_id}` until `ready`. - [Start a resumable upload](https://docs.halfpagetechnologies.com/api-reference/upload/start-a-resumable-upload.md): Open an S3 multipart upload for an existing image row and return presigned part URLs. PUT each part directly to its URL, then call `/complete`. Gates ownership and the org image cap before any bytes are stored (`402` when the storage cap is reached). - [Upload an image (single request)](https://docs.halfpagetechnologies.com/api-reference/upload/upload-an-image-single-request.md): Upload a microscopy image in a single request (`multipart/form-data` with a `file` field) — the simplest way to get an image into HalfPage. - [Authentication](https://docs.halfpagetechnologies.com/authentication.md): Create an API key in the dashboard and authenticate requests with a bearer token. - [HalfPage API](https://docs.halfpagetechnologies.com/introduction.md): Run Cellpose cell segmentation on your microscopy images programmatically — upload an image, run a prediction, and export ROIs and measurements. - [Quickstart](https://docs.halfpagetechnologies.com/quickstart.md): Upload a microscopy image, run a segmentation, and download the ROIs — end to end. ## OpenAPI Specs - [openapi](https://docs.halfpagetechnologies.com/api-reference/openapi.json)