---
title: "Use Autohand models in other coding agents"
description: "Bring Autohand Fantail and Moa to the coding agent you already use. Each guide takes you from a new API key to a working prompt."
sidebar:
  label: "Overview"
seo:
  description: "Use Autohand Fantail and Moa in Codex, Claude Code, Pi, Hermes Agent, OpenCode, Kilo Code, Cline, Factory Droid, and Aider with an Autohand API key."
---

## How do I use Autohand models in another coding agent? [#quick-answer]

Create an API key in Autohand Console, store it in `AUTOHAND_API_KEY`, and add Autohand to the agent as an OpenAI-compatible provider with the base URL `https://api.autohand.ai/v1` and the model ID `fantail` or `moa`. Agents that do not speak Chat Completions connect through a local LiteLLM proxy.

|  |  |
| --- | --- |
| Status | Available for nine coding agents |
| Requires | An Autohand account and an Autohand API key |
| Base URL | `https://api.autohand.ai/v1` |
| Model IDs | `fantail` and `moa` |

:::warning
**Know before you start:** The Autohand API serves the OpenAI Chat Completions format. It does not serve the OpenAI Responses API or the Anthropic Messages API.
:::

## Before you begin

Every guide starts with the same two steps:

1. Sign in to [Autohand Console](https://console.autohand.ai/). If you do not have an account, sign up first. The Free plan includes Fantail, and Moa requires the Pro plan or above.
2. Open [API Keys](https://console.autohand.ai/api-keys), create a key for the agent, and store it in the `AUTOHAND_API_KEY` environment variable.

Confirm that the key works before you configure the agent. The request lists the models your plan can use.

```bash
curl https://api.autohand.ai/v1/models \
  -H "Authorization: Bearer $AUTOHAND_API_KEY"
```

## Autohand API at a glance [#api]

| Setting | Value |
| --- | --- |
| Base URL | `https://api.autohand.ai/v1` |
| Request format | OpenAI Chat Completions: `POST /v1/chat/completions` |
| Model list | `GET /v1/models` |
| Authentication | `Authorization: Bearer $AUTOHAND_API_KEY` |
| Model IDs | `fantail` and `moa`. The API also accepts `autohand/fantail` and `autohand/moa`. |

## Choose a model [#choose-model]

| Model ID | Use it for | Context | Max output | Plans |
| --- | --- | --- | --- | --- |
| `fantail` | Fast agent loops, quick fixes, reviews, and subagents | 256K tokens | 16K tokens | Free and above |
| `moa` | Planning, large refactors, and repository-wide changes | 1M tokens | 262,144 tokens | Pro and above |

Use Fantail for the main loop and for subagents, which run many short tasks. Use Moa when the agent plans a large change or needs the whole repository in context.

## Supported coding agents [#agents]

| Agent | Connects through | Subagents on Fantail |
| --- | --- | --- |
| [Codex](/integrations/coding-agents/codex) | Local LiteLLM proxy (Responses API) | `[agents] default_subagent_model` |
| [Claude Code](/integrations/coding-agents/claude-code) | Local LiteLLM proxy (Anthropic Messages API) | `CLAUDE_CODE_SUBAGENT_MODEL` and subagent `model` |
| [Pi](/integrations/coding-agents/pi) | Direct custom provider | Subagent example extension |
| [Hermes Agent](/integrations/coding-agents/hermes-agent) | Direct custom endpoint | `delegation.model` |
| [OpenCode](/integrations/coding-agents/opencode) | Direct custom provider | `agent.<name>.model` |
| [Kilo Code](/integrations/coding-agents/kilo-code) | Direct OpenAI Compatible provider | See the guide |
| [Cline](/integrations/coding-agents/cline) | Direct OpenAI Compatible provider | See the guide |
| [Factory Droid](/integrations/coding-agents/factory-droid) | Direct custom model | See the guide |
| [Aider](/integrations/coding-agents/aider) | Direct OpenAI-compatible model | See the guide |

Agents that connect directly send Chat Completions requests to Autohand. Codex and Claude Code use other request formats, so their guides add a local LiteLLM proxy that translates each request.

<AcademyCta course="autohand-models" title="Autohand models" blurb="Learn what each Autohand model is for and how to switch between them in the CLI." />

## Next steps

- [Start with the Codex guide](/integrations/coding-agents/codex)
- [Compare Autohand models](/models)
- [Fantail model reference](/models/fantail)
- [Moa model reference](/models/moa)
- [Create and protect an API key](/agent-sdk/api-key-setup)

**Do I need an Autohand account?**

Yes. You need an account to create the API key that every agent uses.

**Which coding agents work with Autohand models?**

Codex, Claude Code, Pi, Hermes Agent, OpenCode, Kilo Code, Cline, Factory Droid, and Aider.

**Why do Codex and Claude Code need a proxy?**

Codex uses the OpenAI Responses API and Claude Code uses the Anthropic Messages API. The Autohand API serves Chat Completions, so a local LiteLLM proxy translates the requests.
