http://localhost:11434 does not require authentication.
To use cloud models, publish models, or download private models, sign in to Ollama. For direct API access to ollama.com, use an API key.
API keys
Direct cloud inference athttps://ollama.com/api and https://ollama.com/v1 requires an API key. No Ollama installation or local server is required.
Create an API key, then set it in your terminal:
Authorization: Bearer header. This also applies to the hosted Anthropic-compatible /v1/messages endpoint; x-api-key alone is not supported.

