Skip to main content

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.

info

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:

OperationRequired access
List space modelsAccess to the space.
List organization modelsAccess to the organization; results include spaces the caller can access.
Create modelAccess to the target space and available catalog product capacity.
Update model metadataedit access on the product.
List or download artifactsview access on the product.
Upload, complete, or delete artifactsedit access on the product.

Endpoint Overview

MethodEndpointDescription
GET/catalog/spaces/{slug}/model-repository/modelsList model repository records in a space.
GET/organizations/{slug}/model-repository/modelsList model repository records across accessible organization spaces.
POST/catalog/spaces/{slug}/model-repository/modelsCreate a model repository record in a space.
PATCH/catalog/products/{product_id}/model-repositoryUpdate model repository metadata for a product.
GET/catalog/products/{product_id}/model-artifactsList model artifacts attached to a product.
POST/catalog/products/{product_id}/model-artifacts/uploadsInitiate 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}/completeComplete an upload session and create the artifact.
GET/catalog/products/{product_id}/model-artifacts/{artifact_id}/downloadDownload 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.

ParameterTypeDescription
skipintegerNumber of records to skip. Default: 0.
limitintegerNumber of records to return. Default: 50, maximum: 1000.
qstringSearch by model text fields.
model_familystringFilter by model family.
typesarrayRepeatable product type filter, for example types=ML%20Model&types=AI%20System.
deployment_statusstringFilter by deployment status.
model_task_typestringFilter by task type.
risk_classificationstringFilter by risk classification.
include_archivedbooleanInclude archived products. Default: false.

List responses include pagination headers:

HeaderDescription
X-Total-CountTotal matching records.
X-PageCurrent page number derived from skip and limit.
X-Has-MoreWhether 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

FieldTypeRequiredDescription
namestringYesDisplay name for the model product.
slugstringNoURL-friendly product slug.
descriptionstringNoShort repository and catalog summary.
long_descriptionstringNoExtended model description.
product_typestringNoDefaults to ML Model. Must be a supported model product type.
providerstringNoSource platform or provider.
environmentstringNoDefaults to development.
risk_classificationstringNoGovernance risk classification.
lifecycle_stagestringNoLifecycle stage such as design, training, validation, deployment, monitoring, or retirement.
model_familystringNoModel family filter value.
model_task_typestringNoModel task type.
model_architecturestringNoArchitecture or algorithm family.
frameworkstringNoTraining or serving framework.
intended_usestringNoIntended business or technical use.
limitationsstringNoKnown limits, failure modes, or exclusions.
deployment_statusstringNoDefaults to development.
serving_urlstringNoServing endpoint or operational URL.
input_schemaobjectNoInput schema metadata.
output_schemaobjectNoOutput schema metadata.
ai_system_typestringNoAI system classification where applicable.
vendor_namestringNoExternal vendor name.
vendor_product_namestringNoExternal vendor product name.
vendor_model_idstringNoExternal vendor model identifier.
deployment_environmentstringNoDeployment environment label for vendor or platform deployments.
business_use_casestringNoBusiness use case for governance context.
is_gpaibooleanNoGeneral-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 groupFields
Identityid, slug, name, description, product_type, provider, space_id, space_slug, space_name
Governance and lifecyclerisk_classification, lifecycle_stage, environment, deployment_status
Model metadatamodel_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 summaryversion_count, current_version_id, current_version_number, current_version_type, current_version_release_date
Artifact summaryartifact_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
Timestampscreated_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"
}
}
FieldTypeRequiredDescription
file_namestringYesOriginal file name.
content_typestringYesMIME content type.
total_size_bytesintegerYesTotal file size in bytes.
sha256stringNoExpected SHA-256 hex digest.
artifact_kindstringNoDefaults to model_binary.
version_labelstringNoHuman-readable artifact version label.
product_version_idUUIDNoProduct version to associate with the artifact.
training_run_idUUIDNoTraining run to associate with the artifact.
is_currentbooleanNoMark the completed artifact as current. Default: false.
external_uristringNoExternal artifact URI metadata.
metadataobjectNoAdditional artifact metadata.

The response is a ModelArtifactUploadSessionResponse.

FieldDescription
idUpload session ID.
product_idProduct receiving the artifact.
file_nameFile name from the initiation request.
content_typeMIME content type.
total_size_bytesExpected total upload size.
chunk_size_bytesChunk size the client should use.
expected_sha256Expected SHA-256 digest, when supplied.
received_bytesBytes received so far.
received_chunksChunk indexes received so far.
statusinitialized, uploading, completed, failed, or expired.
expires_atExpiration timestamp for the upload session.
created_atSession creation timestamp.
completed_atCompletion 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

ValueDescription
model_binarySerialized model binary or package.
weightsModel weights.
checkpointTraining or fine-tuning checkpoint.
adapterAdapter, delta, or fine-tuning artifact.
tokenizerTokenizer or vocabulary artifact.
prompt_bundlePrompt collection or prompt bundle artifact.
eval_reportEvaluation report or benchmark artifact.
model_cardModel card or release documentation.
otherOther model artifact.

Artifact Response

Artifact endpoints return ModelArtifactResponse objects.

FieldDescription
idArtifact ID.
product_idProduct that owns the artifact.
product_version_idLinked product version, if any.
training_run_idLinked training run, if any.
artifact_kindArtifact kind.
version_labelHuman-readable artifact version label.
file_nameArtifact file name.
content_typeMIME content type.
size_bytesArtifact size in bytes.
sha256Computed SHA-256 digest.
storage_backendStorage backend that holds the artifact.
storage_uriBackend storage URI.
external_uriExternal artifact URI metadata, if supplied.
statusavailable, deleted, or failed.
is_currentWhether this artifact is the current artifact for the model.
metadataAdditional artifact metadata.
uploaded_by_idUser who uploaded the artifact.
uploaded_atUpload timestamp.
created_atRecord creation timestamp.
updated_atLast 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

ConditionTypical 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.