Skip to Content
hackrouter

AI agents

Let a coding agent set up hackrouter, with docs and a skill written for agents.

Coding agents can read these docs, and set hackrouter up for you.

Ask your agent

Paste this into Claude Code, Cursor, Codex or any coding agent:

Integrate hackrouter into this project. Read https://hackrouter.ai/llms-full.txt first. Use the base URL https://api.hackrouter.ai/v1 for OpenAI clients or https://api.hackrouter.ai for Anthropic clients, read the API key from the HACKROUTER_KEY environment variable, and pick a model from https://api.hackrouter.ai/v1/models.

Keep the key itself out of the conversation: set HACKROUTER_KEY in your environment, and let the code read it.

Install the skill

The hackrouter skill teaches an agent the endpoints, how to pick a model, what each error means and how to look up costs. For Claude Code:

mkdir -p ~/.claude/skills/hackrouter
curl -fsSL https://hackrouter.ai/skills/hackrouter/SKILL.md \
  -o ~/.claude/skills/hackrouter/SKILL.md

Claude Code uses it whenever a task involves hackrouter. For a single project, put it in .claude/skills/hackrouter/ in the repository instead. Other agents can read the same file: SKILL.md.

Docs as Markdown

FileWhat it holds
/llms.txtThe index of the docs, a line per page
/llms-full.txtEvery page in one file, with current prices and limits
/docs/<page>.mdOne page: add .md to any docs URL, such as /docs/errors.md

The model list is also available to agents directly, without a key: GET https://api.hackrouter.ai/v1/models.