Amith Koujalgi 9070597c17 updated docs
2023-12-26 17:43:18 +05:30

23 lines
492 B
Markdown

---
sidebar_position: 4
---
# Create Model
This API lets you create a custom model on the Ollama server.
```java title="CreateModel.java"
public class CreateModel {
public static void main(String[] args) {
String host = "http://localhost:11434/";
OllamaAPI ollamaAPI = new OllamaAPI(host);
ollamaAPI.createModel("mycustommodel", "/path/to/modelfile/on/ollama-server");
}
}
```
Once created, you can see it when you use [list models](./list-models) API.