Request
Endpoint
Request Body
Name for the new model (e.g.,
my-model, namespace/model:tag)Model name to use as base, or path to local file
Map of file paths to blob digests for model files (GGUF or safetensors)Example:
{"model.gguf": "sha256:abc123...", "config.json": "sha256:def456..."}Map of LoRA adapter files to include when creating the model
Enable streaming of progress updates
Quantization format for the model (e.g.,
"Q4_0", "Q5_K_M", "Q8_0")URL of upstream Ollama API for remote models
Custom prompt template to use for the model
System prompt for the model
License information (string or array of strings)
Map of model parameters (e.g., temperature, top_k, etc.)
List of messages to embed in the model
Template renderer to use
Output parser to use (e.g.,
"harmony" for GPT-OSS models)Minimum Ollama version required by the model
Additional metadata for the model (not exposed in Modelfiles)
Response
Response Fields
Status message describing the current operation
Digest of the layer being processed (during operations)
Total size in bytes (during file operations)
Bytes completed (during file operations)
Examples
Create from Base Model
Create from GGUF File
First, upload the GGUF file:Create with Quantization
Create from Safetensors
Non-Streaming Response
Example Streaming Response
Error Responses
Description of the error
Common Errors
- 400 Bad Request: Invalid model name, missing required fields, or invalid file paths
- 404 Not Found: Base model not found
- 500 Internal Server Error: Error during model creation
You must provide either
from (base model) or files (model files), but not both.When creating from files, ensure all files are uploaded via
/api/blobs/:digest before calling /api/create.