Skip to main content
Upload a model to a model library. Requires proper authentication and permissions.

Request

Endpoint

POST /api/push

Request Body

model
string
required
Name of the model to push (e.g., namespace/model:tag)
stream
boolean
default:"true"
Enable streaming of upload progress updates
insecure
boolean
default:"false"
Allow insecure connections to the registry
username
string
Username for registry authentication
password
string
Password for registry authentication

Response

Response Fields

status
string
Status message describing current operation (e.g., “pushing manifest”, “uploading”)
digest
string
Digest of the layer being uploaded
total
integer
Total size of the layer in bytes
completed
integer
Bytes uploaded so far

Examples

Push a Model (Streaming)

curl http://localhost:11434/api/push -d '{
  "model": "myuser/my-custom-model"
}'

Example Streaming Response

{"status":"retrieving manifest"}
{"status":"pushing 8daa9615cce3","digest":"sha256:8daa9615cce30c259a9555b1cc250d461d1bc69980a274b44d7eda0be78076d8","total":4661211936,"completed":0}
{"status":"pushing 8daa9615cce3","digest":"sha256:8daa9615cce30c259a9555b1cc250d461d1bc69980a274b44d7eda0be78076d8","total":4661211936,"completed":1048576}
{"status":"pushing 8daa9615cce3","digest":"sha256:8daa9615cce30c259a9555b1cc250d461d1bc69980a274b44d7eda0be78076d8","total":4661211936,"completed":4661211936}
{"status":"pushing manifest"}
{"status":"success"}

Push with Authentication

curl http://localhost:11434/api/push -d '{
  "model": "myuser/my-custom-model",
  "username": "myuser",
  "password": "mypassword"
}'

Non-Streaming Push

curl http://localhost:11434/api/push -d '{
  "model": "myuser/my-custom-model",
  "stream": false
}'

Example Non-Streaming Response

{
  "status": "success"
}

Error Responses

error
string
Description of the error

Common Errors

  • 400 Bad Request: Invalid model name or missing required fields
  • 401 Unauthorized: Authentication required or invalid credentials
  • 404 Not Found: Model not found locally
  • 500 Internal Server Error: Upload or verification error
Before pushing a model, ensure you’re authenticated with the registry. Models must follow the naming convention namespace/model:tag.
The model must exist locally before it can be pushed. Use /api/create to create a model first if needed.