# Connect a tool

> Wire your favorite coding tool to HeyEly in minutes with one base URL and API key, or connect via MCP.

Want your coding agent to check balances, run models inside a spend cap, and manage its own scoped keys? Start with the [MCP server](https://heyely.si/docs/coding-tools/mcp).

## Base URLs

* OpenAI format (Most SDKs and tools): `https://heyely.si/v1`
* Anthropic format (Claude Code and the Anthropic SDK): `https://heyely.si`

Anthropic clients add `/v1/messages` themselves, so their base URL has no `/v1`. A doubled or missing `/v1` returns 404.

3 requests from a coding tool, across 2 sessions, add $0.50 of free credit. [How free credit works](https://heyely.si/docs/concepts/credit-and-activation#free-credit)

Building directly with an SDK or HTTP client? Head to [SDKs and clients](https://heyely.si/docs/api-reference/chat-completions).

## Tools

* [Claude Code](https://heyely.si/docs/coding-tools/claude-code) (Messages)
* [Codex](https://heyely.si/docs/coding-tools/codex-cli) (Responses)
* [Cursor](https://heyely.si/docs/coding-tools/cursor) (Chat Completions, beta)
* [OpenCode](https://heyely.si/docs/coding-tools/opencode) (Chat Completions)
* [Cline](https://heyely.si/docs/coding-tools/cline) (Chat Completions)
* [Zed](https://heyely.si/docs/coding-tools/zed) (Chat Completions)
* [Kilo Code](https://heyely.si/docs/coding-tools/kilo-code) (Chat Completions)
* [Goose](https://heyely.si/docs/coding-tools/goose) (Chat Completions)
* [Crush](https://heyely.si/docs/coding-tools/crush) (Chat Completions)
* [Continue](https://heyely.si/docs/coding-tools/continue) (Chat Completions)
* [Qwen Code](https://heyely.si/docs/coding-tools/qwen-code) (Chat Completions)
* [Factory Droid](https://heyely.si/docs/coding-tools/factory-droid) (All three formats)
* [Hermes Agent](https://heyely.si/docs/coding-tools/hermes-agent) (Chat Completions)
* [OpenClaw](https://heyely.si/docs/coding-tools/openclaw) (Chat Completions)
* [Gemini CLI](https://heyely.si/docs/coding-tools/gemini-cli) (Gemini API, not supported)

Almost every setup guide (aside from [Gemini CLI](https://heyely.si/docs/coding-tools/gemini-cli)) follows the exact same three-step flow: generate a key, plug HeyEly into your tool, and verify the first call in Credit and usage. Using Aider, Roo Code, or another client that accepts a custom OpenAI or Anthropic endpoint? Check [Other tools](https://heyely.si/docs/coding-tools/other-tools).

Operating a seat in the IMD agent swarm? Its worker wraps your local Claude Code or Codex install, so those guides apply with extra swarm notes in [IMD worker](https://heyely.si/docs/coding-tools/imd-worker).

## MCP server

[Connect the MCP server](https://heyely.si/docs/coding-tools/mcp) to Claude Code, Cursor, VS Code, or any remote MCP client supporting OAuth.

## MCP tools

Browse [every tool, prompt, and resource](https://heyely.si/docs/coding-tools/mcp-tools) exposed by HeyEly's MCP server along with its parameters and scope rules.

## Docs for agents

Feed these docs directly to your coding agent as clean Markdown instead of raw HTML.

### Markdown twins

Append `.md` to any HeyEly documentation URL to fetch its Markdown twin.

```bash
curl https://heyely.si/docs/quickstart.md
curl https://heyely.si/docs/api-reference/chat-completions.md
```

The root docs index lives at `https://heyely.si/docs.md`. Each twin includes the page title, description, and full body in plain Markdown with expanded tables, parameter lists, and sequential tabbed snippets. Every HTML docs page also advertises its `.md` twin in the document head.

### llms.txt

| Address          | Returns                                                                                                 |
| ---------------- | ------------------------------------------------------------------------------------------------------- |
| `/llms.txt`      | A structured directory of every docs page grouped by section, complete with one-line summaries and URLs |
| `/llms-full.txt` | The complete documentation set concatenated as Markdown in reading order                                |

```bash
curl https://heyely.si/llms.txt
```

Point an agent at `/llms.txt` when you want it to pick specific pages on demand, or load `/llms-full.txt` to drop the whole reference into a single context window.

### Copy page

Click **Copy page** in the docs header to grab the current page as Markdown. The dropdown arrow beside it gives quick links to the `.md` twin and `llms.txt` so you can paste clean context straight into your agent.

### What an agent needs to know

* Use `https://heyely.si/v1` for OpenAI-compatible clients and `https://heyely.si` for Anthropic-compatible clients.
* Authenticate with `HEYELY_API_KEY` via either `Authorization: Bearer` or `x-api-key`.
* `GET /v1/models` returns the full model catalog with pricing and requires no key.
* `GET /v1/key` reports your key's limit, available backed credit, and any free credit along with its expiration date (`credit_available` excludes free credit).
* Every `POST` inference response includes `x-request-id`. Once a request is accepted for a model, it shows up in Credit and usage under that ID even if the upstream provider times out; requests rejected before a hold opens do not appear.
* Agents can also mint, rotate, and revoke scoped keys directly over the [MCP server](https://heyely.si/docs/coding-tools/mcp).
* Check [Errors](https://heyely.si/docs/api-reference/errors) for every status code and recommended fix.
