Skip to main content
Create an API key to call cloud models directly through https://ollama.com/api. A local Ollama installation is not required.

Create a key

  1. Sign in to Ollama.
  2. Open API keys.
  3. Create a key and copy it. You will use it as a bearer token with each request.
Set the key as an environment variable in Bash or Zsh:
Keep API keys out of browser code and source control.

Send a request

Read the answer from message.content. For classification, yes/no questions, and scoring, call System One at https://ollama.com/v1/systemone with the same API key. See the System One cloud examples. You can also use OpenAI or Anthropic clients. Each supports a subset of the original API. For endpoint schemas and response fields, see the API Reference.