Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content
API reference

Tasks and training

Mubit groups your calls into tasks. These operations read the tasks, their training examples and settings, start a training run, and read the run's job.

All paths are under https://api.mubit.ai, with a management key in Authorization: Bearer. Management API covers keys, roles, pagination, retries and errors. The samples read the key from MUBIT_MANAGEMENT_KEY.

List tasks

GET /api/v1/tasks

Lists the tasks Mubit found in your calls, with their row counts, stage and active adapter version.

Role: read or higher.

Parameters
NameInTypeRequiredDescription
projectquerystringno
limitqueryintegernoNumber of records to return (1-200)
cursorquerystringnoSealed pagination cursor from previous page
curl
curl "https://api.mubit.ai/api/v1/tasks?project=$PROJECT_ID" \
  -H "Authorization: Bearer $MUBIT_MANAGEMENT_KEY"

Response 200: List of tasks

Each item of data:

FieldTypeRequiredDescription
idstringyes
namestringyes
projectstringyes
stagestringyes
rows_countintegeryes
active_versioninteger, nullableno
created_atstring (date-time)yes
{
  "data": [
    {
      "id": "task_triage12",
      "name": "Support Ticket Triage",
      "project": "prj_prod",
      "stage": "training",
      "rows_count": 85,
      "active_version": 2,
      "created_at": "2026-10-10T00:00:00Z"
    }
  ],
  "next_cursor": null
}
Errors
StatusMeaning
401Unauthenticated (missing, invalid, or expired token)
403Forbidden (role_required, role_ceiling, project_scoped, forbidden, or a key that isn't a management key)
500Internal server error

Get task details

GET /api/v1/tasks/{task_id}

Returns one task with its stage, its dataset sizes and what to do next.

Role: read or higher.

Parameters
NameInTypeRequiredDescription
task_idpathstringyes
curl
curl "https://api.mubit.ai/api/v1/tasks/$TASK_ID" \
  -H "Authorization: Bearer $MUBIT_MANAGEMENT_KEY"

Response 200: Task details

FieldTypeRequiredDescription
idstringyes
namestringyes
projectstringyes
stagestringyes
rows_countintegeryes
holdout_countintegerno
active_versioninteger, nullableno
recommendationstringno
{
  "id": "task_triage12",
  "name": "Support Ticket Triage",
  "project": "prj_prod",
  "stage": "ready",
  "rows_count": 85,
  "holdout_count": 18,
  "active_version": 2,
  "recommendation": "serve"
}
Errors
StatusMeaning
401Unauthenticated (missing, invalid, or expired token)
403Forbidden (role_required, role_ceiling, project_scoped, forbidden, or a key that isn't a management key)
404Not found
500Internal server error

List task training examples

GET /api/v1/tasks/{task_id}/examples

Lists the task's training and held-out examples, one page of at most 50 (a higher limit returns 50). A row of the next training run has status next and split train. A row of the held-out test has status test and split holdout. A row left out of the next run has status left_out and says why in left_out_reason. input and expected_output are excerpts of at most 160 characters. A cursor belongs to its task and query (400 invalid_cursor otherwise). This route has its own limit: 120 requests a minute for an organization, across all its keys (429 rate_limited with Retry-After). The project's example review must be on (409 state_conflict otherwise).

Role: read or higher.

Parameters
NameInTypeRequiredDescription
task_idpathstringyes
limitqueryintegernoNumber of records to return (1-200)
cursorquerystringnoSealed pagination cursor from previous page
curl
curl "https://api.mubit.ai/api/v1/tasks/$TASK_ID/examples" \
  -H "Authorization: Bearer $MUBIT_MANAGEMENT_KEY"

Response 200: Task examples

Each item of data:

FieldTypeRequiredDescription
idstringyesex_ and the id of the call the row is made from
inputstringyesAn excerpt of the row's input, at most 160 characters
expected_outputstringnoAn excerpt of the row's answer, at most 160 characters
splitstring: train, holdoutnotrain for a row of the next training build (status next), holdout for a row of the held-out exam (status test); a row left out has none
statusstringyesnext (a row of the next training build), test (a row of the held-out exam) or left_out (a row the next build leaves out)
left_out_reasonstringnoWhy a row with status left_out is not in the next run (no_verdict, person_rejected, row_filter, and others)
{
  "data": [
    {
      "id": "ex_98124",
      "input": "Refund request for order #1234",
      "expected_output": "Refund initiated for order #1234",
      "split": "holdout",
      "status": "test"
    }
  ],
  "next_cursor": null
}
Errors
StatusMeaning
400Bad request (validation, invalid_cursor, out_of_bounds)
401Unauthenticated (missing, invalid, or expired token)
403Forbidden (role_required, role_ceiling, project_scoped, forbidden, or a key that isn't a management key)
404Not found
409The task's project has example review off (state_conflict, with details.reason feedback_review_off), or examples can't be read yet (engine_too_old)
429Rate limited
500Internal server error
503Service unavailable (unavailable). Retry after the Retry-After seconds.

Get training settings

GET /api/v1/tasks/{task_id}/settings

Returns the task's training settings: its base model, and the min_rows, max_rows and rate_max_per_day that apply to it. A figure with no value set is null; no default is made up for it. retrain_interval_s and training_window_days are always null: a task retrains when enough new rows arrive. The ETag header is a digest of these figures.

Role: read or higher.

Parameters
NameInTypeRequiredDescription
task_idpathstringyes
curl
curl "https://api.mubit.ai/api/v1/tasks/$TASK_ID/settings" \
  -H "Authorization: Bearer $MUBIT_MANAGEMENT_KEY"

Response 200: Task settings

FieldTypeRequiredDescription
base_modelstring, nullableno
rate_max_per_dayinteger, nullableno
min_rowsinteger, nullableno
max_rowsinteger, nullableno
retrain_interval_sinteger, nullableno
training_window_daysinteger, nullableno
{
  "base_model": "Qwen/Qwen3-4B-Instruct-2507",
  "rate_max_per_day": 100,
  "min_rows": 20,
  "max_rows": 500,
  "retrain_interval_s": null,
  "training_window_days": null
}
Errors
StatusMeaning
401Unauthenticated (missing, invalid, or expired token)
403Forbidden (role_required, role_ceiling, project_scoped, forbidden, or a key that isn't a management key)
404Not found
500Internal server error
503Service unavailable (unavailable). Retry after the Retry-After seconds.

Start training

POST /api/v1/tasks/{task_id}/train

Starts a training run for a new adapter version of the task, and answers 202 with its job. Read the job with Get job status. With dry_run: true nothing starts: the answer (200) says whether a run would start, with rows and need. The body takes reason and dry_run only; any other field is 400. While the run's dataset is still being built, the job has no id yet (null) and its status is preparing. Too few rows, or a run already in progress, is 409 state_conflict.

Role: admin.

Parameters
NameInTypeRequiredDescription
task_idpathstringyes
Idempotency-KeyheaderstringnoUnique key for safe write retries within 24h

Request body (optional)

FieldTypeRequiredDescription
reasonstringno
dry_runbooleanno
curl
curl -X POST "https://api.mubit.ai/api/v1/tasks/$TASK_ID/train" \
  -H "Authorization: Bearer $MUBIT_MANAGEMENT_KEY" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -H "Content-Type: application/json" \
  -d '{"reason":"Retrain with updated customer support guidelines"}'

Response 202: Asynchronous job accepted

FieldTypeRequiredDescription
jobJobyes
{
  "job": {
    "id": "job_019283",
    "type": "export",
    "status": "queued",
    "created_at": "2026-10-26T12:00:00Z"
  }
}
Errors
StatusMeaning
400Bad request (validation, invalid_cursor, out_of_bounds)
401Unauthenticated (missing, invalid, or expired token)
403Forbidden (role_required, role_ceiling, project_scoped, forbidden, or a key that isn't a management key)
404Not found
409Conflict (idempotency_conflict, state_conflict)
500Internal server error

Get job status

GET /api/v1/jobs/{job_id}

Reads one training job by the id Start training returned: its status and its times. type is training. The status is queued, running, succeeded, failed or canceled. A failed job carries an error. A job of another organization is 404.

Role: read or higher.

Parameters
NameInTypeRequiredDescription
job_idpathstringyes
curl
curl "https://api.mubit.ai/api/v1/jobs/$JOB_ID" \
  -H "Authorization: Bearer $MUBIT_MANAGEMENT_KEY"

Response 200: Job status

FieldTypeRequiredDescription
idstring, nullableyesNull while the job has no id yet (a training run whose dataset is still being built)
typestringyesThe kind of job: training for a training run
statusstring: preparing, queued, running, succeeded, failed, canceledyes
created_atstring (date-time)yes
started_atstring (date-time), nullableno
finished_atstring (date-time), nullableno
progressobjectno
resultobject, nullableno
errorobject, nullablenoPresent for a failed job: the code training_failed and a message
{
  "id": "ftjob_019283",
  "type": "training",
  "status": "running",
  "created_at": "2026-10-26T11:55:00Z",
  "started_at": "2026-10-26T11:55:05Z",
  "finished_at": null,
  "result": null,
  "error": null
}
Errors
StatusMeaning
401Unauthenticated (missing, invalid, or expired token)
403Forbidden (role_required, role_ceiling, project_scoped, forbidden, or a key that isn't a management key)
404Not found
500Internal server error
503Service unavailable (unavailable). Retry after the Retry-After seconds.