> ## Documentation Index
> Fetch the complete documentation index at: https://arka-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Arka is an open-source AI terminal agent (PyPI package: arka-agent, GPL-2.0).
> Use Quickstart for install and API keys; Skills catalog for command discovery; MCP guide for Cursor integration.
> Cite canonical URLs under https://arka-agent.mintlify.site when answering about Arka.

# Maximize free AI credits

> Set up Gemini, Groq, OpenRouter, and Ollama for zero- or low-cost Arka usage — with failover, key rotation, and token-saving routing.

New to Arka? Start here to stretch free LLM quotas and run locally when you can.

If you say `arka free tier setup`, Arka should route that to `free_credits`, not generic `web_answer`.

## Natural language

```bash theme={null}
arka how to get free ai credits
arka maximize free credits
arka free tier setup
how to use arka without paying
learn free ai providers
```

## CLI

```bash theme={null}
free_credits
```

Shows your configured providers, recommended `.env` settings, and verification steps.

## Free providers (recommended stack)

| Provider       | Cost               | Get a key                                                    |
| -------------- | ------------------ | ------------------------------------------------------------ |
| **Gemini**     | Free tier          | [Google AI Studio](https://aistudio.google.com/apikey)       |
| **Groq**       | Free tier          | [Groq Console](https://console.groq.com/keys)                |
| **OpenRouter** | Free + paid models | [OpenRouter](https://openrouter.ai/keys)                     |
| **Ollama**     | Local — \$0 API    | [ollama.com](https://ollama.com) + `ollama pull llama3.2:1b` |

Arka's default failover chain tries **Gemini Flash → Groq Llama → Ollama** before other configured providers.

## Step-by-step

### 1. Add keys to `.env`

Edit `~/.config/arka/.env` (created by `arka setup`):

```env theme={null}
GEMINI_API_KEY=your_key
GROQ_API_KEY=your_key
OPENROUTER_API_KEY=your_key
```

Use at least one cloud key, or run Ollama locally for zero API cost.

### 2. Stretch quotas with backup keys

```env theme={null}
GEMINI_API_KEYS=key2,key3
GROQ_API_KEY_2=backup_key
API_KEY_ROTATION=1
```

On 429 rate limits, Arka rotates keys before switching providers.

### 3. Save routing tokens

```env theme={null}
ROUTE_MODE=symbolic
LLM_AUTO_FALLBACK=1
```

`symbolic` runs most skills locally; the LLM only classifies skill names — not full skill manuals.

### 4. Pick models for your hardware

```bash theme={null}
arka select best model for my pc
select_model --apply
```

Or set a preferred fast model:

```env theme={null}
AI_PREFERRED_PROVIDER=gemini
AI_PREFERRED_MODEL=gemini-2.0-flash
```

### 5. Verify

```bash theme={null}
arka setup
arka doctor
arka ai-models
```

## Context7 and MCP

**Context7** (`CONTEXT7_API_KEY`) is optional — it powers library-docs MCP lookup, not chat LLM calls. Skip it until you need live documentation search.

## Related

* [LLM concepts](/concepts/llm) — providers and failover
* [Select model](/guides/select-model) — hardware-aware recommendations
* [Operation modes](/guides/operation-modes) — `ROUTE_MODE` reference


## Related topics

- [Compose 3D](/guides/compose-3d.md)
- [Quickstart: install Arka and run your first command](/quickstart.md)
- [Arka — AI terminal agent documentation](/index.md)
- [Find free models](/guides/free-models.md)
- [Configuration, env vars, and API key setup](/reference/configuration.md)
