[GH-ISSUE #1143] Enhancement: Add support for uploading/creating Modelfile via REST API #26337

Closed
opened 2026-04-22 02:33:33 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @amithkoujalgi on GitHub (Nov 15, 2023).
Original GitHub issue: https://github.com/ollama/ollama/issues/1143

Thanks for creating the REST APIs for interacting with Ollama.

I was wondering if it would be a good idea to introduce another API to upload/create a new Modelfile.

For example:

curl -X POST http://localhost:11434/api/upload -d '{
  "name": "my-model-name",
  "modelfile": "<contents of the modelfile here>",
  "path": "/some/path"
}'

path could be a filesystem path relative to a predefined directory (which could be configured from Ollama's config.

It would be great to have this API as it could simplify custom model creation, especially in remotely running Ollama servers (such as docker deployments).

If it makes sense to have the above API, we could also have APIs to update, delete, and list these modelfiles as well.

Originally created by @amithkoujalgi on GitHub (Nov 15, 2023). Original GitHub issue: https://github.com/ollama/ollama/issues/1143 Thanks for creating the REST APIs for interacting with Ollama. I was wondering if it would be a good idea to introduce another API to upload/create a new Modelfile. For example: ``` curl -X POST http://localhost:11434/api/upload -d '{ "name": "my-model-name", "modelfile": "<contents of the modelfile here>", "path": "/some/path" }' ``` `path` could be a filesystem path relative to a predefined directory (which could be configured from Ollama's config. It would be great to have this API as it could simplify custom model creation, especially in remotely running Ollama servers (such as docker deployments). If it makes sense to have the above API, we could also have APIs to update, delete, and list these modelfiles as well.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#26337