Skip to main content

Create Model

Compile and create a customized local model tag configuration from a Modelfile string.

POST /api/create

Request Parameters

  • model (string, required): Target name to assign to the new model tag.
  • modelfile (string, required): Raw text contents of your Modelfile configuration.
  • stream (boolean, default true): Stream compile status progress chunks.

Example

curl http://localhost:11434/api/create -d '{
"model": "mario",
"modelfile": "FROM gemma4\nSYSTEM You are Mario from Super Mario Bros."
}'

Response Payload (Streaming logs)

{"status":"parsing modelfile","done":false}
{"status":"looking for base model gemma4","done":false}
{"status":"copying layers","done":false}
{"status":"setting system instructions","done":false}
{"status":"success","done":true}