Skip to main content
A model artifact is a set of model files you store on SynapsAI before deployment: weights, config.json, tokenizer files, and anything else the model needs to load. Use an artifact when the weights are not in a Hugging Face repository you want the platform to pull. Send requests to https://api.synapsai.cloud/v1/model-artifacts. Your API key needs upload permission. When the artifact status is ready, deploy it from the launch wizard by choosing that artifact as the model source. The pipeline detected from the files must be one of the supported tasks. Weights should be Safetensors.

Create and upload

1

Create the artifact record

Send display_name and a pipeline such as text-generation. The response includes artifact.id.
2

Start an upload session

POST /v1/model-artifacts/{artifact_id}/uploads returns upload_id. The artifact must not already be ingesting, and it cannot be in use by a deployment.
3

Send each file

PUT /v1/model-artifacts/{artifact_id}/uploads/{upload_id}/files?path= streams the raw bytes. path is the relative path stored in the artifact (config.json, model.safetensors).
4

Complete the upload

POST .../complete inspects the files and marks the artifact ready or failed. Deploy only after status is ready.

Python SDK

pip install --upgrade synapsai-python. client.model_artifacts creates the record, uploads a file or a directory, and reads the artifact back.
upload() starts a session, sends every file, and completes it. Directory uploads keep relative paths. A single file is stored under its filename. pipeline is set only by create(). AsyncSynapsAI has these methods too. Raise timeout for large weight files. The example above uses 3600 seconds.

Step by step

CLI

The package installs a synapsai command. The artifact must already exist.
--timeout defaults to 3600 seconds.

API reference

A 409 means ingest is already running or the artifact is attached to a deployment. A 403 on start means the storage quota is full. Ephemeral upload keys cannot create a new artifact record.