Ollama
Ollama est le standard local : un CLI, une bibliothèque de modèles, un serveur compatible OpenAI sur localhost:11434/v1. `ollama pull llama3.3` une fois, puis on l’appelle comme n’importe quel autre fournisseur.
Ollama est le standard local : un CLI, une bibliothèque de modèles, un serveur compatible OpenAI sur localhost:11434/v1. `ollama pull llama3.3` une fois, puis on l’appelle comme n’importe quel autre fournisseur.
macOS, Linux, Windows. Aucun quota. La requête ne quitte jamais la machine sauf si vous optez pour Cloud. Pour une GUI : LM Studio. Pour du batching de production : vLLM.
- Contexte max
- Whatever your RAM allows
- Offre gratuite
- Illimité et privé
- Exigence
- Rien — pas de compte
Point de terminaison
URL de base
http://localhost:11434/v1Limite de débit
None — it is your machine- Compatible OpenAI
- SDK natif : Ollama SDK
- texte
- image
- code
- vision
- raisonnement
Exemples de code
npm install openaiimport OpenAI from 'openai'
const client = new OpenAI({
baseURL: 'http://localhost:11434/v1',
apiKey: 'not-needed'
})
const response = await client.chat.completions.create({
model: 'llama3.3',
messages: [{ role: 'user', content: 'Explain closures in one paragraph.' }]
})
console.log(response.choices[0].message.content)pip install openaifrom openai import OpenAI
client = OpenAI(
base_url="http://localhost:11434/v1",
api_key="not-needed",
)
response = client.chat.completions.create(
model="llama3.3",
messages=[{"role": "user", "content": "Explain closures in one paragraph."}],
)
print(response.choices[0].message.content)curl http://localhost:11434/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "llama3.3",
"messages": [{"role": "user", "content": "Explain closures in one paragraph."}]
}'npm install ollamaimport { Ollama } from 'ollama'
const ollama = new Ollama({ host: 'http://localhost:11434' })
const response = await ollama.chat({
model: 'llama3.3',
messages: [{ role: 'user', content: 'Explain closures in one paragraph.' }]
})
console.log(response.message.content)pip install ollamafrom ollama import Client
client = Client(host="http://localhost:11434")
response = client.chat(
model="llama3.3",
messages=[{"role": "user", "content": "Explain closures in one paragraph."}],
)
print(response["message"]["content"])Bon à savoir
- Lancez une fois `ollama pull llama3.3` avant la première requête.
Modèles que vous obtenez gratuitement5
- Llama 3.3 70B
llama-3.3-70b - Qwen 3
qwen3 - GPT-OSS 120B
gpt-oss-120b - DeepSeek R1
deepseek-ai/DeepSeek-R1 - DeepSeek V4
deepseek-v4-flash