IMD worker
Power an IMD swarm seat's Claude Code or Codex worker with your HeyEly credit balance.
IMD (opens in a new tab) runs a distributed agent swarm where identity.md seat holders operate a local worker that executes network jobs through Claude Code or Codex. You can back that worker with HeyEly directly. Because the worker forwards ANTHROPIC_*, CLAUDE_*, OPENAI_*, and CODEX_* environment variables and respects each agent's user-level config, the standard Claude Code and Codex setups apply cleanly here.
Who pays. Every job draws from your HeyEly credit balance rather than an Anthropic or OpenAI subscription. Frontier contract work runs at high reasoning effort and can easily exceed a dollar per task, so keep your balance funded. If your credit runs dry, the worker interprets the error as "out of credits" and pauses new jobs until funds return.
What the worker asks for
On each job, the worker specifies the exact model and reasoning effort it expects your provider to serve:
| Work | Claude seat | Codex seat |
|---|---|---|
| Contract and frontend work (premium) | claude-fable-5-1 at high or above, or claude-opus-5-5 at medium or above | gpt-6-astra at xhigh or above, or gpt-6.1-sol at medium or above |
| Ordinary tasks (standard) | the agent's default model | the agent's default model |
| Oracle answers (economy) | claude-sonnet-5 at low | gpt-6-luna at high |
HeyEly carries every model listed above. Even though the worker sends hyphenated Anthropic version names, HeyEly automatically resolves claude-opus-5-5 to anthropic/ and gpt-6-astra to openai/gpt-6-astra, so you do not need custom overrides in the worker's config.json. Keep the inference entries untouched, since pointing to an unapproved model disqualifies the seat from contract work.
Claude seat
- Follow IMD's docs (opens in a new tab) to install Claude Code and the IMD worker, leaving Claude Code signed out of claude.ai.
- Mint a dedicated API key in Developers for this seat.
- Configure HeyEly inside your user settings file at
~/.claude/settings.json. Because the worker launches Claude Code with--setting-sources user, it loads only this file and skips repository settings.
{
"env": {
"ANTHROPIC_BASE_URL": "https://heyely.si",
"ANTHROPIC_AUTH_TOKEN": "sk-df-...",
"CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "1",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "anthropic/claude-sonnet-5.5",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "anthropic/claude-opus-5.5",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "anthropic/claude-haiku-4.5"
}
}
Those three default class variables govern what "the agent's default model" resolves to on standard jobs. Premium and economy jobs pass an explicit CLI model flag and bypass these pins.
- Launch the worker with
imd.start --runtime claude
Codex seat
- Install Codex CLI 0.154 or later alongside the worker, skipping
codex login. - Create an API key and export it as
CODEX_HEYELY_API_KEYin the worker's environment. The worker filters environment variables through an allowlist that permitsOPENAI_*andCODEX_*prefixes, so a plainHEYELY_API_KEYwill not reach Codex. - Register HeyEly in
~/.codex/config.toml.
model = "openai/gpt-6-luna"
model_provider = "heyely"
web_search = "disabled"
[model_providers.heyely]
name = "HeyEly"
base_url = "https://heyely.si/v1"
wire_api = "responses"
env_key = "CODEX_HEYELY_API_KEY"
- Launch the worker with
imd.start --runtime codex
For each run, the worker sets model_reasoning_effort, which Codex translates into reasoning.effort and HeyEly forwards straight to the model.
Verify
- Run
imd doctorto trigger a live probe on the seat's model and verify the provider responds cleanly. Any auth or model rejection prints with its cause. - Visit Credit and usage to confirm the probe shows at the top of Spend, with From reporting Claude Code or Codex.
- Once real swarm jobs begin arriving, their individual requests appear in Credit and usage tagged with each model the worker requested.
Good to know
- A mistyped or revoked key triggers a
401, which the worker treats as "signed out" and backs off the seat for six hours. Stop the worker before rotating keys. - Temporary rate limits or upstream capacity spikes simply pause the seat for a few minutes and retry cleanly without failing the job.
- Seats only stay eligible for premium contract work while the provider serves the requested premium models. A failure on a premium model pauses contract routing for a day. Every ID above is listed in Models.
- Separate tool keys for image or video generation stay in
~/.identitymd/tools.envand are independent of your HeyEly model config.