Skip to content

Ollama Docs, Revised

Create an API key1

Task page. 6 changes, 2 questions for the owner. Audit: mixed. Original source at commit 318ee28.

Revised

Create an API key to call cloud models directly through https://ollama.com/api. A local Ollama installation isn't2 required.

Create a key

  1. Sign in to Ollama.
  2. Open API keys.
  3. 3Create a key.
  4. Copy the key. You'll4 use it as a bearer token with each request.

Set the key as an environment variable in Bash or Zsh:X43

export OLLAMA_API_KEY="your_api_key"

Keep API keys out of browser code and source control.

Send a request

curl https://ollama.com/api/chat \
  -H "Authorization: Bearer $OLLAMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemma4:31b",
    "messages": [
      {
        "role": "user",
        "content": "Say hello in one sentence."
      }
    ],
    "stream": false
  }'

Read the answer from message.content.5

Next steps

For classification, yes/no questions, and scoring, call System One at https://ollama.com/v1/systemone with the same API key.X29 For examples, see System One cloud examples.6

You can also use OpenAI or Anthropic clients. Each supports a subset of the original API. See OpenAI compatibility and Anthropic compatibility. For endpoint schemas and response fields, see the API Reference.

Notes on this page

  1. 1 Wording Audit: improved A task title starts with a verb and names the result.

    Was: Creating an API key

    type-title-signals-type

  2. 2 Wording Audit: improved Uses a contraction as the voice asks.

    Was: is not

    Contractions

  3. 3 Structure Audit: improved Splits one step that held two actions into two steps.

    Was: 3. Create a key and copy it. You will use it as a bearer token with each request.

    proc-one-action-per-step

  4. 4 Wording Audit: improved Uses a contraction as the voice asks.

    Was: You will use

    PronounContractions

  5. 5 Structure Audit: regression Adds a Next steps heading over the closing paragraphs so the reader sees where to go next; no text was added beyond the heading and a split sentence.

    type-task-link-context

    Auditor: “Next steps” does not say what the section contains, so it falls short of the standard’s requirement for descriptive headings.

  6. 6 Wording Audit: improved Rewords the sentence so the check no longer reads "the System" as a half-named product; the link target is unchanged.

    Was: See the System One cloud examples.

    ProductName

Questions for the owner

Original

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:

export OLLAMA_API_KEY="your_api_key"

Keep API keys out of browser code and source control.

Send a request

curl https://ollama.com/api/chat \
  -H "Authorization: Bearer $OLLAMA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemma4:31b",
    "messages": [
      {
        "role": "user",
        "content": "Say hello in one sentence."
      }
    ],
    "stream": false
  }'

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.

What Changed

The title now starts with a verb and names the result. The key-creation step is split so each step has one action, and the follow-on material sits under a Next steps heading with descriptive link text. Two questions from the cross-page review are attached: where API key setup should live, and what name System One should carry.

Content type: task. The page walks a reader who wants an API key through creating it and sending a first request.

Automated check, original: 0 errors, 1 warnings, 2 suggestions. Revised: 0 errors, 0 warnings, 0 suggestions.

Independent audit (GPT-6): mixed. The revision improves the key setup steps and makes the links easier to understand. The new “Next steps” heading is vague, and the marked owner questions are missing from the change log.

Regressions:

  • The “Next steps” heading is too generic to help readers scan the section.

What the revision missed:

  • The revision marks owner questions X43 and X29, but notes/cloud/api.json lists no questions; the notes summary indicates they concern where API key setup should live and what name System One should carry.
  • The final paragraph changes the OpenAI and Anthropic link text from product names to compatibility page names without recording those changes in the change list.

Structure (2)

  • 3 Splits one step that held two actions into two steps. improved
  • 5 Adds a Next steps heading over the closing paragraphs so the reader sees where to go next; no text was added beyond the heading and a split sentence. regression

Wording (4)

  • 1 A task title starts with a verb and names the result. improved
  • 2 Uses a contraction as the voice asks. improved
  • 4 Uses a contraction as the voice asks. improved
  • 6 Rewords the sentence so the check no longer reads "the System" as a half-named product; the link target is unchanged. improved