Projects
Group models into projects and read the roll-ups across them: traffic, alerts and the inputs each model relies on.
A project is a folder of models with roll-ups across them: traffic, alerts, the frameworks and tasks in use, and which inputs drive each model. Models join a project through project_id on create or update. Deleting a project leaves its models in the workspace, ungrouped.
#The Project object
summary is null unless you ask for it with include=summary.
Attributes
prj_ identifier.Models in the project.
With include=summary: active_models, lineages (distinct models, versions counted once), frameworks and tasks counts, predictions_total, explanations_total, predictions_30d, explanations_30d, alerts_high, alerts_medium (from each model's latest insight per type), analyses_running, last_activity_at and a daily series of the last 31 days.
{
"object": "project",
"id": "prj_40c081b2465e96db2cdc",
"name": "Risk platform",
"slug": "risk-platform",
"description": "Models behind the lending decision.",
"model_count": 3,
"created_at": "2026-10-31T22:40:22.963721Z",
"updated_at": "2026-10-31T22:40:22.963721Z",
"summary": {
"active_models": 3,
"lineages": 2,
"frameworks": {"sklearn": 2, "xgboost": 1},
"tasks": {"binary_classification": 3},
"predictions_total": 1560,
"explanations_total": 27,
"predictions_30d": 1136,
"explanations_30d": 19,
"alerts_high": 0,
"alerts_medium": 1,
"analyses_running": 0,
"last_activity_at": "2026-10-31T22:40:25Z",
"series": [
{
"date": "2026-10-01",
"predictions": 0,
"explanations": 0
},
…,
{
"date": "2026-10-31",
"predictions": 212,
"explanations": 6
}
]
}
}#List projects
/v1/projectsAPI key or sessionProjects in your organization, by name.
Query parameters
Match on name or slug.
summary to add each project's roll-up. Unknown values are rejected (400 invalid_include).1 to 200.
Returns
for project in client.projects.list(include="summary").data:
s = project.summary
print(project.slug, project.model_count, s["predictions_30d"], s["alerts_high"], s["alerts_medium"])curl "https://api.kaimei.ai/v1/projects?include=summary" \
-H "Authorization: Bearer $KAIMEI_API_KEY"{
"object": "list",
"data": [
{
"object": "project",
"id": "prj_40c081b2465e96db2cdc",
"name": "Risk platform",
"slug": "risk-platform",
"description": "Models behind the lending decision.",
"model_count": 3,
"created_at": "2026-10-31T22:40:22.963721Z",
"updated_at": "2026-10-31T22:40:22.963721Z",
"summary": {
"active_models": 3,
"lineages": 2,
"frameworks": {"sklearn": 2, "xgboost": 1},
"tasks": {"binary_classification": 3},
"predictions_total": 1560,
"explanations_total": 27,
"predictions_30d": 1136,
"explanations_30d": 19,
"alerts_high": 0,
"alerts_medium": 1,
"analyses_running": 0,
"last_activity_at": "2026-10-31T22:40:25Z",
"series": …
}
}
],
"total": 1,
"limit": 50,
"offset": 0,
"has_more": false
}#Create a project
/v1/projectsAPI key or sessionCreate an empty project. Add models with project_id on POST /v1/models or PATCH /v1/models/{model}.
Body parameters
1 to 120 characters.
Unique within the organization (409 slug_taken). Derived from the name when omitted.
Returns
201.project = client.projects.create(name="Risk platform", description="Models behind the lending decision.")
client.models.assign_project("credit-risk-v3", project.id)curl -X POST https://api.kaimei.ai/v1/projects \
-H "Authorization: Bearer $KAIMEI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "Risk platform", "description": "Models behind the lending decision."}'{
"object": "project",
"id": "prj_40c081b2465e96db2cdc",
"name": "Risk platform",
"slug": "risk-platform",
"description": "Models behind the lending decision.",
"model_count": 0,
"created_at": "2026-10-31T22:40:22.963721Z",
"updated_at": "2026-10-31T22:40:22.963721Z",
"summary": null
}#Retrieve a project
/v1/projects/{project}API key or sessionOne project by id or slug.
Path parameters
Project id or slug.
Query parameters
summary to add the roll-up.Returns
project = client.projects.retrieve("risk-platform", include="summary")curl https://api.kaimei.ai/v1/projects/risk-platform?include=summary \
-H "Authorization: Bearer $KAIMEI_API_KEY"{
"object": "project",
"id": "prj_40c081b2465e96db2cdc",
"name": "Risk platform",
"slug": "risk-platform",
"description": "Models behind the lending decision.",
"model_count": 3,
"created_at": "2026-10-31T22:40:22.963721Z",
"updated_at": "2026-10-31T22:40:22.963721Z",
"summary": {
"active_models": 3,
"lineages": 2,
"frameworks": {"sklearn": 2, "xgboost": 1},
"tasks": {"binary_classification": 3},
"predictions_total": 1560,
"explanations_total": 27,
"predictions_30d": 1136,
"explanations_30d": 19,
"alerts_high": 0,
"alerts_medium": 1,
"analyses_running": 0,
"last_activity_at": "2026-10-31T22:40:25Z",
"series": …
}
}#Project dashboard
/v1/projects/{project}/overviewAPI key or sessionEverything the project page shows in one call: the project with its summary, every model in it, per-model 30-day traffic with the latest drift status, open medium and high alerts, the feature matrix (which inputs drive each model over its recent explanations, with the features shared by two or more models), and the most recent analyses and explanations.
Path parameters
Project id or slug.
Returns
project.overview: project, models, model_stats[] (model_id, predictions_30d, explanations_30d, avg_latency_ms, alerts_high, alerts_medium, drift_status, drift_psi), alerts[] (Insights), feature_matrix {features, rows[] {model_id, explanations, shares}, shared}, recent_analyses[] and recent_explanations[].overview = client.projects.overview("risk-platform")
for stat in overview.model_stats:
print(stat["model_id"], stat["predictions_30d"], stat["drift_status"], stat["drift_psi"])
matrix = overview.feature_matrix
print(matrix["shared"]) # inputs two or more models use
for row in matrix["rows"]:
print(row["model_id"], {k: v for k, v in row["shares"].items() if v})curl https://api.kaimei.ai/v1/projects/risk-platform/overview \
-H "Authorization: Bearer $KAIMEI_API_KEY"{
"object": "project.overview",
"project": {
"object": "project",
"id": "prj_40c081b2465e96db2cdc",
"name": "Risk platform",
"slug": "risk-platform",
"description": "Models behind the lending decision.",
"model_count": 3,
"created_at": "2026-10-31T22:40:22.963721Z",
"updated_at": "2026-10-31T22:40:22.963721Z",
"summary": {
"active_models": 3,
"lineages": 2,
"frameworks": {"sklearn": 2, "xgboost": 1},
"tasks": {"binary_classification": 3},
"predictions_total": 1560,
"explanations_total": 27,
"predictions_30d": 1136,
"explanations_30d": 19,
"alerts_high": 0,
"alerts_medium": 1,
"analyses_running": 0,
"last_activity_at": "2026-10-31T22:40:25Z",
"series": …
}
},
"models": [
{
"object": "model",
"id": "mdl_390bd6d9568f626851ef",
"slug": "credit-risk-v3",
…: …
},
…
],
"model_stats": [
{
"model_id": "mdl_390bd6d9568f626851ef",
"predictions_30d": 860,
"explanations_30d": 19,
"avg_latency_ms": 31.4,
"alerts_high": 0,
"alerts_medium": 1,
"drift_status": "moderate",
"drift_psi": 0.148039
},
…
],
"alerts": [
{
"object": "insight",
"id": "ins_a0a2b5c4a5ddb552758a",
"type": "drift",
"severity": "medium",
"summary": "Recent traffic has moderate drift (PSI 0.15). Shifted inputs: `loan_amount`, `debt_to_income`, `income`.",
…: …
}
],
"feature_matrix": {
"features": [
"credit_score", "debt_to_income", "income", "utilization",
"num_delinquencies", …
],
"rows": [
{
"model_id": "mdl_390bd6d9568f626851ef",
"explanations": 19,
"shares": {
"credit_score": 0.2691,
"income": 0.1586,
"utilization": 0.1402,
"debt_to_income": 0.1218,
"num_delinquencies": 0.0934,
…: …
}
},
{
"model_id": "mdl_c48c5582152e44e34e64",
"explanations": 8,
"shares": {
"credit_score": 0.4681,
"utilization": 0.2979,
"income": 0.1277,
"num_delinquencies": 0.1064,
"debt_to_income": null
}
}
],
"shared": [
"credit_score", "income", "utilization",
"num_delinquencies"
]
},
"recent_analyses": [
{
"object": "analysis",
"id": "anl_b8d673126dcf3cdbe79a",
"type": "full",
"status": "completed",
…: …
}
],
"recent_explanations": [
{
"object": "explanation",
"id": "exp_7d7add16c796eafac087",
"method": "shap",
…: …
},
…
]
}#Update a project
/v1/projects/{project}API key or sessionRename, re-slug or describe a project.
Path parameters
Project id or slug.
Body parameters
Must be unique (409 slug_taken).
Returns
client.projects.update("risk-platform", description="Credit decisioning models.")curl -X PATCH https://api.kaimei.ai/v1/projects/risk-platform \
-H "Authorization: Bearer $KAIMEI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"description": "Credit decisioning models."}'{
"object": "project",
"id": "prj_40c081b2465e96db2cdc",
"name": "Risk platform",
"slug": "risk-platform",
"description": "Credit decisioning models.",
"model_count": 3,
"created_at": "2026-10-31T22:40:22.963721Z",
"updated_at": "2026-10-31T22:40:22.989821Z",
"summary": null
}#Delete a project
/v1/projects/{project}API key or sessionRemove the folder. Models inside it stay in the workspace, ungrouped.
Path parameters
Project id or slug.
Returns
client.projects.delete("risk-platform")curl -X DELETE https://api.kaimei.ai/v1/projects/risk-platform \
-H "Authorization: Bearer $KAIMEI_API_KEY"{
"id": "prj_40c081b2465e96db2cdc",
"object": "project",
"deleted": true
}