Adapter versions
Each training run makes a new adapter version of its task. These operations read the versions and move one through promotion. Mubit also moves versions by itself; these calls do it by hand.
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 adapter versions
GET /api/v1/tasks/{task_id}/versions
Lists the task's adapter versions.
Role: read or higher.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
task_id | path | string | yes | |
limit | query | integer | no | Number of records to return (1-200) |
cursor | query | string | no | Sealed pagination cursor from previous page |
curl "https://api.mubit.ai/api/v1/tasks/$TASK_ID/versions" \
-H "Authorization: Bearer $MUBIT_MANAGEMENT_KEY"Response 200: Version list
Each item of data:
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
task_id | string | yes | |
version_number | integer | yes | |
status | string | yes | |
score | number, nullable | no | |
base_model | string | no | |
created_at | string (date-time) | yes |
{
"data": [
{
"id": "ver_002",
"task_id": "task_triage12",
"version_number": 2,
"status": "promoted",
"score": 0.88,
"base_model": "Qwen/Qwen3-4B-Instruct-2507",
"created_at": "2026-10-24T00:00:00Z"
}
],
"next_cursor": null
}| Status | Meaning |
|---|---|
401 | Unauthenticated (missing, invalid, or expired token) |
403 | Forbidden (role_required, role_ceiling, project_scoped, forbidden, or a key that isn't a management key) |
404 | Not found |
500 | Internal server error |
Get a version
GET /api/v1/versions/{version_id}
Returns one adapter version with its test results and its canary and shadow shares.
Role: read or higher.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
version_id | path | string | yes |
curl "https://api.mubit.ai/api/v1/versions/$VERSION_ID" \
-H "Authorization: Bearer $MUBIT_MANAGEMENT_KEY"Response 200: Version details
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
task_id | string | yes | |
version_number | integer | yes | |
status | string | yes | |
score | number, nullable | no | |
canary_percent | integer | no | |
shadow_percent | integer | no | |
eval_metrics | object | no |
{
"id": "ver_002",
"task_id": "task_triage12",
"version_number": 2,
"status": "promoted",
"score": 0.88,
"canary_percent": 100,
"shadow_percent": 0,
"eval_metrics": {
"accuracy": 0.92,
"latency_p50_ms": 180
}
}| Status | Meaning |
|---|---|
401 | Unauthenticated (missing, invalid, or expired token) |
403 | Forbidden (role_required, role_ceiling, project_scoped, forbidden, or a key that isn't a management key) |
404 | Not found |
500 | Internal server error |
Promote a version
POST /api/v1/versions/{version_id}/promote
Promotes the version, so it answers the task's calls. A version that can't be promoted now is 409.
Role: admin.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
version_id | path | string | yes | |
Idempotency-Key | header | string | no | Unique key for safe write retries within 24h |
Request body (optional)
| Field | Type | Required | Description |
|---|---|---|---|
reason | string | no |
curl -X POST "https://api.mubit.ai/api/v1/versions/$VERSION_ID/promote" \
-H "Authorization: Bearer $MUBIT_MANAGEMENT_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{"reason":"Cleared 90% accuracy hurdle"}'Response 200: Version promoted
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
status | string: promoted | yes |
{
"id": "ver_002",
"status": "promoted"
}| Status | Meaning |
|---|---|
400 | Bad request (validation, invalid_cursor, out_of_bounds) |
401 | Unauthenticated (missing, invalid, or expired token) |
403 | Forbidden (role_required, role_ceiling, project_scoped, forbidden, or a key that isn't a management key) |
404 | Not found |
409 | Conflict (idempotency_conflict, state_conflict) |
500 | Internal server error |
Roll back a version
POST /api/v1/versions/{version_id}/rollback
Rolls back the promoted version and promotes the version promoted before it again. The version must be the promoted one (409 not_promoted otherwise). It takes no body.
Role: admin.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
version_id | path | string | yes | |
Idempotency-Key | header | string | no | Unique key for safe write retries within 24h |
curl -X POST "https://api.mubit.ai/api/v1/versions/$VERSION_ID/rollback" \
-H "Authorization: Bearer $MUBIT_MANAGEMENT_KEY" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY"Response 200: Version rolled back
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
status | string: rolled_back | yes | |
restored_version_id | string | yes |
{
"id": "ver_2_support-triage",
"status": "rolled_back",
"restored_version_id": "ver_1_support-triage"
}| Status | Meaning |
|---|---|
401 | Unauthenticated (missing, invalid, or expired token) |
403 | Forbidden (role_required, role_ceiling, project_scoped, forbidden, or a key that isn't a management key) |
404 | Not found |
409 | Conflict (idempotency_conflict, state_conflict) |
500 | Internal server error |
Set canary or shadow share
PATCH /api/v1/versions/{version_id}/rollout
Sets the version's canary or shadow share, in percent. canary_percent above 0 makes it a canary at that share; shadow_percent above 0 makes it a shadow at that share. Both above 0 is 400: a version is in one state at a time. Both 0 takes a canary or shadow out (409 for the promoted version). A share you leave out stays as it is. The answer is the share now in effect.
Role: admin.
| Name | In | Type | Required | Description |
|---|---|---|---|---|
version_id | path | string | yes |
| Field | Type | Required | Description |
|---|---|---|---|
canary_percent | integer | no | |
shadow_percent | integer | no | |
reason | string | no |
curl -X PATCH "https://api.mubit.ai/api/v1/versions/$VERSION_ID/rollout" \
-H "Authorization: Bearer $MUBIT_MANAGEMENT_KEY" \
-H "Content-Type: application/json" \
-d '{"canary_percent":25}'Response 200: Rollout updated
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
canary_percent | integer | yes | |
shadow_percent | integer | yes |
{
"id": "ver_2_support-triage",
"canary_percent": 25,
"shadow_percent": 0
}| Status | Meaning |
|---|---|
400 | Bad request (validation, invalid_cursor, out_of_bounds) |
401 | Unauthenticated (missing, invalid, or expired token) |
403 | Forbidden (role_required, role_ceiling, project_scoped, forbidden, or a key that isn't a management key) |
404 | Not found |
409 | Conflict (idempotency_conflict, state_conflict) |
500 | Internal server error |