Skip to main content

Overview

IronClaw defaults to NEAR AI for model access, but supports any OpenAI-compatible endpoint as well as direct Anthropic, OpenAI, and Ollama integrations.

Supported Providers

NEAR AI (Default)

No additional configuration required. On first run, ironclaw onboard opens a browser for OAuth authentication.

Session Token Auth (Default)

Best for: Local development, personal use
Credentials are saved to ~/.ironclaw/session.json. Environment variables:

API Key Auth

Best for: CI/CD, hosting providers, VPS without browser access
Get your API key from cloud.near.ai. Automatic mode selection: When NEARAI_API_KEY is set, IronClaw automatically uses the Chat Completions API at cloud-api.near.ai instead of session-based auth.

Anthropic (Claude)

Direct access to Claude models via Anthropic API.
Get your API key: console.anthropic.com/settings/keys

Optional Base URL Override

OpenAI (GPT)

Direct access to OpenAI models.
Get your API key: platform.openai.com/api-keys

Optional Base URL Override

Ollama (Local)

Run models locally with Ollama.

Installation

  1. Install Ollama from ollama.com
  2. Pull a model:
  3. Configure IronClaw:
See all models at ollama.com/library.

OpenAI-Compatible Providers

All providers below use LLM_BACKEND=openai_compatible. Set LLM_BASE_URL to the provider’s endpoint and LLM_API_KEY if required.

OpenRouter

OpenRouter routes to 300+ models from a single API key.
Get your API key: openrouter.ai/settings/keys Browse all models at openrouter.ai/models.

Optional HTTP Headers

OpenRouter supports custom headers for attribution:

Together AI

Together AI provides fast inference for open-source models.
Get your API key: api.together.xyz/settings/api-keys

Fireworks AI

Fireworks AI offers fast inference with compound AI system support.
Get your API key: fireworks.ai/account/api-keys

vLLM / LiteLLM (Self-Hosted)

For self-hosted inference servers:
LiteLLM proxy (forwards to any backend, including Bedrock, Vertex, Azure):

LM Studio (Local GUI)

Start LM Studio’s local server, then:

Extra HTTP Headers

For OpenAI-compatible providers that require custom headers:
Format: Comma-separated Key:Value pairs. Values can contain colons (e.g., URLs).

Using the Setup Wizard

Instead of editing .env manually, run:
Select “OpenAI-compatible” for OpenRouter, Together AI, Fireworks, vLLM, LiteLLM, or LM Studio. The wizard will prompt for the base URL and API key.

Advanced Configuration

Fallback Models

For NEAR AI, configure automatic failover:
If the primary model fails, requests automatically fall through to the fallback.

Circuit Breaker

Prevent cascading failures:

Response Caching

Cache LLM responses in memory (saves tokens on repeated prompts):

Retries

Embeddings Providers

For semantic search in workspace memory:
Both NEAR AI and OpenAI use the same model: text-embedding-3-small.