Browse Source

add basic REST api documentation

Jeffrey Morgan 1 year ago
parent
commit
91cd54016c
1 changed files with 10 additions and 0 deletions
  1. 10 0
      README.md

+ 10 - 0
README.md

@@ -125,3 +125,13 @@ Finally, run a model!
 ```
 ```
 ./ollama run llama2
 ./ollama run llama2
 ```
 ```
+
+## REST API
+
+### `POST /api/generate`
+
+Generate text from a model.
+
+```
+curl -X POST http://localhost:11434/api/generate -d '{"model": "llama2", "prompt":"Why is the sky blue?"}'
+```