Secure Ollama Cloud Inference with DeepFellow
Use Ollama Cloud models through DeepFellow's anonymization layer via the native Ollama-compatible API or the OpenAI-compatible API.
Using Ollama Cloud models through DeepFellow is safer than using them directly thanks to our anonymization layer.
You need to have an Ollama Cloud API Key and the "ollama-cloud" service installed — read how to install services in the Infra Web Panel guide.
Native Ollama API
DeepFellow exposes an Ollama-compatible endpoint at /api/chat. Point any Ollama-compatible client at your DeepFellow server, and it will work without any code changes.
curl -X 'POST' \
'https://deepfellow-server-host/api/chat' \
-H 'Authorization: Bearer DEEPFELLOW_PROJECT_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "gpt-oss:20b",
"messages": [
{
"role": "user",
"content": "Explain how AI works."
}
],
"stream": false
}'Request Options
DeepFellow forwards these options fields and ignores any others, as Ollama does:
num_predict,num_ctx,num_keep,repeat_last_n,top_ktemperature(0 to 2),top_p,min_p,typical_p(0 to 1)repeat_penalty(0 to 10),presence_penalty,frequency_penalty(-2 to 2)seed,stop
Options such as num_gpu, num_thread, mirostat, and tfs_z are dropped and have no effect.
A value outside its range fails with a 400 error. A value above one of the limits set in Configuration fails with a 422 error that names the option:
num_predict:max_generated_tokensnum_ctx,num_keep,repeat_last_n:max_context_tokenstop_k:max_top_k
When num_predict is missing, 0, or negative, DeepFellow sets it to max_generated_tokens.
DeepFellow Server checks the options of an /api/chat request before Infra does. It accepts only these keys: num_ctx, num_predict, num_keep, repeat_last_n, repeat_penalty, temperature, seed, stop, top_k, top_p, min_p, typical_p, tfs_z, presence_penalty, frequency_penalty, penalize_newline, mirostat, mirostat_eta, and mirostat_tau. It drops every other key, such as num_gpu, and does not forward it. Infra then drops the keys listed above as having no effect.
A value outside its range fails on the server with a 400 error of type invalid_request_error that names the option in param:
num_predictis at mostmax_output_tokens_limit. The Ollama values-1(unlimited) and-2(fill the context) stay valid.num_ctx,repeat_last_n, andnum_keepare at mostmax_context_tokens_limit. The Ollama value-1stays valid forrepeat_last_nandnum_keep.top_kis at most1000.
To change max_output_tokens_limit and max_context_tokens_limit, see Configuration.
The server token limits also apply to the OpenAI-compatible, Messages, and Responses APIs. A request with max_tokens, max_completion_tokens, max_output_tokens, or a thinking budget_tokens above max_output_tokens_limit fails with a 400 error of type invalid_request_error.
OpenAI SDK
DeepFellow also provides an OpenAI-compatible API, so you can use the OpenAI SDK with Ollama Cloud models by pointing it at your DeepFellow server.
from openai import OpenAI
client = OpenAI(
api_key="DEEPFELLOW_PROJECT_API_KEY",
base_url="https://deepfellow-server-host/v1",
)
response = client.chat.completions.create(
model="gpt-oss:20b",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{
"role": "user",
"content": "Explain how AI works."
}
]
)
print(response.choices[0].message.content)Decision Models
Ollama Cloud also serves decision models, such as clef:27b. A decision model answers choice, yes/no, and score questions with probabilities instead of text. It doesn't respond to /api/chat or the OpenAI SDK. To call it, send a request to POST /v1/systemone:
curl -X 'POST' \
'https://deepfellow-server-host/v1/systemone' \
-H 'Authorization: Bearer DEEPFELLOW_PROJECT_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "clef:27b",
"state": "My order #1234 arrived broken and I want my money back immediately!",
"questions": {
"intent": {
"type": "choice",
"instructions": "What does the customer want?",
"criteria": {
"refund": "Customer wants money back",
"replacement": "Customer wants a new item",
"info": "Customer asks for information"
}
},
"upset": {
"type": "noul",
"instructions": "Is the customer upset?"
}
}
}'The response has one answer for each question, keyed by the question name:
{
"model": "clef:27b",
"answers": {
"intent": {
"type": "choice",
"choice": "refund",
"probabilities": {
"refund": 0.9899,
"replacement": 0.008,
"info": 0.0021
},
"confidence": 0.97
},
"upset": {
"type": "noul",
"noul": 0.9862
}
},
"usage": {
"input_tokens": 251,
"output_tokens": 0
}
}Ollama Cloud serves decision models only to ollama.com accounts with a paid plan or usage credits. Ollama Cloud doesn't host every decision model. For example, clef-flash runs only on the ollama service.
The anonymization layer doesn't apply to decision requests. DeepFellow sends the state and the questions to Ollama Cloud unchanged, including any personal data that they contain.
For the request fields, the question types, and the errors, see Decision Models.
We use cookies on our website. We use them to ensure proper functioning of the site and, if you agree, for purposes such as analytics, marketing, and targeting ads.