http://localhost:11434.
Authentication is required for the following:
- Running cloud models via ollama.com
- Publishing models
- Downloading private models
- Signing in: sign in from your local installation, and Ollama will automatically take care of authenticating requests to ollama.com when running commands
- API keys: API keys for programmatic access to ollama.com’s API
Signing in
To sign in to ollama.com from your local installation of Ollama, run:ollama signin
ollama run gpt-oss:120b-cloud
curl http://localhost:11434/api/generate -d '{
"model": "gpt-oss:120b-cloud",
"prompt": "Why is the sky blue?"
}'
API keys
For direct access to ollama.com’s API served athttps://ollama.com/api, authentication via API keys is required.
First, create an API key, then set the OLLAMA_API_KEY environment variable:
export OLLAMA_API_KEY=your_api_key
curl https://ollama.com/api/generate \
-H "Authorization: Bearer $OLLAMA_API_KEY" \
-d '{
"model": "gpt-oss:120b",
"prompt": "Why is the sky blue?",
"stream": false
}'