Upload a model to a model library. Requires registering for ollama.ai and adding a public key first.Parameters#
model
: name of the model to push in the form of <namespace>/<model>:<tag>
insecure
: (optional) allow insecure connections to the library. Only use this if you are pushing to your library during development.
stream
: (optional) if false
the response will be returned as a single response object, rather than a stream of objects
Examples#
Request#
Response#
If stream
is not specified, or set to true
, a stream of JSON objects is returned:{ "status": "retrieving manifest" }
{
"status": "starting upload",
"digest": "sha256:bc07c81de745696fdf5afca05e065818a8149fb0c77266fb584d9b2cba3711ab",
"total": 1928429856
}
Then there is a series of uploading responses:{
"status": "starting upload",
"digest": "sha256:bc07c81de745696fdf5afca05e065818a8149fb0c77266fb584d9b2cba3711ab",
"total": 1928429856
}
Finally, when the upload is complete:{"status":"pushing manifest"}
{"status":"success"}
If stream
is set to false
, then the response is a single JSON object: Modified at 2025-03-14 08:37:50