Skip to content

API Reference Batch 11 — Model Registry

This batch documents the model registry API endpoints introduced in platform-0056. The model registry stores metadata for all AI models in use, including OCC SR 11-7 risk tier classifications and validation status. See Model Risk Management for conceptual documentation.

All endpoints require a valid Bearer token with role: admin:

Authorization: Bearer <jwt>

GET /api/admin/models

Returns all registered models for the organization, ordered by created_at descending.

Query parameters:

ParameterTypeDescription
risk_tierstringFilter by risk tier: tier_1, tier_2, tier_3, tier_4
validation_statusstringFilter by status: draft, pending_validation, in_validation, needs_remediation, validated, deprecated
providerstringFilter by provider name (case-insensitive, partial match)
searchstringFull-text search across model_id, display_name, and description
limitintegerMax results to return. Default: 50. Max: 200.
offsetintegerPagination offset. Default: 0.

Response 200 OK:

{
"total": 14,
"limit": 50,
"offset": 0,
"models": [
{
"id": "550e8400-e29b-41d4-a716-446655440001",
"tenant_id": "org_abc",
"model_id": "gpt-4o",
"provider": "openai",
"display_name": "GPT-4o",
"risk_tier": "tier_2",
"validation_status": "validated",
"owner": "ml-risk-team@example.com",
"description": "Primary production model for customer service workflows",
"tags": {
"business_unit": "retail_banking",
"use_case": "customer_service"
},
"last_seen_at": "2026-03-12T23:00:00Z",
"created_at": "2026-01-15T09:00:00Z",
"updated_at": "2026-03-01T14:30:00Z"
}
]
}

POST /api/admin/models

Register a new model in the inventory.

Request body:

{
"model_id": "claude-3-5-sonnet-20241022",
"provider": "anthropic",
"display_name": "Claude 3.5 Sonnet (Oct 2024)",
"risk_tier": "tier_2",
"validation_status": "pending_validation",
"owner": "ai-risk-team@example.com",
"description": "Conversational model for internal knowledge base queries",
"tags": {
"business_unit": "operations",
"environment": "production"
}
}
FieldTypeRequiredDescription
model_idstringYesProvider model identifier. Must be unique within the organization.
providerstringYesAI vendor or infrastructure provider (e.g., openai, anthropic, azure, self-hosted).
display_namestringNoHuman-readable name. Defaults to model_id.
risk_tierstringYesOCC SR 11-7 tier: tier_1, tier_2, tier_3, or tier_4.
validation_statusstringNoInitial validation state. Default: draft.
ownerstringNoEmail address or team identifier for the accountable owner.
descriptionstringNoFree-text description of the model’s purpose.
tagsobjectNoKey/value tags for filtering and policy targeting.

Response 201 Created:

{
"id": "550e8400-e29b-41d4-a716-446655440002",
"tenant_id": "org_abc",
"model_id": "claude-3-5-sonnet-20241022",
"provider": "anthropic",
"display_name": "Claude 3.5 Sonnet (Oct 2024)",
"risk_tier": "tier_2",
"validation_status": "pending_validation",
"owner": "ai-risk-team@example.com",
"description": "Conversational model for internal knowledge base queries",
"tags": {
"business_unit": "operations",
"environment": "production"
},
"last_seen_at": null,
"created_at": "2026-03-13T00:00:00Z",
"updated_at": "2026-03-13T00:00:00Z"
}

Error responses:

StatusCodeDescription
400validation_errorMissing required fields or invalid enum value
409model_already_existsA model with this model_id already exists in the organization

GET /api/admin/models/{id}

Retrieve a single model registry entry by its UUID.

Path parameters:

ParameterDescription
idModel registry entry UUID

Response 200 OK:

{
"id": "550e8400-e29b-41d4-a716-446655440001",
"tenant_id": "org_abc",
"model_id": "gpt-4o",
"provider": "openai",
"display_name": "GPT-4o",
"risk_tier": "tier_2",
"validation_status": "validated",
"owner": "ml-risk-team@example.com",
"description": "Primary production model for customer service workflows",
"tags": {
"business_unit": "retail_banking",
"use_case": "customer_service"
},
"last_seen_at": "2026-03-12T23:00:00Z",
"created_at": "2026-01-15T09:00:00Z",
"updated_at": "2026-03-01T14:30:00Z"
}

Error responses:

StatusCodeDescription
404model_not_foundNo model with this ID exists in the organization

PUT /api/admin/models/{id}

Update a model registry entry. All fields are optional — only supplied fields are updated (partial update semantics).

Path parameters:

ParameterDescription
idModel registry entry UUID

Request body:

{
"risk_tier": "tier_1",
"validation_status": "in_validation",
"owner": "sr-ml-risk@example.com",
"description": "Reclassified to Tier 1 after production impact review"
}
FieldTypeDescription
display_namestringHuman-readable name
risk_tierstringNew risk tier: tier_1, tier_2, tier_3, tier_4
validation_statusstringNew validation status
ownerstringUpdated owner email or team ID
descriptionstringUpdated description
tagsobjectReplaces the entire tags map (not merged). Send existing tags you wish to keep.

Response 200 OK: Returns the updated model object (same schema as GET).

Audit note: All PUT operations generate an audit event with the changed fields recorded for OCC SR 11-7 change history.

Error responses:

StatusCodeDescription
400validation_errorInvalid field value
404model_not_foundNo model with this ID
422invalid_status_transitionThe requested validation_status transition is not permitted. See Model Risk Management for valid transitions.

DELETE /api/admin/models/{id}

Remove a model from the registry. This does not prevent the model from being used — it only removes the registry entry. If the model is referenced by active model_risk_tier policy conditions, those conditions will evaluate the model as tier_4 (the default for unregistered models) after deletion.

Path parameters:

ParameterDescription
idModel registry entry UUID

Response 204 No Content

Error responses:

StatusCodeDescription
404model_not_foundNo model with this ID

POST /api/admin/models/discover

Scan the audit log for AI request events and create draft registry entries for any model identifier not already registered.

Request body:

{
"lookback_days": 30,
"auto_assign_tier": "tier_4",
"dry_run": false
}
FieldTypeRequiredDescription
lookback_daysintegerNoDays of audit history to scan. Default: 30. Max: 365.
auto_assign_tierstringNoRisk tier for newly discovered models. Default: tier_4.
dry_runbooleanNoIf true, returns discovery results without creating entries. Default: false.

Response 200 OK:

{
"discovered": 7,
"created": 5,
"existing": 2,
"dry_run": false,
"models": [
{
"model_id": "gpt-4o-mini",
"provider": "openai",
"status": "created",
"validation_status": "draft",
"risk_tier": "tier_4",
"first_seen_at": "2026-02-14T10:23:00Z",
"last_seen_at": "2026-03-12T18:45:00Z",
"request_count_30d": 1243
},
{
"model_id": "gpt-4o",
"provider": "openai",
"status": "existing",
"validation_status": "validated",
"risk_tier": "tier_2"
}
]
}
Response fieldDescription
discoveredTotal distinct model IDs found in audit logs
createdNew registry entries created
existingModels already in the registry (skipped)
dry_runWhether this was a dry run
models[].statuscreated or existing
models[].request_count_30dNumber of audit events for this model in the lookback period
models[].first_seen_atEarliest audit event for this model in the lookback period

Note: Newly created entries have validation_status: draft and provider inferred from the model ID format. Provider inference uses a built-in lookup table (OpenAI, Anthropic, Google, Cohere, Meta patterns). Unknown providers are set to unknown.


GET /api/admin/model-inventory-export

Export the complete model registry as a CSV file. Intended for GRC platform import, OCC SR 11-7 examination submissions, and internal risk reporting.

Query parameters:

ParameterTypeDescription
formatstringOutput format: csv or json. Default: csv.
risk_tierstringFilter by tier (optional).
validation_statusstringFilter by validation status (optional).

Response 200 OK (CSV):

Content-Type: text/csv
Content-Disposition: attachment; filename="model-inventory-2026-03-13.csv"

CSV columns:

ColumnDescription
idRegistry entry UUID
model_idProvider model identifier
providerAI vendor
display_nameHuman-readable name
risk_tierOCC SR 11-7 tier (tier_1–tier_4)
validation_statusCurrent validation lifecycle state
ownerAccountable owner
descriptionDescription
tagsJSON-serialized tag map
last_seen_atLast audit event timestamp for this model
created_atRegistry entry creation timestamp
updated_atLast modification timestamp

Response 200 OK (JSON): Returns the full model list in the same schema as GET /api/admin/models (no pagination — all records returned).