Run ModAstera workflows from your own backend: create datasets, launch training and evaluation pipelines, deploy models, call predictors, and retrieve files or artifacts — all with API keys, no browser required.
These docs target server-side clients. Every example works with curl or Python 3.10+ and assumes you have workspace access and a raw API key issued from the authenticated platform frontend. The key authorizes operational API calls only; account-management routes continue to use frontend token authentication.
Start in the platform frontend. After you create a user account, complete onboarding, and copy the key shown by the frontend, you can verify authentication, create a dataset, upload a sample, and read summary data.
Open the platform frontend, then use Get Started or Get Started for Free to begin account creation.
Create a platform account
Open the platform frontend, such as http://localhost:2970/en in local development, and choose Get Started. Create an account with first name, last name, email address, password, and the verification challenge. Google signup is available when the environment has Google OAuth configured.
Complete onboarding
After signup or login, finish the onboarding form. Standalone users complete profile details (Role, AI Experience Level, interests, and terms acceptance), then create an organization with name, company type, company size, and optional team invitations.
Create and copy a key
From the workspace, open Settings, select Apps and API Keys, then choose Create API Key. Enter a name and optional expiry, create the key, and copy the raw value from the success dialog. The frontend only shows the raw key at creation time.
Set environment variables
Keep all secrets and resource ids in environment variables — never hardcode keys.
Verify operational access
Call /datasets/datasets/ before starting any workflow.
Run one workflow end to end
Create a dataset, upload a file, and read summary or analysis data.
The fastest way to validate a headless integration is to carry one set of ids through the full workflow. Each response gives you the next id to store in an environment variable or secret-backed job context.
The handoff sequence is DATASET_ID -> TASK_QUERY_ID -> MODEL_VERSION_ID -> DEPLOYMENT_ID -> prediction.
Create data
Create a dataset, upload samples, and save the returned dataset id as DATASET_ID.
Train and evaluate
Create a task query with the dataset id, wait until response_status is completed, start a task run with task_query_id, then poll progress until task_status is completed or ended.
Select a model version
List model versions for the task query, compare candidates if needed, and save the chosen id as MODEL_VERSION_ID.
Deploy and predict
Create a deployment, save DEPLOYMENT_ID, call the predictor from your server, then read metrics and artifacts for auditability.
End-to-end id handoffshell
# 1. Create a dataset and upload at least one training sample.curl-X POST "$MODASTERA_API_BASE_URL/datasets/datasets/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"name":"first-model-workflow","format":"image","description":"End-to-end headless workflow"}'curl-X POST "$MODASTERA_API_BASE_URL/datasets/samples/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-F"dataset=$DATASET_ID" \
-F"split=training" \
-F"file=@./sample.png"# 2. Create a task query and wait for pipeline generation to complete.curl-X POST "$MODASTERA_API_BASE_URL/agents/task-queries/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"name":"first-model-training","instruction":"Train and evaluate an image classifier","dataset_id":"'$DATASET_ID'"}'curl-X PATCH "$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"instruction":"Train an image classification model and evaluate it on the validation split."}'curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# 3. Start training/evaluation and poll until task_status is completed or ended.curl-X POST "$MODASTERA_API_BASE_URL/agents/task-runs/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"task_query_id":"'$TASK_QUERY_ID'"}'curl"$MODASTERA_API_BASE_URL/agents/task-progress/$TASK_QUERY_ID/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# 4. Select a model version, create a deployment, and call the predictor.curl"$MODASTERA_API_BASE_URL/resources/pipeline-model-versions/?task_query=$TASK_QUERY_ID" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl-X POST "$MODASTERA_API_BASE_URL/resources/deployments/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"name":"first-model-predictor","task_query":"'$TASK_QUERY_ID'","selected_model_version":"'$MODEL_VERSION_ID'","selected_checkpoint_stage":"best"}'curl-X POST "$MODASTERA_API_BASE_URL/executors/predictor/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-F"deployment=$DEPLOYMENT_ID" \
-F"file=@./holdout.png"
API-key authentication is an operational client credential, not an account-management credential. Account creation, organization or team setup, email confirmation, onboarding, and key creation happen in the platform frontend. After that, machine clients use the raw API key for dataset, pipeline, run, deployment, and result APIs.
REST clients authenticate with an API key in the Authorization header. Prefer the explicit Api-Key scheme for new integrations. The Bearer scheme is also accepted for headless API-key auth when a client only exposes a bearer-token field: Authorization: Bearer <raw_api_key>.
# Prefer WebSocket Authorization headers when your client supports them.
Authorization: Api-Key <raw_api_key>
# Browser-style WebSocket clients usually cannot set custom headers.
# Use a URL-encoded api_key query parameter only for WebSocket connections.
wss://api.modastera.com/ws/task-runs/<task_query_id>/?api_key=<urlencoded_raw_api_key>
Headless integrations never depend on localStorage, cookies, or other browser-only state. Every response returns the ids, status handles, artifact references, and visualization-ready data needed for the next request.
Resources — datasets, samples, task queries, runs, deployments, artifacts, and reports all use backend ids returned by API responses.
Ownership — keys authenticate as their owning user for operational object scoping. They do not grant access to account setup, organization management, or team invitations.
Availability — these docs only describe endpoints that are stable enough for external use. Surfaces still undergoing schema or permission review are excluded until they graduate. See the API Reference for endpoint-level coverage.
The public headless guide covers the stable workflow families below. Endpoint families not listed here are outside the current public headless surface and are intentionally omitted until their contracts are stable.
Workflow family
Public routes
Status
Notes
Setup and authentication
Frontend onboarding, Authorization header
Covered
API keys are obtained in the platform frontend and used server-side for operational APIs.
Includes dataset/sample CRUD, local registration, CSV/JSON/COCO and mask ingestion, verification, analysis, sample query, and append-only split rebalance.
Long-running operations return endpoint-specific handles. Pipeline generation uses the task query id and response_status; task execution uses the same task query id and task_status. Task runs return a task_query payload and may include a websocket_url for live updates, but REST polling through /agents/task-progress/<task_query_id>/ remains the durable source of truth. Dataset analysis, CSV and mask imports, dataset preparation, snapshot exports, model-card streams, and generated reports use endpoint-specific status fields, job ids, progress URLs, event streams, or downloads.
Task query terminal statuses include completed, ended, failed, and interrupted; interrupting can appear while cancellation is in flight. Planning terminal statuses are completed and error. Other endpoint families may use endpoint-local job status fields, so branch on the fields returned by the endpoint you started.
Pagination and filtering are endpoint-specific, not uniform across the API. Sample, annotation-file, artifact, and usage listings use their documented page or filter parameters. The full /agents/task-queries/ list remains a plain array. Dataset summaries with view=list and compact task-query synopses support opt-in cursor pagination when page_size or cursor is supplied; omitting both preserves their legacy raw-array response. Some workflow operations, such as sample query, carry page and page_sizein the request body instead of the query string.
Paginated and filtered listings
# Page-number pagination remains endpoint-specific.curl"$MODASTERA_API_BASE_URL/datasets/samples/?dataset=$DATASET_ID&page=1&page_size=25" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl"$MODASTERA_API_BASE_URL/agents/experiments/$EXPERIMENT_ID/artifacts/?include_payload=0" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl"$MODASTERA_API_BASE_URL/resources/all-usage/?deployment=$DEPLOYMENT_ID&page=1&page_size=25" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Cursor pagination is opt-in for these compact lists.curl"$MODASTERA_API_BASE_URL/datasets/summary/?view=list&page_size=25" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl"$MODASTERA_API_BASE_URL/agents/task-queries-synopsis/?page_size=25" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Follow the returned next or previous URL exactly with the same API key.# Do not decode, edit, or construct the cursor yourself.NEXT_URL="<opaque next URL returned by the response>"curl"$NEXT_URL" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"
Error responses are not yet a single uniform envelope across every route. Some endpoints return {"error":"..." }, some return {"detail":"..." }, and serializer validation returns field maps. Normalize errors in your client before retrying or showing user-facing remediation.
Recommended normalized client shapejson
{
"code": "permission_denied",
"message": "You do not have access to this dataset.",
"request_id": "req_01HZY...",
"details": {
"dataset": ["Object is not visible to this API key owner."]
}
}
Code
Meaning
401
Missing, malformed, revoked, inactive, or expired API key.
403
Key owner is authenticated but lacks object permission.
404
Object is missing or intentionally hidden by object scoping.
409
Operation conflicts with current resource or job state.
429
Rate limited — retry after the returned delay; heavy compute endpoints may have stricter limits.
Dataset routes are the first public workflow. They cover dataset CRUD, sample CRUD, sample upload and runtime payloads, filtered or explicit-selection cloning, CSV and deployment-execution imports, local no-copy registration, dashboard summaries, verification, analysis, CSV/platform JSON/COCO annotations, binary or color-map masks, sample querying, and split creation.
Manage datasets and samples
# Dataset list, detail, update, and delete.curl"$MODASTERA_API_BASE_URL/datasets/datasets/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl"$MODASTERA_API_BASE_URL/datasets/datasets/$DATASET_ID/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl-X PATCH "$MODASTERA_API_BASE_URL/datasets/datasets/$DATASET_ID/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"description":"Updated from a server-side client"}'# Upload and inspect samples.curl-X POST "$MODASTERA_API_BASE_URL/datasets/samples/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-F"dataset=$DATASET_ID" \
-F"split=validation" \
-F"metadata={\"source\":\"headless-import\"}" \
-F"file=@./sample.png"curl"$MODASTERA_API_BASE_URL/datasets/samples/?dataset=$DATASET_ID&page=1&page_size=25" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Query samples and create reproducible splits.curl-X POST "$MODASTERA_API_BASE_URL/datasets/datasets/$DATASET_ID/sample-query/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"split":"training","page":1,"page_size":50,"include_ids":true}'curl-X POST "$MODASTERA_API_BASE_URL/datasets/datasets/create-random-splits/?response=compact" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"dataset":"'$DATASET_ID'","training":0.7,"validation":0.2,"test":0.1,"splits_seed":42,"lock_splits":true}'# Generate an annotation export. The response is dataset JSON with output_annotations_file updated.curl"$MODASTERA_API_BASE_URL/datasets/datasets/$DATASET_ID/download-annotations/?file_format=csv" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"
Clone a full or filtered dataset selectionshell
# Clone the source dataset using its current filtered selection.# sample_ids and sample_query are alternatives; never send both.curl-X POST "$MODASTERA_API_BASE_URL/datasets/datasets/$DATASET_ID/clone/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d '{
"name":"approved-training-copy",
"description":"Private clone created from an approved training selection",
"sample_query":{
"split":"training",
"search":"",
"filters":{
"field":"label_value",
"label":"review_status",
"cmp":"eq",
"value":"approved" }
},
"preserve_splits":true
}'
# For an explicit bounded selection, replace sample_query with sample_ids.curl-X POST "$MODASTERA_API_BASE_URL/datasets/datasets/$DATASET_ID/clone/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d '{
"name":"explicit-sample-copy",
"sample_ids":["'$SAMPLE_ID'"],
"preserve_splits":false
}'
Import annotations and maintain splits
# Import COCO JSON and apply matching annotations by image filename.curl-X POST "$MODASTERA_API_BASE_URL/datasets/annotations-files/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-F"dataset=$DATASET_ID" \
-F"file_format=coco" \
-F"split=training" \
-F"file=@./annotations.coco.json"# Upload binary masks asynchronously. Repeat the masks field for each file.curl-X POST "$MODASTERA_API_BASE_URL/datasets/$DATASET_ID/upload-masks/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-F"masks=@./sample-001.png" \
-F"masks=@./sample-002.png" \
-F"label=lesion" \
-F"split=training" \
-F"async=true"# Color-map masks use hex colors mapped to label names.curl-X POST "$MODASTERA_API_BASE_URL/datasets/$DATASET_ID/upload-masks/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-F"masks=@./sample-003.png" \
-F"mask_mode=color_map" \
-F'color_label_map={"#ff0000":"tumor","#00ff00":"stroma"}' \
-F'background_colors=["#000000"]' \
-F"async=true"curl"$MODASTERA_API_BASE_URL/datasets/$DATASET_ID/mask-upload-progress/$JOB_ID/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"
Pipeline clients create or select a task query, generate or refresh its definition, wait for planning to finish, start a run, track training and evaluation, then fetch results, model cards, snapshots, and deployable model versions. The planning state is response_status; the durable training/evaluation state is task_status.
Create the pipeline record
Call POST /agents/task-queries/ with instruction and dataset_id. When the workspace offers multiple ML backends, list available profiles first and pass ml_backend_profile_id now; explicit profile selection is creation-only. Clones, fine-tunes, reruns, and later model versions inherit the applicable pinned source profile. Save the returned id as TASK_QUERY_ID.
Verify preparation and the runtime contract
Read dataset_preparation from task-query detail. The backend may adopt the source dataset, reuse a prepared dataset, or create a derived split dataset. Then read /runtime-contract/to confirm the adopted dataset, target, architecture, criterion, metrics, and validation warnings.
Review segmentation architecture choices
For segmentation workflows, leave model selection automatic unless the integration has verified a specific choice. The architecture catalog can include EoMT DINOv2 panoptic variants and RF-DETR Segmentation or RTMDet-Ins instance variants. After planning, inspect the task-scoped related models and confirm support on the selected ML backend before pinning a key or swapping the architecture.
Plan, then start training and evaluation
Refresh planning with PATCH /agents/task-queries/<id>/, wait for response_status: completed, then call POST /agents/task-runs/ with task_query_id. A 202 means the run started, queued, or was already running.
Recover and read final outputs
Use WebSockets for live updates, but keep polling or refetching REST state. The final /run-summary/ consolidates the runtime contract, dataset verification, latest model version, canonical metrics, analysis, and failure details. Follow generated media relay URLs from /results/ with the same API key.
Generate, run, and collect results
# Create a pipeline record. Save the returned id as TASK_QUERY_ID.curl"$MODASTERA_API_BASE_URL/agents/task-queries/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl-X POST "$MODASTERA_API_BASE_URL/agents/task-queries/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d '{
"name":"headless-training-run",
"instruction":"Train and evaluate an image classifier",
"dataset_id":"'$DATASET_ID'" }'
# Generate or refresh the pipeline definition.curl-X PATCH "$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"instruction":"Train an image classification model and evaluate it on the validation split."}'# Optional live planning channels. URL-encode the raw key first.ENCODED_API_KEY=$(python3 -c'import os, urllib.parse; print(urllib.parse.quote(os.environ["MODASTERA_API_KEY"], safe=""))')
printf "%s\n""$MODASTERA_WS_BASE_URL/ws/task-status/$TASK_QUERY_ID/?api_key=$ENCODED_API_KEY"printf "%s\n""$MODASTERA_WS_BASE_URL/ws/task-response/$TASK_QUERY_ID/?api_key=$ENCODED_API_KEY"# Durable readiness check. Wait for response_status=completed before running.curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Inspect/edit the generated definition when deterministic control is needed.curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/definition/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl-X PATCH "$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/definition/tasks/$TASK_INDEX/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"instructions":"Keep the evaluation split unchanged."}'
# Discover the ML backends available to this API-key user.curl"$MODASTERA_API_BASE_URL/users/ml-backend-profiles/available/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Select a profile only when creating the pipeline. Omit it for default routing.# Clones, fine-tunes, and later model versions inherit their pinned source profile.curl-X POST "$MODASTERA_API_BASE_URL/agents/task-queries/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d '{
"name":"profile-routed-training",
"instruction":"Train and evaluate an image classifier",
"dataset_id":"'$DATASET_ID'",
"ml_backend_profile_id":"'$ML_BACKEND_PROFILE_ID'" }'
Readiness failures are ordinary operational states. Starting a run can return 409 when planning is still pending or running, the pipeline has no executable tasks, or a training/evaluation task has no dataset attached. The backend handles its own ML runtime credentials; headless clients only send their API key to the public backend APIs and WebSocket channels.
Deployment APIs support model-version discovery, candidate comparison, deployment lifecycle, predictor calls, text generation for compatible deployments, usage inspection, explainability, and usage or latency charts. Create deployments with a task_query, selected_model_version, and an optional selected_checkpoint_stage such as best or final. Prediction examples use server-side multipart requests so API keys never reach a browser.
Deploy a model and call the predictor
# List deployable model versions and compare candidates.curl"$MODASTERA_API_BASE_URL/resources/pipeline-model-versions/?task_query=$TASK_QUERY_ID" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl-X POST "$MODASTERA_API_BASE_URL/resources/pipeline-model-versions/compare/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"versions":["model_version_id_1","model_version_id_2"]}'# Create/list deployments.curl-X POST "$MODASTERA_API_BASE_URL/resources/deployments/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"name":"headless-predictor","task_query":"'$TASK_QUERY_ID'","selected_model_version":"'$MODEL_VERSION_ID'","selected_checkpoint_stage":"best"}'curl"$MODASTERA_API_BASE_URL/resources/deployments/?task_query=$TASK_QUERY_ID" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Call predictor and inspect usage/metrics.curl-X POST "$MODASTERA_API_BASE_URL/executors/predictor/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-F"deployment=$DEPLOYMENT_ID" \
-F"file=@./holdout.png"curl"$MODASTERA_API_BASE_URL/resources/deployment-metrics/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl"$MODASTERA_API_BASE_URL/resources/chart-data/latency/?deployment=$DEPLOYMENT_ID" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl"$MODASTERA_API_BASE_URL/resources/chart-data/api-calls/?deployment=$DEPLOYMENT_ID" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"
The MCP adapter exposes trusted local tools over stdio for dataset ingestion and verification, annotation and mask upload, local preparation, ML profile discovery, pipeline configuration and execution, diagnostics, reports, and deployment. The adapter uses the same REST/API-key surface as direct clients; it does not bypass auth, permissions, queues, or result persistence.
Call modastera_get_capabilities first. It returns the tools and workflow options available to the authenticated client. Use the returned tool list as the runtime source of truth before starting longer agent workflows.
File responses include metadata and stable resource ids for model-card markdown, snapshot archives, and experiment artifacts. Generated prediction and explainability media use authenticated profile-aware relay URLs returned inside task-query results and WebSocket payloads.
List artifacts and download reports
# Fetch metadata/listing first when available.curl"$MODASTERA_API_BASE_URL/agents/experiments/$EXPERIMENT_ID/artifacts/?include_payload=0" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Download generated reports or exports.curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/model-card-report/download/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-o model-card.md
curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/snapshot-export/$JOB_ID/download/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-o pipeline-snapshot.zip
Stream generated result mediashell
# Result payloads contain ready-to-use relay URLs for generated media.curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/results/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Follow the returned URL with the same API key. Do not reconstruct its path.RESULT_MEDIA_URL="<absolute relay URL returned by the results response>"curl"$RESULT_MEDIA_URL" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Range: bytes=0-1048575" \
-o result-media.bin
The API reference below uses curated metadata for the public headless workflow. It follows the same scanning model as an OpenAPI reference while preserving the guide-first explanations and examples in this docs app.
Partially updates dataset settings such as name, description, access, labels, or archive state.
AuthApi-Key API keyCoverageCovered
Parameters
Name
Type
Required
Description
path.dataset_id
uuid
Yes
Dataset to update.
query.response
settings
No
Use settings for the frontend-equivalent settings response.
Request body
Name
Type
Required
Description
body.name
string
No
Updated dataset name.
body.description
string
No
Updated description.
body.archived
boolean
No
Archive or unarchive the dataset.
Response fields
Name
Type
Required
Description
id
uuid
No
Updated dataset id.
Status codes
Code
Meaning
200
Resource was updated and the updated representation was returned.
400
Patch body failed validation.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks permission to update the object.
404
The object is missing or hidden by permissions.
DELETE/datasets/datasets/{dataset_id}/Delete a datasetCovered
Deletes a dataset visible to the API-key owner when the owner has write access.
AuthApi-Key API keyCoverageCovered
Parameters
Name
Type
Required
Description
path.dataset_id
uuid
Yes
Dataset to delete.
Response fields
Name
Type
Required
Description
empty
none
No
Successful deletes return no response body.
Status codes
Code
Meaning
204
Resource was deleted.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks permission to delete the object.
404
The object is missing or hidden by permissions.
POST/datasets/datasets/{dataset_id}/clone/Clone a dataset or filtered selectionCovered
Creates a private dataset clone from all source samples, an explicit list of sample ids, or a server-side sample query. Query selection avoids materializing large filtered result sets in the client.
AuthApi-Key API keyCoverageCovered
Parameters
Name
Type
Required
Description
path.dataset_id
uuid
Yes
Accessible source dataset to clone.
Request body
Name
Type
Required
Description
body.name
string
Yes
Name for the private clone.
body.description
string | null
No
Optional clone description. The source description is reused when omitted.
body.sample_ids
uuid[]
No
Explicit source sample ids. Mutually exclusive with sample_query.
body.sample_query
object
No
Server-side selection object. Mutually exclusive with sample_ids.
body.sample_query.split
all | training | validation | test
No
Source split scope. Defaults to all.
body.sample_query.search
string
No
Optional case-insensitive sample-name search.
body.sample_query.filters
object
No
Optional AND/OR sample-query filter tree for name, data type, or indexed annotation values.
body.preserve_splits
boolean
No
Preserve selected samples’ source training, validation, and test memberships. Defaults to true.
Response fields
Name
Type
Required
Description
id
uuid
No
Created private dataset id.
access
private
No
Dataset clones are created private.
clone_summary.source_dataset_id
uuid
No
Source dataset id.
clone_summary.sample_count
integer
No
Number of selected samples copied.
clone_summary.split_counts
object
No
Copied training, validation, and test membership counts.
clone_summary.preserve_splits
boolean
No
Whether source split memberships were preserved.
Status codes
Code
Meaning
201
Resource was created.
400
Request body, form fields, or uploaded files failed validation.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the parent object.
404
The source dataset is missing or hidden by access rules.
sample_ids and sample_query are mutually exclusive. Omitting both selects all source samples; an empty matching query creates an empty clone.
sample_query accepts only split, search, and filters. The server evaluates those values against the current source at submission, and clone_summary is the authoritative result.
preserve_splits copies overlapping memberships exactly. Set it to false to leave the clone unassigned and without copied split-lock, seed, or strategy metadata.
POST /datasets/datasets/{dataset_id}/clone/shell
# Clone the source dataset using its current filtered selection.# sample_ids and sample_query are alternatives; never send both.curl-X POST "$MODASTERA_API_BASE_URL/datasets/datasets/$DATASET_ID/clone/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d '{
"name":"approved-training-copy",
"description":"Private clone created from an approved training selection",
"sample_query":{
"split":"training",
"search":"",
"filters":{
"field":"label_value",
"label":"review_status",
"cmp":"eq",
"value":"approved" }
},
"preserve_splits":true
}'
# For an explicit bounded selection, replace sample_query with sample_ids.curl-X POST "$MODASTERA_API_BASE_URL/datasets/datasets/$DATASET_ID/clone/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d '{
"name":"explicit-sample-copy",
"sample_ids":["'$SAMPLE_ID'"],
"preserve_splits":false
}'
GET/datasets/local-file-references/capabilities/Read local file reference capabilitiesWorkflow helper
Returns whether no-copy local file reference registration is enabled and which operator-configured roots are available to the current backend environment.
AuthApi-Key API keyCoverageWorkflow helper
Response fields
Name
Type
Required
Description
enabled
boolean
No
Whether local file references are enabled on the backend.
roots
array | object
No
Configured local file roots and metadata when enabled.
strict_metadata
boolean
No
Whether strict local metadata validation is enabled.
Status codes
Code
Meaning
200
Returns a list, array, or collection payload visible to the API-key owner.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the requested collection.
This endpoint does not register files by itself. It only describes server-side local-reference capability.
GET /datasets/local-file-references/capabilities/shell
Filter archived datasets using the backend’s case-sensitive query values.
query.view
list | settings
No
Use list to request the lightweight list serializer. Cursor pagination is available only for this view.
query.page_size
integer
No
Opt into cursor pagination for view=list. Defaults to 20 and is capped at 100.
query.cursor
opaque string
No
Opaque cursor returned inside a next or previous URL.
query.sample_data_type
string
No
Optional sample data-type filter. data_type is accepted as an alias.
query.exclude_id
uuid
No
Exclude one dataset id from the result.
Response fields
Name
Type
Required
Description
legacy array
array
No
Returned when page_size and cursor are omitted, including non-list views.
next
string | null
No
Opaque absolute URL for the next cursor page when pagination is active.
previous
string | null
No
Opaque absolute URL for the previous cursor page when pagination is active.
results
array
No
Dataset list rows when cursor pagination is active.
Status codes
Code
Meaning
200
Returns a list, array, or collection payload visible to the API-key owner.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the requested collection.
404
The supplied cursor is invalid, malformed, or no longer accepted.
Cursor pagination is opt-in and applies only to view=list. Omit page_size and cursor to retain the legacy raw-array response.
Rows use the fixed order -created, -id. Follow next or previous exactly with the same API key; do not decode, edit, or construct cursor values.
GET /datasets/summary/shell
# Page-number pagination remains endpoint-specific.curl"$MODASTERA_API_BASE_URL/datasets/samples/?dataset=$DATASET_ID&page=1&page_size=25" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl"$MODASTERA_API_BASE_URL/agents/experiments/$EXPERIMENT_ID/artifacts/?include_payload=0" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl"$MODASTERA_API_BASE_URL/resources/all-usage/?deployment=$DEPLOYMENT_ID&page=1&page_size=25" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Cursor pagination is opt-in for these compact lists.curl"$MODASTERA_API_BASE_URL/datasets/summary/?view=list&page_size=25" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl"$MODASTERA_API_BASE_URL/agents/task-queries-synopsis/?page_size=25" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Follow the returned next or previous URL exactly with the same API key.# Do not decode, edit, or construct the cursor yourself.NEXT_URL="<opaque next URL returned by the response>"curl"$NEXT_URL" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"
Assigns samples to training, validation, and test splits using ratios and an optional seed. Existing assignments remain fixed unless append-only rebalance is requested.
AuthApi-Key API keyCoverageCovered
Parameters
Name
Type
Required
Description
query.response
compact | full
No
Use compact to reduce response payload size.
Request body
Name
Type
Required
Description
body.dataset
uuid
Yes
Dataset to split.
body.training
number
Yes
Training ratio.
body.validation
number
Yes
Validation ratio.
body.test
number
Yes
Test ratio.
body.splits_seed
integer
No
Seed for repeatable assignments.
body.seed
integer
No
Alias for splits_seed.
body.stratified
boolean
No
Use stratified assignment when possible; defaults to true.
body.lock_splits
boolean
No
Prevent accidental split changes when supported.
body.rebalance_existing
boolean
No
Append new unassigned samples toward the requested ratios without moving existing assignments.
Response fields
Name
Type
Required
Description
split_counts
object
No
Resulting counts for each split in compact responses.
split_ratios
object
No
Original and normalized ratios plus rebalance_existing.
Status codes
Code
Meaning
201
Resource was created.
400
Request body, form fields, or uploaded files failed validation.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the parent object.
409
Requested append/rebalance conflicts with existing assignments, split locks, or available unassigned samples.
Rebalance is append-only: existing assignments never move, validation and test only grow, and a locked test split cannot receive new test samples.
POST /datasets/datasets/create-random-splits/shell
Pipeline endpoints cover generation, task-query lifecycle, definition/config inspection and edits, architecture discovery and swap, cloning, diagnostics, runtime summaries, training/evaluation execution, queue/progress state, reports, comparison, fine-tuning, and snapshots.
response_status is the planning/config-generation state: pending, running, completed, or error.
task_status is the durable run state: not_started, in_progress, completed, failed, or interrupted; interrupting can appear during cancellation.
Task-run requests use task_query_id, not task_query.
Use dataset_id and instruction when creating pipelines; prompt and dataset are not accepted create fields.
Clients explicitly select an ML backend profile only when creating a pipeline. Clones, fine-tunes, reruns, and later model versions automatically retain the applicable pinned source profile.
The public segmentation catalog includes EoMT DINOv2 panoptic variants plus RF-DETR Segmentation and RTMDet-Ins instance variants. A public or available catalog entry is discovery metadata, not a guarantee that every selected ML backend can execute it; verify task-scoped alternatives, the planned runtime contract, and backend support before running.
REST polling through task-progress and task-query detail is the durable integration surface even when WebSocket updates are available.
Architecture swaps are available only before a pipeline’s first run and are blocked while planning or execution is active. Clone a pipeline that has already run before changing its architecture.
Runtime contract, failure details, and run summary endpoints are read-only helpers for readiness checks and post-run verification.
Model-card report generation returns JSON; GET can return JSON with response=json or markdown by default, and streaming generation uses server-sent events.
Pipelines API examples
# Discover the ML backends available to this API-key user.curl"$MODASTERA_API_BASE_URL/users/ml-backend-profiles/available/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Select a profile only when creating the pipeline. Omit it for default routing.# Clones, fine-tunes, and later model versions inherit their pinned source profile.curl-X POST "$MODASTERA_API_BASE_URL/agents/task-queries/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d '{
"name":"profile-routed-training",
"instruction":"Train and evaluate an image classifier",
"dataset_id":"'$DATASET_ID'",
"ml_backend_profile_id":"'$ML_BACKEND_PROFILE_ID'" }'
GET/users/ml-backend-profiles/available/List available ML backend profilesWorkflow helper
Returns execution profiles available to the API-key user without exposing profile credentials or management fields.
AuthApi-Key API keyCoverageWorkflow helper
Response fields
Name
Type
Required
Description
count
integer
No
Number of profiles available to the user.
default_profile_id
uuid | null
No
Backend default profile.
selected_profile_id
uuid | null
No
Profile used when pipeline creation omits an explicit choice.
has_multiple_choices
boolean
No
Whether the client should present profile selection.
profiles
array
No
Available ids, names, selected/default state, and local-file capability.
Status codes
Code
Meaning
200
Returns the requested resource visible to the API-key owner.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the requested object.
404
The object is missing or hidden by permissions.
This is operational discovery, not profile management. Profile base URLs and credentials are never returned.
GET /users/ml-backend-profiles/available/shell
# Discover the ML backends available to this API-key user.curl"$MODASTERA_API_BASE_URL/users/ml-backend-profiles/available/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Select a profile only when creating the pipeline. Omit it for default routing.# Clones, fine-tunes, and later model versions inherit their pinned source profile.curl-X POST "$MODASTERA_API_BASE_URL/agents/task-queries/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d '{
"name":"profile-routed-training",
"instruction":"Train and evaluate an image classifier",
"dataset_id":"'$DATASET_ID'",
"ml_backend_profile_id":"'$ML_BACKEND_PROFILE_ID'" }'
Lists supported architecture knowledgebase models and optional details for pipeline planning and architecture swap workflows, including public segmentation catalog variants when they are discoverable.
AuthApi-Key API keyCoverageWorkflow helper
Parameters
Name
Type
Required
Description
query.category
string
No
Optional architecture category filter.
query.module_family
string
No
Optional module family filter.
query.search
string
No
Optional search text.
query.include_details
boolean
No
Include detailed model metadata when true.
Response fields
Name
Type
Required
Description
categories
array | object
No
Catalog categories when returned.
models
array
No
Architecture rows with model keys, task metadata, details, and capability metadata when returned.
Status codes
Code
Meaning
200
Returns a list, array, or collection payload visible to the API-key owner.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the requested collection.
Catalog capability is necessary discovery metadata but does not probe every selected ML backend. Confirm backend support before planning or running an explicitly selected model.
GET /agents/architecture-knowledgebase/shell
# Browse the architecture catalog used by pipeline config tools.curl"$MODASTERA_API_BASE_URL/agents/architecture-knowledgebase/?include_details=true" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Inspect one public segmentation catalog entry. Catalog discovery is not a# guarantee that every selected ML backend can execute the model.SEGMENTATION_MODEL_KEY="EoMTDINOv2Small640"curl"$MODASTERA_API_BASE_URL/agents/architecture-knowledgebase/$SEGMENTATION_MODEL_KEY/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# After planning, use the task-scoped related list as the replacement set.curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/architecture-knowledgebase/?resource_id=$RESOURCE_ID" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Swap only a not-started pipeline and only after verifying task and runtime support.curl-X POST "$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/architecture-swap/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"resource_id":"'$RESOURCE_ID'","target_model_key":"'$SEGMENTATION_MODEL_KEY'","override_params":{}}'
Returns detailed metadata for one supported architecture model key.
AuthApi-Key API keyCoverageWorkflow helper
Parameters
Name
Type
Required
Description
path.model_key
string
Yes
Architecture catalog model key.
Response fields
Name
Type
Required
Description
model
object
No
Architecture metadata and configurable parameters.
Status codes
Code
Meaning
200
Returns the requested resource visible to the API-key owner.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the requested object.
404
The object is missing or hidden by permissions.
For segmentation families, treat the exact returned model_key as the integration value. Do not derive it from the display name or lower-level module metadata.
GET/agents/task-queries/List task queriesCovered
Lists training/evaluation workflow task queries visible to the API-key owner.
AuthApi-Key API keyCoverageCovered
Parameters
Name
Type
Required
Description
query.archived
boolean
No
Filter archived task queries.
Response fields
Name
Type
Required
Description
id
uuid
No
Task query id used for definition, run, progress, and output endpoints.
task_status
string
No
Execution status such as not_started, in_progress, completed, failed, or interrupted.
response_status
string
No
Planning or response status such as pending, running, completed, or error.
Status codes
Code
Meaning
200
Returns a list, array, or collection payload visible to the API-key owner.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the requested collection.
This endpoint currently returns a plain array, not a paginated envelope.
POST/agents/task-queries/Create a task queryCovered
Creates a workflow request for training and evaluation. The returned task query id is the durable handle for planning, execution, results, and deployment handoff.
AuthApi-Key API keyCoverageCovered
Request body
Name
Type
Required
Description
body.name
string
Yes
Workflow name.
body.instruction
string
No
Instruction for the training/evaluation workflow.
body.dataset_id
uuid
No
Accessible, non-archived dataset to bind as a resource.
body.ml_backend_profile_id
uuid
No
Available ML backend profile for this new pipeline. Later derived work inherits a pinned profile automatically.
body.run_preferences
object
No
Optional image explainability and run preferences. Omit an architecture preference for automatic model selection; pin only an exact catalog model key whose task and selected backend support have been verified.
body.preparation_reuse_policy
reuse_if_unchanged | always_reprepare
No
Dataset preparation reuse policy.
body.resources
array
No
Explicit workflow resources such as a dataset reference.
Response fields
Name
Type
Required
Description
id
uuid
No
Save as TASK_QUERY_ID.
response_status
pending | running | completed | error
No
Planning/config-generation status. New records commonly start pending.
Preparation source/adopted dataset, status, plan, artifacts, fingerprints, and reuse policy.
Status codes
Code
Meaning
201
Resource was created.
400
Request body, form fields, or uploaded files failed validation.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the parent object.
POST /agents/task-queries/shell
# Create a pipeline record. Save the returned id as TASK_QUERY_ID.curl"$MODASTERA_API_BASE_URL/agents/task-queries/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl-X POST "$MODASTERA_API_BASE_URL/agents/task-queries/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d '{
"name":"headless-training-run",
"instruction":"Train and evaluate an image classifier",
"dataset_id":"'$DATASET_ID'" }'
# Generate or refresh the pipeline definition.curl-X PATCH "$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"instruction":"Train an image classification model and evaluate it on the validation split."}'# Optional live planning channels. URL-encode the raw key first.ENCODED_API_KEY=$(python3 -c'import os, urllib.parse; print(urllib.parse.quote(os.environ["MODASTERA_API_KEY"], safe=""))')
printf "%s\n""$MODASTERA_WS_BASE_URL/ws/task-status/$TASK_QUERY_ID/?api_key=$ENCODED_API_KEY"printf "%s\n""$MODASTERA_WS_BASE_URL/ws/task-response/$TASK_QUERY_ID/?api_key=$ENCODED_API_KEY"# Durable readiness check. Wait for response_status=completed before running.curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Inspect/edit the generated definition when deterministic control is needed.curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/definition/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl-X PATCH "$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/definition/tasks/$TASK_INDEX/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"instructions":"Keep the evaluation split unchanged."}'
Pipeline execution profile summary. Derived pipelines may carry an inherited pinned profile.
Status codes
Code
Meaning
200
Returns the requested resource visible to the API-key owner.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the requested object.
404
The object is missing or hidden by permissions.
After a WebSocket reconnect, read this endpoint to recover planning, preparation, run, and result state. Generated media URLs in task_result are rewritten to authenticated relay URLs.
Decision, supported steps, readiness, and warnings.
dataset_preparation.artifacts
object
No
Applied preparation result and readiness metadata.
Status codes
Code
Meaning
200
Preparation was replanned and the updated task query was returned.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the requested object.
404
The object is missing or hidden by permissions.
500
Dataset preparation failed unexpectedly.
Preparation may create and bind a derived split dataset. Use adopted_dataset for the actual runtime dataset and inspect warnings when status is planned or failed.
POST /agents/task-queries/{task_query_id}/dataset-preparation/shell
# Inspect preparation state returned with the task query.curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Force a fresh preparation plan and apply supported automatic steps.curl-X POST "$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/dataset-preparation/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{}'
Partially updates a task query. Updating instruction generates or refreshes the pipeline definition and can return 202 while planning continues in the background.
AuthApi-Key API keyCoverageCovered
Parameters
Name
Type
Required
Description
path.task_query_id
uuid
Yes
Task query to update.
Request body
Name
Type
Required
Description
body.instruction
string
No
New workflow instruction used for pipeline generation.
body.run_preferences
object
No
Optional preferences to apply to task configuration.
body.preparation_reuse_policy
reuse_if_unchanged | always_reprepare
No
Control whether unchanged prepared datasets are reused.
body.archived
boolean
No
Archive or unarchive the query.
Response fields
Name
Type
Required
Description
message
string
No
Returned when replanning starts asynchronously.
id
uuid
No
Returned on ordinary serializer update.
response_status
pending | running | completed | error
No
Updated planning state when included.
Status codes
Code
Meaning
200
Resource was updated and the updated representation was returned.
400
Patch body failed validation.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks permission to update the object.
404
The object is missing or hidden by permissions.
202
Instruction update or replanning was started.
PATCH /agents/task-queries/{task_query_id}/shell
# Create a pipeline record. Save the returned id as TASK_QUERY_ID.curl"$MODASTERA_API_BASE_URL/agents/task-queries/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl-X POST "$MODASTERA_API_BASE_URL/agents/task-queries/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d '{
"name":"headless-training-run",
"instruction":"Train and evaluate an image classifier",
"dataset_id":"'$DATASET_ID'" }'
# Generate or refresh the pipeline definition.curl-X PATCH "$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"instruction":"Train an image classification model and evaluate it on the validation split."}'# Optional live planning channels. URL-encode the raw key first.ENCODED_API_KEY=$(python3 -c'import os, urllib.parse; print(urllib.parse.quote(os.environ["MODASTERA_API_KEY"], safe=""))')
printf "%s\n""$MODASTERA_WS_BASE_URL/ws/task-status/$TASK_QUERY_ID/?api_key=$ENCODED_API_KEY"printf "%s\n""$MODASTERA_WS_BASE_URL/ws/task-response/$TASK_QUERY_ID/?api_key=$ENCODED_API_KEY"# Durable readiness check. Wait for response_status=completed before running.curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Inspect/edit the generated definition when deterministic control is needed.curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/definition/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl-X PATCH "$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/definition/tasks/$TASK_INDEX/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"instructions":"Keep the evaluation split unchanged."}'
Copies an accessible pipeline into a new editable task query. Use this when a generated or completed pipeline needs config changes that are blocked on the original.
AuthApi-Key API keyCoverageWorkflow helper
Parameters
Name
Type
Required
Description
path.task_query_id
uuid
Yes
Source task query to clone.
Request body
Name
Type
Required
Description
body.name
string
No
Optional clone name.
body.dataset_id
uuid
No
Optional replacement dataset binding.
body.access
private | organization | global
No
Optional access setting for the clone.
Response fields
Name
Type
Required
Description
id
uuid
No
New cloned task query id.
response_status
string
No
Planning state copied or reset by the clone operation.
task_status
string
No
Run state for the cloned task query.
ml_backend_profile
object | null
No
Inherited source execution-profile summary.
Status codes
Code
Meaning
201
Resource was created.
400
Request body, form fields, or uploaded files failed validation.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the parent object.
Clone is the preferred path before editing generated config on a pipeline whose current state blocks direct edits.
The backend inherits the latest completed model version’s pinned profile when available, then the source pipeline profile or resolved default. Clients do not pass a replacement profile to this operation.
Cloning is rejected when the inherited source profile is not available to the requesting user.
POST /agents/task-queries/{task_query_id}/clone/shell
# Clone a task query into a new editable pipeline.# The clone automatically inherits the source's pinned ML backend profile.curl-X POST "$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/clone/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"name":"editable-copy","dataset_id":"'$DATASET_ID'"}'# Inspect runtime readiness and final summary.curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/runtime-contract/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/run-summary/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Read sanitized failure details after failed runs.curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/failure-details/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"
# Read the editable pipeline config surface.curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/config/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Update training config or resource config for the next run or rerun.curl-X PATCH "$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/config/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"training_epochs":12}'curl-X PATCH "$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/config/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"resource_updates":[{"task_index":0,"resource_type":"architecture","resource_id":"architecture_resource_id","config_patch":{"input_size":[96,96]}}]}'
GET/agents/task-queries/{task_query_id}/architecture-knowledgebase/?resource_id=...Read related architecture optionsWorkflow helper
Returns the current architecture resource and related catalog models for a task query resource.
AuthApi-Key API keyCoverageWorkflow helper
Parameters
Name
Type
Required
Description
path.task_query_id
uuid
Yes
Task query to inspect.
query.resource_id
string
Yes
Architecture resource id inside the generated pipeline.
Response fields
Name
Type
Required
Description
can_swap
boolean
No
Whether architecture swap is currently allowed.
current
object
No
Current architecture resource metadata and config.
related
array
No
Related architecture catalog options.
Status codes
Code
Meaning
200
Returns the requested resource visible to the API-key owner.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the requested object.
404
The object is missing or hidden by permissions.
Treat related as the replacement set for this generated resource, then separately confirm that the selected ML backend can execute the candidate before swapping.
GET /agents/task-queries/{task_query_id}/architecture-knowledgebase/?resource_id=...shell
# Browse the architecture catalog used by pipeline config tools.curl"$MODASTERA_API_BASE_URL/agents/architecture-knowledgebase/?include_details=true" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Inspect one public segmentation catalog entry. Catalog discovery is not a# guarantee that every selected ML backend can execute the model.SEGMENTATION_MODEL_KEY="EoMTDINOv2Small640"curl"$MODASTERA_API_BASE_URL/agents/architecture-knowledgebase/$SEGMENTATION_MODEL_KEY/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# After planning, use the task-scoped related list as the replacement set.curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/architecture-knowledgebase/?resource_id=$RESOURCE_ID" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Swap only a not-started pipeline and only after verifying task and runtime support.curl-X POST "$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/architecture-swap/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"resource_id":"'$RESOURCE_ID'","target_model_key":"'$SEGMENTATION_MODEL_KEY'","override_params":{}}'
Swaps one architecture resource to a supported catalog model and returns the updated task query state.
AuthApi-Key API keyCoverageWorkflow helper
Parameters
Name
Type
Required
Description
path.task_query_id
uuid
Yes
Task query to update.
Request body
Name
Type
Required
Description
body.resource_id
string
Yes
Architecture resource id.
body.target_model_key
string
Yes
Target catalog model key.
body.override_params
object
No
Optional parameter overrides.
Response fields
Name
Type
Required
Description
task_query
object
No
Updated task query or pipeline definition payload.
Status codes
Code
Meaning
200
Architecture was swapped and the updated pipeline state was returned.
400
resource_id, target_model_key, or override_params failed validation.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the task query.
404
The task query or architecture resource was not found.
409
Architecture cannot be swapped in the current state; wait for planning or active work, or clone a pipeline that has already run.
Unknown target_model_key returns 400. Swaps require a matching architecture resource and a not-started pipeline. Clone a pipeline that has already run before changing its architecture, and confirm selected-backend support before starting compute.
POST /agents/task-queries/{task_query_id}/architecture-swap/shell
# Browse the architecture catalog used by pipeline config tools.curl"$MODASTERA_API_BASE_URL/agents/architecture-knowledgebase/?include_details=true" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Inspect one public segmentation catalog entry. Catalog discovery is not a# guarantee that every selected ML backend can execute the model.SEGMENTATION_MODEL_KEY="EoMTDINOv2Small640"curl"$MODASTERA_API_BASE_URL/agents/architecture-knowledgebase/$SEGMENTATION_MODEL_KEY/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# After planning, use the task-scoped related list as the replacement set.curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/architecture-knowledgebase/?resource_id=$RESOURCE_ID" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Swap only a not-started pipeline and only after verifying task and runtime support.curl-X POST "$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/architecture-swap/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"resource_id":"'$RESOURCE_ID'","target_model_key":"'$SEGMENTATION_MODEL_KEY'","override_params":{}}'
Returns metric options for a model-evaluation task definition.
AuthApi-Key API keyCoverageWorkflow helper
Parameters
Name
Type
Required
Description
path.task_query_id
uuid
Yes
Task query containing the definition.
path.task_index
integer
Yes
Task index to inspect.
Response fields
Name
Type
Required
Description
metrics
array
No
Evaluation metric options.
Status codes
Code
Meaning
200
Returns the requested resource visible to the API-key owner.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the requested object.
404
The object is missing or hidden by permissions.
Returns 400 if the selected task is not a model-evaluation task.
POST/agents/task-runs/Start a task runCovered
Starts or queues training/evaluation execution for a generated task query. The response indicates whether execution started immediately, queued, or was already running.
AuthApi-Key API keyCoverageCovered
Request body
Name
Type
Required
Description
body.task_query_id
uuid
Yes
Task query to execute.
body.run_again
boolean
No
Explicitly request rerun behavior for an existing model version.
body.resume_latest_checkpoint
boolean
No
Explicitly request continuation from the latest verified checkpoint.
Response fields
Name
Type
Required
Description
queued
boolean
No
Whether execution entered the queue.
running
boolean
No
Whether the requested task query was already running.
queue_position
integer
No
Queue position when queued.
task_query
object
No
Updated task query state.
websocket_url
string
No
Task-run WebSocket URL when returned.
model_version
object | null
No
Active model-version id and version number when versioning is enabled.
resume
object | null
No
Checkpoint source and resume metadata when an existing checkpoint is used.
fresh_retry
object | null
No
Explicit from-scratch retry metadata for the narrow failed-first-version case.
Status codes
Code
Meaning
202
The operation started, queued, or returned an async handle.
400
The request cannot be started with the provided payload or current state.
401
API key is missing, inactive, expired, or malformed.
409
The operation conflicts with the current resource or task state.
503
Checkpoint availability could not be verified because the selected ML backend was unavailable.
Returns 409 when planning is still pending/running, the pipeline has no executable tasks, or a training/evaluation task has no dataset attached.
When exactly one failed model version v1 exists, task status is failed, interrupted, or not_started, no queue entry is active, and checkpoint lookup confirms no checkpoint, the backend reuses v1 from scratch. The accepted response has resume: null and fresh_retry.reason: first_version_missing_checkpoint.
A missing checkpoint for later model versions remains a 409 missing_rerun_checkpoint. Do not interpret fresh_retry: null as a from-scratch retry.
Reruns and later model versions retain their pinned ML backend profile instead of switching silently to the user’s current default.
WebSocket events are live-only and do not replay missed messages; refetch REST state after reconnect.
POST /agents/task-runs/
# Start a task run.curl-X POST "$MODASTERA_API_BASE_URL/agents/task-runs/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"task_query_id":"'$TASK_QUERY_ID'"}'# Retry a failed first model version. If checkpoint lookup confirms that v1 has# no checkpoint, the accepted response has resume=null and a fresh_retry reason.curl-X POST "$MODASTERA_API_BASE_URL/agents/task-runs/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"task_query_id":"'$TASK_QUERY_ID'","run_again":true}'# Poll progress and inspect queue state.curl"$MODASTERA_API_BASE_URL/agents/task-progress/$TASK_QUERY_ID/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl"$MODASTERA_API_BASE_URL/agents/task-queue-status/?task_query_id=$TASK_QUERY_ID" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Interrupt a running job when supported for the task.curl-X POST "$MODASTERA_API_BASE_URL/agents/task-runs/$TASK_QUERY_ID/interrupt/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl-X POST "$MODASTERA_API_BASE_URL/agents/task-runs/$TASK_QUERY_ID/interrupt-training/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"
Returns global queue state plus queued/running entries for the current user and, when provided, one task query. Use this when task-run start returns queued: true.
AuthApi-Key API keyCoverageWorkflow helper
Parameters
Name
Type
Required
Description
query.task_query_id
uuid
No
Optional task query to inspect.
Response fields
Name
Type
Required
Description
queue_status
object
No
Global queue status payload.
user_queue_entry
object
No
Most recent queued or running entry for the requested task.
user_queued_tasks
array
No
Current user queued tasks.
Status codes
Code
Meaning
200
Returns a list, array, or collection payload visible to the API-key owner.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the requested collection.
Returns lightweight pipeline identity, overview, dataset, preparation, collaboration, and result-readiness fields without loading the heavy task result.
AuthApi-Key API keyCoverageWorkflow helper
Parameters
Name
Type
Required
Description
path.task_query_id
uuid
Yes
Task query to summarize.
Response fields
Name
Type
Required
Description
id
uuid
No
Task query id.
name
string
No
Pipeline display name.
response_status
string
No
Planning/config generation state.
task_status
string
No
Durable execution state.
overview
object
No
Title, task description, and task count.
dataset
object | null
No
Selected dataset id, name, and format.
dataset_preparation
object
No
Preparation status, source/adopted datasets, reason, and latest job id.
collaborator_count
integer
No
Number of pipeline collaborators.
has_results
boolean
No
Whether a task-result record exists.
Status codes
Code
Meaning
200
Returns the requested resource visible to the API-key owner.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the requested object.
404
The object is missing or hidden by permissions.
Use /results/ for the current result payload and /definition/ for the complete generated task definition.
Returns the latest normalized pipeline result for a completed or active task query. For training plus evaluation, this is normally the final evaluation result.
AuthApi-Key API keyCoverageCovered
Parameters
Name
Type
Required
Description
path.task_query_id
uuid
Yes
Task query to inspect.
Response fields
Name
Type
Required
Description
id
uuid
No
Task query id.
task_status
string
No
Durable training/evaluation status.
task_result.status
object
No
Final or current runtime status.
task_result.metrics
object
No
Metric values generated by training or evaluation.
task_result.results
object
No
Result tables, predictions, or evaluation payloads.
task_result.analysis
object
No
Analysis payload when available.
Status codes
Code
Meaning
200
Returns a list, array, or collection payload visible to the API-key owner.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the requested collection.
This endpoint is not a replay log of all training events. Intermediate updates arrive over WebSocket and are persisted into the latest task_result.
For binary classification, the compact platform summary shows configured threshold-dependent metrics at the default 0.5 threshold. Validation-selected and test-sample-optimal operating points remain in detailed Result Analysis; threshold-independent metrics must be interpreted separately.
Segmentation result shapes and metric names vary by semantic, instance, or panoptic target and by the executing model family. Interpret the exact completed model version and returned result contract instead of assuming that the families are interchangeable.
Generated detection, segmentation, prediction, Grad-CAM, and explainability media paths are rewritten to authenticated result-media relay URLs.
GET /agents/task-queries/{task_query_id}/results/json
GET/agents/task-queries/{task_query_id}/result-media/?path=...Stream generated result mediaCovered
Streams generated pipeline media from the ML backend selected for the task query. Clients should follow relay URLs returned by results or WebSocket payloads.
AuthApi-Key API keyCoverageCovered
Parameters
Name
Type
Required
Description
path.task_query_id
uuid
Yes
Task query that owns the generated artifact.
query.path
string
Yes
Backend-generated artifact path from a returned relay URL.
header.Range
bytes range
No
Optional byte range forwarded to the selected ML backend.
Response fields
Name
Type
Required
Description
file
binary stream
No
Generated overlay or prediction media with upstream content metadata.
Cache-Control
private, no-store
No
Relay responses are not publicly cacheable.
Status codes
Code
Meaning
200
Full media stream.
206
Partial media stream for a satisfiable Range request.
400
Artifact path is missing, malformed, outside allowed generated-media roots, or owned by another creator.
401
API key is missing or invalid.
404
Task query or upstream media is unavailable.
416
Requested byte range is not satisfiable.
502
Selected ML backend rejected or could not serve the media.
504
Selected ML backend timed out.
Do not construct artifact paths or call ML backend file URLs directly. Use the relay URL returned by the backend and send the same API key.
GET /agents/task-queries/{task_query_id}/result-media/?path=...shell
# Result payloads contain ready-to-use relay URLs for generated media.curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/results/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Follow the returned URL with the same API key. Do not reconstruct its path.RESULT_MEDIA_URL="<absolute relay URL returned by the results response>"curl"$RESULT_MEDIA_URL" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Range: bytes=0-1048575" \
-o result-media.bin
Returns sanitized diagnostics for a failed pipeline, including suggested next inspection steps when available.
AuthApi-Key API keyCoverageWorkflow helper
Parameters
Name
Type
Required
Description
path.task_query_id
uuid
Yes
Failed task query to inspect.
query.include_debug
boolean
No
Include additional debug fields when allowed.
Response fields
Name
Type
Required
Description
pipeline_id
uuid
No
Failed task query.
task_status
string
No
Durable task state.
failure
object | null
No
Canonical sanitized failure payload, including a typed code and safe details when available.
summary
object
No
Message, source, stage, task, exception, category, and timestamp when available.
diagnostics
object
No
Failure category and fix suggestions.
agent_action
object
No
Structured next action for agent clients.
recommended_next_steps
array
No
Suggested remediation steps.
model_versions
array
No
Model-version status and result-snapshot readiness.
debug
object
No
Availability, enablement, and inclusion state for debug details.
Status codes
Code
Meaning
200
Returns the requested resource visible to the API-key owner.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the requested object.
404
The object is missing or hidden by permissions.
The MCP result helper may automatically attach this payload when /results/ reports a failed pipeline.
Typed GPU-memory failures may expose code GPU_MEMORY_RUNTIME_OOM, category gpu_memory, and optional sanitized fields such as recommended_batch_size, memory estimates, and recommended next steps. Treat those fields as additive and check for their presence.
Apply a positive recommended_batch_size before retrying. A recommendation of zero means batch size one is still too large, so reduce model or input size instead.
GET /agents/task-queries/{task_query_id}/failure-details/shell
# Clone a task query into a new editable pipeline.# The clone automatically inherits the source's pinned ML backend profile.curl-X POST "$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/clone/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"name":"editable-copy","dataset_id":"'$DATASET_ID'"}'# Inspect runtime readiness and final summary.curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/runtime-contract/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/run-summary/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Read sanitized failure details after failed runs.curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/failure-details/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"
Returns the normalized planned pipeline contract before or after execution, including attached dataset, target, architecture, metrics, split counts, and explainability request where available.
AuthApi-Key API keyCoverageWorkflow helper
Parameters
Name
Type
Required
Description
path.task_query_id
uuid
Yes
Task query to inspect.
Response fields
Name
Type
Required
Description
dataset
object | null
No
Attached dataset id, format, accessibility, sample total, and split_counts.
task
object | null
No
Planned training task name, type, and status.
target
object
No
Normalized training target.
classification_mode
string | null
No
Resolved binary, multiclass, or non-classification target mode.
architecture
object
No
Selected architecture and relevant config.
training
object
No
Training resource and config.
criterion
object
No
Loss/criterion resource and config.
optimizer
object
No
Optimizer resource and config.
metrics
array
No
Planned evaluation metrics.
transforms
array
No
Planned transforms.
explainability
object
No
Requested image explainability mode and config.
validation_warnings
array
No
Readiness issues to resolve before execution.
Status codes
Code
Meaning
200
Returns the requested resource visible to the API-key owner.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the requested object.
404
The object is missing or hidden by permissions.
The runtime contract confirms the planned architecture and validation warnings, but it does not by itself prove that every selected ML backend has the provider required by a newly cataloged model. Confirm backend support before execution.
GET /agents/task-queries/{task_query_id}/runtime-contract/shell
# Clone a task query into a new editable pipeline.# The clone automatically inherits the source's pinned ML backend profile.curl-X POST "$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/clone/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"name":"editable-copy","dataset_id":"'$DATASET_ID'"}'# Inspect runtime readiness and final summary.curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/runtime-contract/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/run-summary/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Read sanitized failure details after failed runs.curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/failure-details/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"
GET/agents/task-queries/{task_query_id}/run-summary/Read compact run summaryWorkflow helper
Returns one compact final pipeline summary intended for agent and headless-client verification after a run.
AuthApi-Key API keyCoverageWorkflow helper
Parameters
Name
Type
Required
Description
path.task_query_id
uuid
Yes
Task query to summarize.
Response fields
Name
Type
Required
Description
task_status
string
No
Durable final or current task state.
runtime_contract
object
No
Normalized planned runtime contract.
dataset_verification
object | null
No
Database-derived dataset counts and distributions.
model_version
object | null
No
Latest model version, metric, status, and checkpoint stages.
canonical_metrics
object
No
Normalized final metric values.
primary_metric
object | null
No
Selected primary metric name, value, and source.
metric_sources
object
No
Source and confidence state for each metric.
confusion_matrix
array | null
No
Final confusion matrix when available.
threshold_metadata
object | null
No
Evaluation threshold metadata when available.
explainability
object | null
No
Final explainability payload when available.
failure_details
object
No
Included when task_status is failed.
Status codes
Code
Meaning
200
Returns the requested resource visible to the API-key owner.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the requested object.
404
The object is missing or hidden by permissions.
GET /agents/task-queries/{task_query_id}/run-summary/shell
# Clone a task query into a new editable pipeline.# The clone automatically inherits the source's pinned ML backend profile.curl-X POST "$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/clone/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"name":"editable-copy","dataset_id":"'$DATASET_ID'"}'# Inspect runtime readiness and final summary.curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/runtime-contract/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/run-summary/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Read sanitized failure details after failed runs.curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/failure-details/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"
Returns compact task-query rows for selection and comparison workflows.
AuthApi-Key API keyCoverageWorkflow helper
Parameters
Name
Type
Required
Description
query.archived
boolean
No
Filter archived task queries.
query.page_size
integer
No
Opt into cursor pagination. Defaults to 20 and is capped at 100.
query.cursor
opaque string
No
Opaque cursor returned inside a next or previous URL.
Response fields
Name
Type
Required
Description
legacy array
array
No
Compact task-query rows returned when page_size and cursor are omitted.
next
string | null
No
Opaque absolute URL for the next cursor page when pagination is active.
previous
string | null
No
Opaque absolute URL for the previous cursor page when pagination is active.
results
array
No
Compact task-query rows when cursor pagination is active.
Status codes
Code
Meaning
200
Returns a list, array, or collection payload visible to the API-key owner.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the requested collection.
404
The supplied cursor is invalid or malformed.
Pagination is opt-in. Omit page_size and cursor to retain the legacy raw-array response.
Rows use the fixed order -created, -id. Follow next or previous exactly with the same API key; do not parse or construct cursor values.
GET /agents/task-queries-synopsis/shell
# Page-number pagination remains endpoint-specific.curl"$MODASTERA_API_BASE_URL/datasets/samples/?dataset=$DATASET_ID&page=1&page_size=25" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl"$MODASTERA_API_BASE_URL/agents/experiments/$EXPERIMENT_ID/artifacts/?include_payload=0" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl"$MODASTERA_API_BASE_URL/resources/all-usage/?deployment=$DEPLOYMENT_ID&page=1&page_size=25" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Cursor pagination is opt-in for these compact lists.curl"$MODASTERA_API_BASE_URL/datasets/summary/?view=list&page_size=25" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"curl"$MODASTERA_API_BASE_URL/agents/task-queries-synopsis/?page_size=25" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Follow the returned next or previous URL exactly with the same API key.# Do not decode, edit, or construct the cursor yourself.NEXT_URL="<opaque next URL returned by the response>"curl"$NEXT_URL" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"
Creates a child pipeline for fine-tuning from a trained source pipeline and target dataset.
AuthApi-Key API keyCoverageWorkflow helper
Parameters
Name
Type
Required
Description
path.task_query_id
uuid
Yes
Source trained task query.
Request body
Name
Type
Required
Description
body.dataset_id
uuid
Yes
Target dataset for fine-tuning.
body.name
string
No
Optional child pipeline name.
body.instruction
string
No
Additional instruction appended to source instruction.
body.use_same_config
boolean
No
Reuse source configuration where supported.
Response fields
Name
Type
Required
Description
id
uuid
No
Created child task query id.
ml_backend_profile
object | null
No
Pinned execution profile inherited from the resolved source model version or source pipeline.
Status codes
Code
Meaning
201
Resource was created.
400
Request body, form fields, or uploaded files failed validation.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the parent object.
Fine-tuning is only available when the source pipeline has a reusable trained model and architecture configuration.
The child automatically retains the resolved source model version’s ML backend profile. Clients cannot override that profile in this request, and an unavailable source profile is rejected.
Deployment endpoints cover model-version selection, deployment lifecycle, server-side prediction calls, text generation, usage inspection, and deployment charts.
Call predictor from your server so API keys never reach a browser or mobile client.
Create deployments with task_query, selected_model_version, and selected_checkpoint_stage.
Text generation is model-type-specific and returns 400 for deployments that do not support it.
Deployments API examples
# List model versions produced by a task query.curl"$MODASTERA_API_BASE_URL/resources/pipeline-model-versions/?task_query=$TASK_QUERY_ID" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Compare candidate model versions before deployment.curl-X POST "$MODASTERA_API_BASE_URL/resources/pipeline-model-versions/compare/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"versions":["model_version_id_1","model_version_id_2"]}'# Deploy the chosen model version.curl-X POST "$MODASTERA_API_BASE_URL/resources/deployments/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"name":"headless-predictor","task_query":"'$TASK_QUERY_ID'","selected_model_version":"'$MODEL_VERSION_ID'","selected_checkpoint_stage":"best"}'
GET/resources/pipeline-model-versions/List model versionsCovered
Lists deployable model versions, usually filtered by task query after a successful run.
AuthApi-Key API keyCoverageCovered
Parameters
Name
Type
Required
Description
query.task_query
uuid
No
Filter model versions by task query.
query.task_queries
uuid,csv
No
Filter model versions by multiple task query ids.
Response fields
Name
Type
Required
Description
id
uuid
No
Save as MODEL_VERSION_ID for deployment creation.
status
string
No
Training/deployment readiness status.
checkpoint_stage
string
No
Checkpoint stage metadata when returned.
ml_backend_profile
object | null
No
Sanitized ML backend profile pinned to this model version.
Status codes
Code
Meaning
200
Returns a list, array, or collection payload visible to the API-key owner.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the requested collection.
Use this field, rather than the user’s current default, to identify the backend pinned to the model version.
GET /resources/pipeline-model-versions/shell
# List model versions produced by a task query.curl"$MODASTERA_API_BASE_URL/resources/pipeline-model-versions/?task_query=$TASK_QUERY_ID" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Compare candidate model versions before deployment.curl-X POST "$MODASTERA_API_BASE_URL/resources/pipeline-model-versions/compare/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"versions":["model_version_id_1","model_version_id_2"]}'# Deploy the chosen model version.curl-X POST "$MODASTERA_API_BASE_URL/resources/deployments/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"name":"headless-predictor","task_query":"'$TASK_QUERY_ID'","selected_model_version":"'$MODEL_VERSION_ID'","selected_checkpoint_stage":"best"}'
GET/resources/pipeline-model-versions/{model_version_id}/Read model versionCovered
Reads one pipeline model version visible through task-query access.
AuthApi-Key API keyCoverageCovered
Parameters
Name
Type
Required
Description
path.model_version_id
uuid
Yes
Model version to read.
Response fields
Name
Type
Required
Description
id
uuid
No
Model version id.
primary_metric_value
number
No
Primary metric value when available.
ml_backend_profile
object | null
No
Sanitized ML backend profile pinned to this model version.
Status codes
Code
Meaning
200
Returns the requested resource visible to the API-key owner.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the requested object.
404
The object is missing or hidden by permissions.
POST/resources/pipeline-model-versions/compare/Compare model versionsCovered
Compares candidate model versions before choosing one for deployment.
AuthApi-Key API keyCoverageCovered
Request body
Name
Type
Required
Description
body.versions
uuid[]
Yes
Two or more distinct model version ids to compare.
Response fields
Name
Type
Required
Description
versions
array
No
Serialized model versions in requested order.
primary_metric_delta
number | null
No
Difference between last and first primary metric values when available.
Status codes
Code
Meaning
201
Resource was created.
400
Request body, form fields, or uploaded files failed validation.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the parent object.
POST/resources/deployments/Create a deploymentCovered
Creates a predictor deployment for a selected model version and checkpoint stage.
AuthApi-Key API keyCoverageCovered
Request body
Name
Type
Required
Description
body.name
string
Yes
Deployment name.
body.task_query
uuid
Yes
Task query that produced the model.
body.selected_model_version
uuid
Yes
Model version to deploy.
body.selected_checkpoint_stage
best | final
No
Checkpoint stage to deploy.
body.use_model_card_description
boolean
No
Copy latest model-card markdown into the deployment description when empty.
Response fields
Name
Type
Required
Description
id
uuid
No
Save as DEPLOYMENT_ID for predictor calls.
status
string
No
Deployment readiness state.
Status codes
Code
Meaning
201
Resource was created.
400
Request body, form fields, or uploaded files failed validation.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the parent object.
GET/resources/deployments/List deploymentsCovered
Lists deployments visible to the API-key owner, optionally filtered by task query.
AuthApi-Key API keyCoverageCovered
Parameters
Name
Type
Required
Description
query.task_query
uuid
No
Filter deployments by source task query.
query.active
boolean
No
Filter by active state.
query.hidden
boolean
No
Filter by hidden state.
Response fields
Name
Type
Required
Description
id
uuid
No
Deployment id.
selected_model_version
uuid
No
Selected model version id.
Status codes
Code
Meaning
200
Returns a list, array, or collection payload visible to the API-key owner.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the requested collection.
# List lightweight artifact metadata first.curl"$MODASTERA_API_BASE_URL/agents/experiments/$EXPERIMENT_ID/artifacts/?include_payload=0" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Retrieve one artifact when you need the full metadata or payload reference.curl"$MODASTERA_API_BASE_URL/agents/experiments/$EXPERIMENT_ID/artifacts/$ARTIFACT_ID/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Download reports or archives after reading their metadata/status.curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/model-card-report/download/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-o model-card.md
Retrieves metadata or payload references for a single artifact.
AuthApi-Key API keyCoverageCovered
Parameters
Name
Type
Required
Description
path.experiment_id
uuid
Yes
Experiment id.
path.artifact_id
uuid
Yes
Artifact id.
Response fields
Name
Type
Required
Description
id
uuid
No
Artifact id.
payload
object
No
Artifact payload when included by the backend.
Status codes
Code
Meaning
200
Returns a list, array, or collection payload visible to the API-key owner.
401
API key is missing, inactive, expired, or malformed.
403
The key owner lacks access to the requested collection.
GET /agents/experiments/{experiment_id}/artifacts/{artifact_id}/shell
# List lightweight artifact metadata first.curl"$MODASTERA_API_BASE_URL/agents/experiments/$EXPERIMENT_ID/artifacts/?include_payload=0" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Retrieve one artifact when you need the full metadata or payload reference.curl"$MODASTERA_API_BASE_URL/agents/experiments/$EXPERIMENT_ID/artifacts/$ARTIFACT_ID/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Download reports or archives after reading their metadata/status.curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/model-card-report/download/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-o model-card.md
The MCP reference covers the local stdio backend adapter. It wraps supported public REST APIs with tool-friendly payloads while preserving their authentication, permissions, and result behavior.
Architecture tools expose the backend architecture knowledgebase used by pipeline config and architecture-swap workflows.
The public segmentation catalog includes EoMT DINOv2 Small, Base, and Large 640 for panoptic segmentation; RF-DETR Segmentation Nano, Small, Medium, and Large for instance segmentation; and RTMDet-Ins Tiny, Small, Medium, and Large for instance segmentation.
Catalog discovery and capability metadata do not prove that every selected ML backend can execute a model. Verify task-scoped related options, the planned runtime contract, and backend support before pinning or swapping.
MCP architecture examplesshell
# Browse the architecture catalog used by pipeline config tools.curl"$MODASTERA_API_BASE_URL/agents/architecture-knowledgebase/?include_details=true" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Inspect one public segmentation catalog entry. Catalog discovery is not a# guarantee that every selected ML backend can execute the model.SEGMENTATION_MODEL_KEY="EoMTDINOv2Small640"curl"$MODASTERA_API_BASE_URL/agents/architecture-knowledgebase/$SEGMENTATION_MODEL_KEY/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# After planning, use the task-scoped related list as the replacement set.curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/architecture-knowledgebase/?resource_id=$RESOURCE_ID" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Swap only a not-started pipeline and only after verifying task and runtime support.curl-X POST "$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/architecture-swap/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"resource_id":"'$RESOURCE_ID'","target_model_key":"'$SEGMENTATION_MODEL_KEY'","override_params":{}}'
Dataset tools create and inspect datasets, upload samples and annotations, register no-copy local references, create splits, verify counts, and run analysis.
Upload and local registration tools read paths from the machine or container running the stdio adapter.
Use local registration only with trusted clients and backend local-file-reference roots configured by an operator.
Swaps a pipeline architecture resource to a supported catalog model.
TransportLocal stdio MCP v1AuthMODASTERA_MCP_API_KEY env API key
Backed by REST/agents/task-queries/{task_query_id}/architecture-swap/
Arguments
Name
Type
Required
Description
pipeline_id
uuid
Yes
Task query id.
resource_id
string
Yes
Architecture resource id.
target_model_key
string
Yes
Target architecture catalog key.
override_params
object
No
Optional parameter overrides.
Returns
Name
Type
Required
Description
task_query
object
No
Updated pipeline config or task query payload.
Architecture swaps require a not-started pipeline. Clone a pipeline that has already run before changing its architecture, and confirm selected-backend support before starting compute.
modastera_swap_pipeline_architectureshell
# Browse the architecture catalog used by pipeline config tools.curl"$MODASTERA_API_BASE_URL/agents/architecture-knowledgebase/?include_details=true" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Inspect one public segmentation catalog entry. Catalog discovery is not a# guarantee that every selected ML backend can execute the model.SEGMENTATION_MODEL_KEY="EoMTDINOv2Small640"curl"$MODASTERA_API_BASE_URL/agents/architecture-knowledgebase/$SEGMENTATION_MODEL_KEY/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# After planning, use the task-scoped related list as the replacement set.curl"$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/architecture-knowledgebase/?resource_id=$RESOURCE_ID" \
-H"Authorization: Api-Key $MODASTERA_API_KEY"# Swap only a not-started pipeline and only after verifying task and runtime support.curl-X POST "$MODASTERA_API_BASE_URL/agents/task-queries/$TASK_QUERY_ID/architecture-swap/" \
-H"Authorization: Api-Key $MODASTERA_API_KEY" \
-H"Content-Type: application/json" \
-d'{"resource_id":"'$RESOURCE_ID'","target_model_key":"'$SEGMENTATION_MODEL_KEY'","override_params":{}}'
MCPmodastera_run_pipelineRun pipeline
Runs or reruns a pipeline through the existing task-run endpoint.
TransportLocal stdio MCP v1AuthMODASTERA_MCP_API_KEY env API key
Queues evaluation-only resume or reconciliation for an eligible checkpointed pipeline without repeating completed training.
TransportLocal stdio MCP v1AuthMODASTERA_MCP_API_KEY env API key
Backed by REST/agents/task-runs/{task_query_id}/resume-evaluation/
Arguments
Name
Type
Required
Description
pipeline_id
uuid
Yes
Checkpointed task query id.
model_version_id
uuid
No
Optional eligible model version to evaluate.
Returns
Name
Type
Required
Description
task_query
object
No
Updated pipeline state after evaluation was queued.
websocket_url
string
No
Optional live task-run update URL.
The backend verifies checkpoint eligibility and may reject a pipeline with no usable trained model. Continue polling durable REST state after acceptance.
Returns normalized task-query results through the existing result serializer path.
TransportLocal stdio MCP v1AuthMODASTERA_MCP_API_KEY env API key
Backed by REST/agents/task-queries/{task_query_id}/results/
Arguments
Name
Type
Required
Description
pipeline_id
uuid
Yes
Task query id.
Returns
Name
Type
Required
Description
task_result
object
No
Latest normalized pipeline result.
Segmentation result shapes and metrics vary by semantic, instance, or panoptic target. Interpret the exact completed model version and returned result contract.
Returns the normalized dataset, task, target, architecture, training, criterion, optimizer, metrics, transforms, explainability, and validation-warning contract.
TransportLocal stdio MCP v1AuthMODASTERA_MCP_API_KEY env API key
Backed by REST/agents/task-queries/{task_query_id}/runtime-contract/
Arguments
Name
Type
Required
Description
pipeline_id
uuid
Yes
Task query to inspect.
Returns
Name
Type
Required
Description
dataset
object | null
No
Dataset id, format, accessibility, sample total, and split counts.
classification_mode
string | null
No
Resolved target mode.
architecture
object
No
Architecture metadata and config.
validation_warnings
array
No
Readiness warnings to resolve before running.
The planned contract and validation warnings do not by themselves prove that every selected ML backend contains the provider required by a newly cataloged model. Confirm backend support before execution.
The headless API surface follows semantic versioning. Breaking changes to endpoint paths, auth schemes, response shapes, async statuses, or file metadata bump the major version; backwards-compatible additions bump the minor version; documentation-only fixes bump the patch version. Pre-1.0, minor versions may include breaking changes, each called out explicitly below.
v0.4.0 July 2026
Added the public dataset clone contract for full, explicit-id, and server-side filtered selections with optional split preservation.
Documented opt-in cursor pagination for lightweight dataset summaries and task-query synopses while preserving legacy raw-array responses.
Clarified that cursor links are opaque and must be followed exactly rather than decoded or reconstructed.
Documented pinned ML backend inheritance across clones, fine-tunes, reruns, and model versions.
Added the public segmentation model catalog and guarded selection guidance for EoMT DINOv2, RF-DETR Segmentation, and RTMDet-Ins variants.
Added the narrow failed-first-version fresh-retry response contract and aligned REST and local MCP recovery guidance.
Clarified binary result operating points and sanitized GPU-memory remediation fields.
v0.3.0 July 2026
Added English and Japanese documentation homes with separate Platform, Headless & API, and Feature updates journeys.
Expanded complete platform workflows with step-by-step instructions, permission and data-safety guidance, and sanitized screenshots.
Added the bilingual July 2026 platform update and a repeatable chronological update archive.
Added production reference cards for compact pipeline summaries, annotation-engine readiness, durable Auto Annotate progress, evaluation-only checkpoint recovery, and deployment usage result media.
Revalidated the local MCP reference against the currently supported tool catalog.
v0.2.0 July 2026
Aligned dataset and pipeline examples with current serializer fields: format, instruction, and dataset_id.
Added public workflow guidance for dataset verification/preparation, COCO and mask annotations, append-only split rebalance, ML backend selection, diagnostics, run summaries, and authenticated result media.
Added pipeline- and model-version-scoped model-card report contracts.
Expanded the local MCP reference and documented its standard result envelope.
v0.1.5 June 2026
Added local stdio MCP v1 setup, trust-boundary guidance, and typed tool reference cards.
Added REST reference coverage for local file capabilities, architecture knowledgebase, pipeline config, and architecture swap workflows.
Clarified the supported public Headless and MCP coverage boundary.
v0.1.4 June 2026
Added API-key-only pipeline training guidance for generation, readiness checks, training/evaluation, WebSockets, durable polling, interruption, and final results.
Expanded task-run examples with queued responses, WebSocket event shapes, and REST recovery guidance.
Clarified that API keys are operational credentials and not account, organization, team, onboarding, or key lifecycle credentials.
v0.1.3 June 2026
Expanded curated public API reference coverage for dataset/sample CRUD, import jobs, task-query lifecycle, deployment lifecycle, prediction status, and usage inspection.
Corrected model-card report docs to distinguish JSON generation, markdown downloads, and server-sent event streaming.
Corrected annotation export docs to show dataset serializer responses with updated annotation file references.
Replaced broad pagination claims with endpoint-specific pagination and filtering guidance.
v0.1.2 June 2026
Added the OpenAPI-style API Reference generated from a curated public endpoint registry.
Added endpoint-level request, response, status-code, auth, coverage, async, caveat, and example guidance.
Added the first model to prediction walkthrough to show id handoff from dataset creation through prediction.
v0.1.1 June 2026
Expanded public workflow coverage with a coverage status matrix.
Corrected sample split examples to use training, validation, and test.
Corrected task-run creation examples to use task_query_id.
Corrected deployment creation examples to use task_query, selected_model_version, and selected_checkpoint_stage.
Clarified endpoint-specific async handles and mixed backend error response shapes.
v0.1.0 June 2026
Initial public documentation release.
API-key authentication with Api-Key and Bearer header schemes for operational APIs. Account setup and key creation remain frontend-only and outside this headless guide.