Skip to content

Configuration

Rajesh Gautam edited this page Jun 12, 2026 · 1 revision

Configuration

Curl's AI module (pcAI) is configured via environment variables. Set these before running your program.


Variables

Variable Default Description
CURL_AI_KEY (required) Your API key
CURL_AI_BASE_URL https://openrouter.ai/api/v1 API base URL
CURL_AI_MODEL deepseek/deepseek-chat-v3-0324 Model name

Option A — OpenRouter (default, recommended, free)

Get a free key at openrouter.ai/keys, then:

export CURL_AI_KEY=sk-or-your_key_here

That's all. No other config needed.


Option B — OpenAI

export CURL_AI_KEY=your_openai_key
export CURL_AI_BASE_URL=https://api.openai.com/v1
export CURL_AI_MODEL=gpt-4o-mini

Option C — Ollama (local, no key needed)

Install Ollama, then:

export CURL_AI_BASE_URL=http://localhost:11434/v1
export CURL_AI_MODEL=llama3.2
export CURL_AI_KEY=ollama

Option D — Curl-Bot via Ollama

ollama pull hf.co/gautamritvik/Curl-Bot
export CURL_AI_BASE_URL=http://localhost:11434/v1
export CURL_AI_MODEL=hf.co/gautamritvik/Curl-Bot
export CURL_AI_KEY=ollama

Setting Variables Permanently

Mac / Linux — add to ~/.zshrc or ~/.bashrc:

export CURL_AI_KEY=sk-or-your_key_here

Then reload: source ~/.zshrc

Windows — in PowerShell:

$env:CURL_AI_KEY="sk-or-your_key_here"

Clone this wiki locally