# LLM Connections

Source: https://zshot-cli.com/reference/llm_connections/
Markdown: https://zshot-cli.com/reference/llm_connections/index.md
Section: [Reference](https://zshot-cli.com/reference/)

Selects the LLM provider and model behind [`--llm-format-model`](/reference/flags/document/llm-format-model) and [`--navigator-type`](/reference/flags/navigator/navigator-type), as a connection string:

```text
protocol://[key@][host][/base-path]?model=NAME[&options]
```

| Part | Value |
| --- | --- |
| `protocol` | The provider, from its page below |
| `key` | The provider's API key. Omitted, ZShot reads the provider's key variable, and the first one set wins |
| `host` | An endpoint in place of the provider's own, for a self-hosted or proxied API |
| `base-path` | The endpoint's path prefix, for a gateway whose route carries one. Omitted, ZShot uses the provider's own |
| `model` | The model. Omitted, ZShot runs the provider's default model |
| `options` | [Connection string options](/reference/llm_connections/options) |

A bare protocol name such as `anthropic` runs the provider's default model with the key from its variable. A key or model written in the string overrides both. There is no default provider; setting only one of the two flags supplies the other.

| Provider | Description |
| --- | --- |
| [Anthropic](https://zshot-cli.com/reference/llm_connections/anthropic/) | Anthropic's Claude models |
| [OpenAI](https://zshot-cli.com/reference/llm_connections/openai/) | OpenAI's GPT models |
| [Google](https://zshot-cli.com/reference/llm_connections/google/) | Google's Gemini models |
| [Ollama](https://zshot-cli.com/reference/llm_connections/ollama/) | Models on your own Ollama server |
| [Mistral](https://zshot-cli.com/reference/llm_connections/mistral/) | Mistral AI's models |
| [DeepSeek](https://zshot-cli.com/reference/llm_connections/deepseek/) | DeepSeek's models |
| [Mercury](https://zshot-cli.com/reference/llm_connections/mercury/) | Inception Labs' Mercury models |
| [Groq](https://zshot-cli.com/reference/llm_connections/groq/) | Open models hosted by Groq |
| [HuggingFace](https://zshot-cli.com/reference/llm_connections/huggingface/) | Models hosted through HuggingFace |
| [TypeSafe](https://zshot-cli.com/reference/llm_connections/typesafe/) | TypeSafe's decision models, for navigation only |
| [Cloudflare](https://zshot-cli.com/reference/llm_connections/cloudflare/) | Models on Cloudflare Workers AI |
| [OpenRouter](https://zshot-cli.com/reference/llm_connections/openrouter/) | Many makers' models through one API |
| [stdio](https://zshot-cli.com/reference/llm_connections/stdio/) | An external agent, or a person at a terminal |

For a local model, run [Ollama](https://ollama.com) and use [`ollama`](/reference/llm_connections/ollama).

## Example

Through a Cloudflare AI Gateway, whose route is the base path, with the gateway's token in a header:

**CLI**

```sh
zshot -t llm_json \
  --llm-format-model "openai://$OPENAI_API_KEY@gateway.ai.cloudflare.com/v1/$ACCOUNT/$GATEWAY/openai?model=gpt-5.6&header=cf-aig-authorization:Bearer%20$AIG_TOKEN" \
  --llm-format-prompt "Summarize this page." \
  https://zshot-cli.com/example_assets/gazette/ -f out.json
```

## Related

Flags:

- [`--llm-format-model`](https://zshot-cli.com/reference/flags/document/llm-format-model/)
- [`--navigator-type`](https://zshot-cli.com/reference/flags/navigator/navigator-type/)
- [`--llm-usage`](https://zshot-cli.com/reference/flags/diagnostics/llm-usage/)

Topics:

- [Connection String Options](https://zshot-cli.com/reference/llm_connections/options/) — Every query option
- [stdio](https://zshot-cli.com/reference/llm_connections/stdio/)
- [Ollama](https://ollama.com) — Local inference

## Navigation

- [Examples](https://zshot-cli.com/examples/)
- [Download](https://zshot-cli.com/download/)
- [Purchase](https://zshot-cli.com/purchase/)
- [Reference](https://zshot-cli.com/reference/)
  - [Formats](https://zshot-cli.com/reference/formats/)
  - [Flags](https://zshot-cli.com/reference/flags/)
  - [Agents](https://zshot-cli.com/reference/agents/)
  - [Configuration](https://zshot-cli.com/reference/configuration/)
  - [Crawling](https://zshot-cli.com/reference/crawling/)
  - [Docker](https://zshot-cli.com/reference/docker/)
  - [Exit Codes](https://zshot-cli.com/reference/exit_codes/)
  - [Linux](https://zshot-cli.com/reference/linux/)
  - **LLM Connections**
    - [Connection String Options](https://zshot-cli.com/reference/llm_connections/options/)
    - [Roles](https://zshot-cli.com/reference/llm_connections/roles/)
    - [Anthropic](https://zshot-cli.com/reference/llm_connections/anthropic/)
    - [OpenAI](https://zshot-cli.com/reference/llm_connections/openai/)
    - [Google](https://zshot-cli.com/reference/llm_connections/google/)
    - [Ollama](https://zshot-cli.com/reference/llm_connections/ollama/)
    - [Mistral](https://zshot-cli.com/reference/llm_connections/mistral/)
    - [DeepSeek](https://zshot-cli.com/reference/llm_connections/deepseek/)
    - [Mercury](https://zshot-cli.com/reference/llm_connections/mercury/)
    - [Groq](https://zshot-cli.com/reference/llm_connections/groq/)
    - [HuggingFace](https://zshot-cli.com/reference/llm_connections/huggingface/)
    - [TypeSafe](https://zshot-cli.com/reference/llm_connections/typesafe/)
    - [Cloudflare](https://zshot-cli.com/reference/llm_connections/cloudflare/)
    - [OpenRouter](https://zshot-cli.com/reference/llm_connections/openrouter/)
    - [stdio](https://zshot-cli.com/reference/llm_connections/stdio/)
  - [LLM Formatting](https://zshot-cli.com/reference/llm_formatting/)
  - [Local Inputs](https://zshot-cli.com/reference/inputs/)
  - [Navigator](https://zshot-cli.com/reference/navigator/)
  - [Security](https://zshot-cli.com/reference/security/)
  - [Server](https://zshot-cli.com/reference/server/)
  - [Shell completions](https://zshot-cli.com/reference/shell_completions/)
  - [Storage](https://zshot-cli.com/reference/storage/)
  - [Timeouts](https://zshot-cli.com/reference/timeouts/)
  - [Web Bot Auth](https://zshot-cli.com/reference/web_bot_auth/)
- [Support](https://zshot-cli.com/support/)
- [Changelog](https://zshot-cli.com/changelog/)

Site index: https://zshot-cli.com/llms.txt

