Model Sharing

Share your models to the public catalog so other users can discover and use them. Model sharing requires specific account permissions and admin role access.

Overview

Account Feature Required: Model sharing is an account-level feature. If your account does not have model sharing enabled, the API will return a 403 Forbidden error. Please contact Xerotier.ai support to enable model sharing on your account.

When you share a model:

  • The model becomes visible in the public catalog
  • Other Xerotier.ai users can discover and create endpoints using your model
  • You retain ownership and can unshare at any time
  • Existing endpoints continue to function even after unsharing

Catalog Roles

Every model in the public catalog is assigned a catalog role that determines which service tiers it can be used with. The two roles are:

Role Description Allowed Tiers
deployable Default role. Model is visible in the catalog but restricted to XIM infrastructure. XIM only
shared Model is available on shared agents and can be used with any tier. All tiers (Free, CPU, GPU, XIM)

When you share a model via the API, it always starts with the deployable role. The role is promoted to shared when an administrator creates an endpoint on shared infrastructure. See Promotion below.

Catalog Role Promotion

Catalog role promotion is an explicit admin action:

  • Promotion (deployable -> shared): When an admin creates an endpoint on a shared (non-XIM) tier, the system promotes the catalog role to shared. This is the only path that changes a model's catalog role.
  • Demotion (shared -> deployable): Demotion is also an explicit admin action. The model's shared status persists even if agents evict the model -- the activation service will re-provision it on available agents.

The set of models available on shared tiers is controlled by administrators and does not change automatically.

Shared Model Volatility

Important: Shared models are subject to change. Models available on shared agents may be evicted or replaced at any time. Endpoints using shared models on shared tiers may become unavailable if the backing model is removed from shared infrastructure. For guaranteed availability and permanence, deploy models on XIM nodes.

If your workload requires guaranteed model availability, use the XIM tier. XIM nodes are under your control and models will not be evicted by the platform. See the Service Tiers documentation for details.

Share Model

POST /proj_ABC123/v1/models/{modelId}/share

Shares a model to the public catalog, making it discoverable and usable by other Xerotier.ai users.

Requirements

  • User must have admin role in the project
  • Model must be in active or ready status
  • Account must have model sharing feature enabled
curl
curl -X POST https://api.xerotier.ai/proj_ABC123/v1/models/00000000-1111-0000-1111-000000000000/share \ -H "Authorization: Bearer xero_myproject_your_api_key"
Python
import requests API_KEY = "xero_myproject_your_api_key" BASE_URL = "https://api.xerotier.ai/proj_ABC123/v1" MODEL_ID = "00000000-1111-0000-1111-000000000000" response = requests.post( f"{BASE_URL}/models/{MODEL_ID}/share", headers={"Authorization": f"Bearer {API_KEY}"} ) if response.status_code == 200: data = response.json() print(f"Model shared: {data['shared']}") else: print(f"Error: {response.json()}")
Node.js
const MODEL_ID = "00000000-1111-0000-1111-000000000000"; const response = await fetch( `https://api.xerotier.ai/proj_ABC123/v1/models/${MODEL_ID}/share`, { method: "POST", headers: { "Authorization": "Bearer xero_myproject_your_api_key" } } ); if (response.ok) { const data = await response.json(); console.log(`Model shared: ${data.shared}`); } else { const error = await response.json(); console.log(`Error: ${JSON.stringify(error)}`); }

Response

{ "modelId": "00000000-1111-0000-1111-000000000000", "shared": true, "sharedAt": "2026-01-15T10:30:00Z" }

Unshare Model

POST /proj_ABC123/v1/models/{modelId}/unshare

Removes a model from the public catalog. The model will no longer be discoverable by other users, but existing endpoints using the model will continue to function.

Requirements

  • User must have admin role in the project
  • Model must currently be shared
curl
curl -X POST https://api.xerotier.ai/proj_ABC123/v1/models/00000000-1111-0000-1111-000000000000/unshare \ -H "Authorization: Bearer xero_myproject_your_api_key"
Python
import requests API_KEY = "xero_myproject_your_api_key" BASE_URL = "https://api.xerotier.ai/proj_ABC123/v1" MODEL_ID = "00000000-1111-0000-1111-000000000000" response = requests.post( f"{BASE_URL}/models/{MODEL_ID}/unshare", headers={"Authorization": f"Bearer {API_KEY}"} ) if response.status_code == 200: data = response.json() print(f"Model unshared: {not data['shared']}") else: print(f"Error: {response.json()}")
Node.js
const MODEL_ID = "00000000-1111-0000-1111-000000000000"; const response = await fetch( `https://api.xerotier.ai/proj_ABC123/v1/models/${MODEL_ID}/unshare`, { method: "POST", headers: { "Authorization": "Bearer xero_myproject_your_api_key" } } ); if (response.ok) { const data = await response.json(); console.log(`Model unshared: ${!data.shared}`); } else { const error = await response.json(); console.log(`Error: ${JSON.stringify(error)}`); }

Response

{ "modelId": "00000000-1111-0000-1111-000000000000", "shared": false, "unsharedAt": "2026-01-15T12:00:00Z" }

Error Responses

HTTP Status Error Description
403 feature_not_enabled Model sharing is not enabled on your account. Contact Xerotier.ai support.
403 permission_denied User does not have admin role in the project.
400 invalid_model_status Model is not in a valid status for sharing (must be active or ready).
404 model_not_found The specified model does not exist or you do not have access to it.