Ollama
Ollama はローカルのデフォルトです:1つのCLI、モデルライブラリ、localhost:11434/v1 のOpenAI互換サーバー。`ollama pull llama3.3` を一度引けば、あとは普通のプロバイダのように呼べます。
Ollama はローカルのデフォルトです:1つのCLI、モデルライブラリ、localhost:11434/v1 のOpenAI互換サーバー。`ollama pull llama3.3` を一度引けば、あとは普通のプロバイダのように呼べます。
macOS、Linux、Windows。クォータなし。あなたがCloudを選択しない限り、リクエストはマシンの外に出ません。GUIが欲しければLM Studio、本番のバッチ処理ならvLLMです。
- 最大コンテキスト
- Whatever your RAM allows
- 無料プラン
- 無制限・プライベート
- 条件
- 不要 — アカウントなし
エンドポイント
ベースURL
http://localhost:11434/v1レート制限
None — it is your machine- OpenAI互換
- 公式SDK:Ollama SDK
- テキスト
- 画像
- コード
- ビジョン
- 推論
コード例
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"])知っておくべきこと
- 最初のリクエストの前に、一度 `ollama pull llama3.3` を実行してください。
無料で利用できるモデル5
- 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