Model Repository API
The Model Repository API manages catalog-backed AI and ML model records and their model artifacts. It is the automation surface for the Model Repository user experience: listing space or organization models, creating and updating model metadata, uploading large artifacts in chunks, verifying checksums, downloading artifacts, and deleting artifacts.
All endpoints are mounted under /api/v1.0. Paths below omit that prefix for
readability.
Permissions
Model records are catalog products. The required access level depends on the operation:
| Operation | Required access |
|---|---|
| List space models | Access to the space. |
| List organization models | Access to the organization; results include spaces the caller can access. |
| Create model | Access to the target space and available catalog product capacity. |
| Update model metadata | edit access on the product. |
| List or download artifacts | view access on the product. |
| Upload, complete, or delete artifacts | edit access on the product. |
Endpoint Overview
| Method | Endpoint | Description |
|---|---|---|
| GET | /catalog/spaces/{slug}/model-repository/models | List model repository records in a space. |
| GET | /organizations/{slug}/model-repository/models | List model repository records across accessible organization spaces. |
| POST | /catalog/spaces/{slug}/model-repository/models | Create a model repository record in a space. |
| PATCH | /catalog/products/{product_id}/model-repository | Update model repository metadata for a product. |
| GET | /catalog/products/{product_id}/model-artifacts | List model artifacts attached to a product. |
| POST | /catalog/products/{product_id}/model-artifacts/uploads | Initiate a managed artifact upload session. |
| PUT | /catalog/products/{product_id}/model-artifacts/uploads/{upload_id}/chunks/{chunk_index} | Upload one artifact chunk. |
| POST | /catalog/products/{product_id}/model-artifacts/uploads/{upload_id}/complete | Complete an upload session and create the artifact. |
| GET | /catalog/products/{product_id}/model-artifacts/{artifact_id}/download | Download an artifact or follow a storage redirect. |
| DELETE | /catalog/products/{product_id}/model-artifacts/{artifact_id} | Delete an artifact. |
Model Filters
Space and organization listing endpoints share the same query parameters.
| Parameter | Type | Description |
|---|---|---|
skip | integer | Number of records to skip. Default: 0. |
limit | integer | Number of records to return. Default: 50, maximum: 1000. |
q | string | Search by model text fields. |
model_family | string | Filter by model family. |
types | array | Repeatable product type filter, for example types=ML%20Model&types=AI%20System. |
deployment_status | string | Filter by deployment status. |
model_task_type | string | Filter by task type. |
risk_classification | string | Filter by risk classification. |
include_archived | boolean | Include archived products. Default: false. |
List responses include pagination headers:
| Header | Description |
|---|---|
X-Total-Count | Total matching records. |
X-Page | Current page number derived from skip and limit. |
X-Has-More | Whether more matching records exist after this page. |
Supported product types are ML Model, AI System, LLM Agent, AI App,
Agent, and Prompt Collection.
Supported model families are traditional_ml, genai, foundation_model,
embedding_model, agent, ai_app, prompt_collection, and other.
Common task types include llm, classification, regression, clustering,
forecasting, embedding, ranking, anomaly_detection, recommendation,
agent, and other.
List Space Models
GET /catalog/spaces/{slug}/model-repository/models
Returns model repository summaries for a single space.
curl -X GET "https://api.qarion.com/api/v1.0/catalog/spaces/ml-platform/model-repository/models?model_family=genai&limit=50" \
-H "Authorization: Bearer YOUR_API_KEY"
List Organization Models
GET /organizations/{slug}/model-repository/models
Returns model repository summaries across the organization spaces the caller can access.
curl -X GET "https://api.qarion.com/api/v1.0/organizations/acme/model-repository/models?types=ML%20Model&include_archived=false" \
-H "Authorization: Bearer YOUR_API_KEY"
Create Model Metadata
POST /catalog/spaces/{slug}/model-repository/models
Creates a catalog product using a Model Repository-supported product type and
returns a ModelRepositoryModelSummary.
{
"name": "Churn Prediction Model",
"slug": "churn-prediction-model",
"description": "Predicts account churn risk for customer success workflows.",
"product_type": "ML Model",
"provider": "ml-platform",
"environment": "production",
"risk_classification": "limited",
"lifecycle_stage": "monitoring",
"model_family": "traditional_ml",
"model_task_type": "classification",
"model_architecture": "XGBoost",
"framework": "scikit-learn",
"intended_use": "Prioritize customer success outreach.",
"limitations": "Not calibrated for accounts with less than 30 days of activity.",
"deployment_status": "production",
"serving_url": "https://models.example.com/churn",
"input_schema": {
"type": "object",
"required": ["account_id", "usage_30d"]
},
"output_schema": {
"type": "object",
"properties": {
"churn_probability": {
"type": "number"
}
}
}
}
Create Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Display name for the model product. |
slug | string | No | URL-friendly product slug. |
description | string | No | Short repository and catalog summary. |
long_description | string | No | Extended model description. |
product_type | string | No | Defaults to ML Model. Must be a supported model product type. |
provider | string | No | Source platform or provider. |
environment | string | No | Defaults to development. |
risk_classification | string | No | Governance risk classification. |
lifecycle_stage | string | No | Lifecycle stage such as design, training, validation, deployment, monitoring, or retirement. |
model_family | string | No | Model family filter value. |
model_task_type | string | No | Model task type. |
model_architecture | string | No | Architecture or algorithm family. |
framework | string | No | Training or serving framework. |
intended_use | string | No | Intended business or technical use. |
limitations | string | No | Known limits, failure modes, or exclusions. |
deployment_status | string | No | Defaults to development. |
serving_url | string | No | Serving endpoint or operational URL. |
input_schema | object | No | Input schema metadata. |
output_schema | object | No | Output schema metadata. |
ai_system_type | string | No | AI system classification where applicable. |
vendor_name | string | No | External vendor name. |
vendor_product_name | string | No | External vendor product name. |
vendor_model_id | string | No | External vendor model identifier. |
deployment_environment | string | No | Deployment environment label for vendor or platform deployments. |
business_use_case | string | No | Business use case for governance context. |
is_gpai | boolean | No | General-purpose AI indicator. |
Update Model Metadata
PATCH /catalog/products/{product_id}/model-repository
Updates the Model Repository metadata for an existing model product. The request body accepts the same fields as create, all optional. Include only fields to change.
{
"deployment_status": "retired",
"lifecycle_stage": "retirement",
"limitations": "Retired after the v3 model replaced this workflow."
}
Model Summary Response
List, create, and update operations return ModelRepositoryModelSummary
objects.
| Field group | Fields |
|---|---|
| Identity | id, slug, name, description, product_type, provider, space_id, space_slug, space_name |
| Governance and lifecycle | risk_classification, lifecycle_stage, environment, deployment_status |
| Model metadata | model_family, model_task_type, model_architecture, framework, serving_url, input_schema, output_schema, ai_system_type, vendor_name, vendor_product_name, vendor_model_id |
| Version summary | version_count, current_version_id, current_version_number, current_version_type, current_version_release_date |
| Artifact summary | artifact_count, current_artifact_id, current_artifact_file_name, current_artifact_kind, current_artifact_content_type, current_artifact_model_format, current_artifact_sha256, current_artifact_size_bytes |
| Timestamps | created_at, updated_at |
List Artifacts
GET /catalog/products/{product_id}/model-artifacts
Returns all non-deleted model artifacts attached to the product.
curl -X GET "https://api.qarion.com/api/v1.0/catalog/products/550e8400-e29b-41d4-a716-446655440000/model-artifacts" \
-H "Authorization: Bearer YOUR_API_KEY"
Upload Artifacts
Managed artifact uploads use a three-step flow.
1. Initiate Upload
POST /catalog/products/{product_id}/model-artifacts/uploads
{
"file_name": "churn-model-v2.onnx",
"content_type": "application/octet-stream",
"total_size_bytes": 73400320,
"sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"artifact_kind": "model_binary",
"version_label": "v2.0.0",
"product_version_id": "4c1e92ac-e430-4b4e-ae49-3a1111111111",
"training_run_id": "5c1e92ac-e430-4b4e-ae49-3a2222222222",
"is_current": true,
"metadata": {
"format": "onnx",
"python": "3.11"
}
}
| Field | Type | Required | Description |
|---|---|---|---|
file_name | string | Yes | Original file name. |
content_type | string | Yes | MIME content type. |
total_size_bytes | integer | Yes | Total file size in bytes. |
sha256 | string | No | Expected SHA-256 hex digest. |
artifact_kind | string | No | Defaults to model_binary. |
version_label | string | No | Human-readable artifact version label. |
product_version_id | UUID | No | Product version to associate with the artifact. |
training_run_id | UUID | No | Training run to associate with the artifact. |
is_current | boolean | No | Mark the completed artifact as current. Default: false. |
external_uri | string | No | External artifact URI metadata. |
metadata | object | No | Additional artifact metadata. |
The response is a ModelArtifactUploadSessionResponse.
| Field | Description |
|---|---|
id | Upload session ID. |
product_id | Product receiving the artifact. |
file_name | File name from the initiation request. |
content_type | MIME content type. |
total_size_bytes | Expected total upload size. |
chunk_size_bytes | Chunk size the client should use. |
expected_sha256 | Expected SHA-256 digest, when supplied. |
received_bytes | Bytes received so far. |
received_chunks | Chunk indexes received so far. |
status | initialized, uploading, completed, failed, or expired. |
expires_at | Expiration timestamp for the upload session. |
created_at | Session creation timestamp. |
completed_at | Completion timestamp, if completed. |
2. Upload Chunks
PUT /catalog/products/{product_id}/model-artifacts/uploads/{upload_id}/chunks/{chunk_index}
Content-Type: application/octet-stream
Send the raw bytes for the chunk in the request body. Use zero-based chunk
indexes and the chunk_size_bytes returned by the initiation response.
curl -X PUT "https://api.qarion.com/api/v1.0/catalog/products/550e8400-e29b-41d4-a716-446655440000/model-artifacts/uploads/660e8400-e29b-41d4-a716-446655440000/chunks/0" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/octet-stream" \
--data-binary "@chunk-0.bin"
Each successful chunk upload returns the updated upload session.
3. Complete Upload
POST /catalog/products/{product_id}/model-artifacts/uploads/{upload_id}/complete
{
"sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"is_current": true
}
Completion assembles the uploaded chunks, computes SHA-256, validates the digest
when one was provided, stores the artifact, and returns a ModelArtifactResponse.
Artifact Kinds
| Value | Description |
|---|---|
model_binary | Serialized model binary or package. |
weights | Model weights. |
checkpoint | Training or fine-tuning checkpoint. |
adapter | Adapter, delta, or fine-tuning artifact. |
tokenizer | Tokenizer or vocabulary artifact. |
prompt_bundle | Prompt collection or prompt bundle artifact. |
eval_report | Evaluation report or benchmark artifact. |
model_card | Model card or release documentation. |
other | Other model artifact. |
Artifact Response
Artifact endpoints return ModelArtifactResponse objects.
| Field | Description |
|---|---|
id | Artifact ID. |
product_id | Product that owns the artifact. |
product_version_id | Linked product version, if any. |
training_run_id | Linked training run, if any. |
artifact_kind | Artifact kind. |
version_label | Human-readable artifact version label. |
file_name | Artifact file name. |
content_type | MIME content type. |
size_bytes | Artifact size in bytes. |
sha256 | Computed SHA-256 digest. |
storage_backend | Storage backend that holds the artifact. |
storage_uri | Backend storage URI. |
external_uri | External artifact URI metadata, if supplied. |
status | available, deleted, or failed. |
is_current | Whether this artifact is the current artifact for the model. |
metadata | Additional artifact metadata. |
uploaded_by_id | User who uploaded the artifact. |
uploaded_at | Upload timestamp. |
created_at | Record creation timestamp. |
updated_at | Last update timestamp. |
Download Artifact
GET /catalog/products/{product_id}/model-artifacts/{artifact_id}/download
Returns the artifact file when it is stored locally, or a redirect response when the configured storage backend provides a download URL.
Delete Artifact
DELETE /catalog/products/{product_id}/model-artifacts/{artifact_id}
Deletes the artifact record and returns 204 No Content.
Error Notes
| Condition | Typical response |
|---|---|
| Caller lacks the required access. | 403 Forbidden. |
| Organization, product, upload session, or artifact cannot be found or accessed. | 404 Not Found or a service-specific error response. |
| Request payload fails validation. | Validation error response from the API. |
| Space has reached its catalog product limit. | Limit enforcement error from the catalog tier gate. |
| Uploaded bytes do not match the expected SHA-256 digest. | Upload completion fails with a validation error. |
| Artifact file is missing from storage. | 404 Not Found with Artifact file not found. |