Use the network

Models served by the network answer through an OpenAI- and Anthropic-compatible API. Point an existing client at the HoloNear base URL and keep your code.

Try it without code

  • Sign in with Connect Wallet at the top of the dashboard. On the public network the chat sends your sign-in with each message; signed out, it gets 401.
  • Open the Chat tab in this dashboard and pick a model in the list at the top right.
  • Type a message and press Send. The reply streams in as the model writes it.
  • On a model that reads images, add one with Attach image, or paste or drop it on the chat: it goes with your next message, and with each one after it in the conversation. Your browser turns it upright, resizes it and leaves its metadata out before it is sent, when it can; the coordinator does the same again for every image (see Images). A file that is not a PNG, JPEG or WebP is attached only when your browser can convert it: one it cannot, such as a HEIC photo in a browser that does not open HEIC, is not attached, and the chat names it and says why. When a message fails before its reply begins, or you press Stop before it does, it goes back into the message box with its images, to send again. When the coordinator refused one of its images (400 invalid_image), its images are left out, and the chat says so.
  • Under the chat, Use from the API shows the same request as curl, Python and JavaScript, ready to copy. Switch between chat, messages and responses to get it for /v1/chat/completions, /v1/messages or /v1/responses.

The Redact PII checkbox under the chat hides personal data from the node; read what it covers in Request reference before relying on it.

Find a model

The Chat tab in this dashboard lists the models you can use. From the terminal, ask the API:

Terminal
curl https://coordinator.holonear.app/v1/models

Each entry has an id, the value you send as model: it must match exactly, and an unknown one fails with 404. Most entries also carry replicas, the number of node groups serving it right now. A model with replicas: 0 has no node serving it, and requests to it fail with 503. A LoRA, <base>#<name>, shows its base model's replicas: it stays listed while no node holds it, and starts on first use.

Your own fine-tunes are listed too, to you only, when the request carries your sign-in token as its bearer; see Your owner key.

The everyday entry, qwen3.8-27b-8k, holds 8,192 tokens of prompt and reply. Coding agents use the long entry, qwen3.8-27b-64k: the same model with 65,536 tokens, marked long_context: true. A session that outgrows it can use qwen3.8-27b-128k, the same model with 131,072 tokens, at twice the price per token and slower (see The 128K entry), and one that outgrows that can use qwen3.8-27b-256k, with 262,144 tokens, at four times the price per token and slower still (see The 256K entry). For now each long entry is served only by a Max- or Ultra-class Mac with the memory to hold it alone, not split across Macs: a split Mac keeps none of a session's earlier prompt, so every step would read the whole conversation again. They list no replicas unless you are signed in. The Chat tab and the desktop app use the everyday entry.

Base URL

  • OpenAI-compatible: https://coordinator.holonear.app/v1 — /chat/completions, /completions and /responses.
  • Anthropic-compatible: https://coordinator.holonear.app — the SDK adds /v1/messages.

API key

On the public network, a request from your code needs an API key, sent in the Authorization header as Bearer YOUR_API_KEY; without one it fails with 401. API keys are issued by the coordinator's operator. Listing the models needs no key, and the Chat tab uses your sign-in instead.

Send your first request

With curl:

Terminal
curl https://coordinator.holonear.app/v1/chat/completions \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "qwen3.8-27b-8k",
    "messages": [{"role": "user", "content": "Say hi. /no_think"}],
    "max_tokens": 64
  }'

With the OpenAI Python SDK (pip install openai), which sends api_key as that bearer:

Terminal
python3 - <<'EOF'
from openai import OpenAI

client = OpenAI(base_url="https://coordinator.holonear.app/v1", api_key="YOUR_API_KEY")
reply = client.chat.completions.create(
    model="qwen3.8-27b-8k",
    messages=[{"role": "user", "content": "Say hi. /no_think"}],
    max_tokens=64,
)
print(reply.choices[0].message.content)
EOF

With the Anthropic Python SDK (pip install anthropic), pass the key as auth_token, which the SDK sends as the bearer. Older versions of the SDK send api_key in an x-api-key header instead, which the network does not read, so that request gets 401. Run it with ANTHROPIC_API_KEY unset, as below: otherwise an older SDK reads it from your environment and sends your Anthropic key to this network instead of auth_token.

Terminal
env -u ANTHROPIC_API_KEY python3 - <<'EOF'
import anthropic

client = anthropic.Anthropic(base_url="https://coordinator.holonear.app", auth_token="YOUR_API_KEY")
reply = client.messages.create(
    model="qwen3.8-27b-8k",
    max_tokens=64,
    messages=[{"role": "user", "content": "Say hi. /no_think"}],
)
print(reply.content[0].text)
EOF

For streaming, send "stream": true (or stream=True in the SDK). The reply arrives as server-sent events. How the stream ends depends on the route: data: [DONE] on /v1/chat/completions, a message_stop event on /v1/messages, and a response.completed event on /v1/responses.

What to expect

  • Always set max_tokens. Without it a reply runs until the model stops on its own — in one test, 455 tokens over more than two minutes.
  • Qwen3 thinks first. Its reasoning arrives apart from the answer: in reasoning_content on /chat/completions (delta.reasoning_content when streamed), as a reasoning output item before the message on /responses, and as a thinking content block before the text on /v1/messages. The answer holds no reasoning and no </think>. To skip the reasoning, send "chat_template_kwargs": {"enable_thinking": false} on any of the three, or the route's own switch: "reasoning": {"effort": "none"} on /responses, "thinking": {"type": "disabled"} on /v1/messages.
  • No key, no answer. A request without a key fails with 401 and missing credentials. A key the network does not know, or one that was revoked or has expired, gets 401 and invalid or unauthorized API key.
  • No serving node, no answer. When no node is serving the model, the request fails at once with 503 and model 'qwen3.8-27b-8k' has no ready replica. Right after nodes come online, the first reply can take a few minutes while they load the weights.
  • A LoRA starts on first use. When no node holds a LoRA, its first request loads it: the reply waits up to about 45 seconds, then streams as usual. If the LoRA is still starting, the request fails with 503 and adapter_loading, with Retry-After: 10: send it again then. When too many requests are already waiting for LoRAs to start, it fails with 429 and adapter_queue_full, with Retry-After: 5. On /v1/messages the error carries no code: wait its Retry-After and send again. The Chat tab, the desktop app and holonear chat send again by themselves: up to 3 minutes for a LoRA that is starting, and three times for a full queue.

Coding agents: Claude Code and Codex

Point Claude Code at the long entry, with its small background model on the everyday entry. Every variable below is required:

Terminal
env -u ANTHROPIC_API_KEY \
  ANTHROPIC_BASE_URL=https://coordinator.holonear.app \
  ANTHROPIC_AUTH_TOKEN=YOUR_API_KEY \
  ANTHROPIC_MODEL=qwen3.8-27b-64k \
  ANTHROPIC_SMALL_FAST_MODEL=qwen3.8-27b-8k \
  ANTHROPIC_DEFAULT_HAIKU_MODEL=qwen3.8-27b-8k \
  CLAUDE_CODE_MAX_CONTEXT_TOKENS=65536 \
  CLAUDE_CODE_MAX_OUTPUT_TOKENS=8192 \
  claude

For Codex, in ~/.codex/config.toml, with your key in HOLONEAR_API_KEY:

Terminal
model = "qwen3.8-27b-64k"
model_provider = "holonear"
model_context_window = 65536

[model_providers.holonear]
name = "HoloNear"
base_url = "https://coordinator.holonear.app/v1"
env_key = "HOLONEAR_API_KEY"
wire_api = "responses"
  • Anthropic does not support this setup. Claude Code works here because the network answers in the Anthropic format, but Anthropic does not support routing Claude Code to non-Claude models (see Claude Code's gateway page).
  • Set ANTHROPIC_AUTH_TOKEN. With only ANTHROPIC_BASE_URL set, a claude.ai login saved on your machine stays the credential Claude Code sends, so it goes to this network instead of your key, and the request fails with 401.
  • The window is 65,536 tokens (131,072 on the 128K entry, 262,144 on the 256K entry). Without CLAUDE_CODE_MAX_CONTEXT_TOKENS (or Codex's model_context_window) the agent assumes a larger one and sends more than the entry holds, which fails with 400 and token_budget_exhausted.
  • A reply holds at most 8,192 tokens. A longer one, such as a single write of about 700 lines, is cut and the step fails: ask the agent to write large files in parts.
  • Codex sets no reply cap. The 8,192-token cap above comes from Claude Code's CLAUDE_CODE_MAX_OUTPUT_TOKENS. Codex 0.167.0 has no setting for one beside model_context_window and sends none, so a single reply can run until the window is full: one step that takes a long time. Ask it to write large files in parts too.
  • Keep CLAUDE.md short. It is sent on every step, and every token of it comes out of the room the session has before Claude Code compacts it (at about 44,000 tokens with these settings, about 110,000 on the 128K entry and about 241,000 on the 256K entry). A compaction costs two slow steps.
  • Thinking is off on the long entry. Claude Code (2.1.314) always asks for its adaptive thinking, with or without MAX_THINKING_TOKENS, so it gets the answer without reasoning. A client that sends "thinking": {"type": "enabled", "budget_tokens": N} turns it on: the reasoning comes back as thinking blocks, is not sent back into the prompt, and counts toward the 8,192-token reply.
  • Your code reaches the coordinator in plaintext. These are the OpenAI- and Anthropic-compatible routes: the coordinator reads each prompt and reply, and the serving node computes on them (see Security). Do not point an agent at a repository whose contents you cannot share.
  • When no long Mac is free. With no Mac online that holds the long entry on its own, or every one busy with another session, a request fails with 503, overloaded_error and Retry-After: 30. Claude Code retries every 30 seconds for about 5 minutes, then stops that step with an error; send it again later. A new session of yours, such as Claude Code restarted, takes over the Mac your session holds once that session has been idle for a minute. While your other session is working, the new one gets the busy reply.
  • A step waits at most 5 minutes without a stream. The network keeps a stream alive while a long prompt is read. If the stream is lost anyway, Claude Code sends the step again without streaming and gives up on each attempt after 5 minutes. A lost stream also drops what the session had already sent, so each attempt reads the whole prompt again, which takes longer than 5 minutes past about 30,000 tokens (fewer on a slower Mac). Such a step never completes that way (in one test, 10 attempts over 57 minutes, then an error). Start the step again instead.
  • The first step of a session is slow. Claude Code's first request is about 11,000 tokens, which a Mac reads in one to two minutes; later steps reuse what the session already sent and answer in seconds.

The 128K entry

For a session that outgrows 65,536 tokens, point the agent at qwen3.8-27b-128k instead: in the Claude Code command above set ANTHROPIC_MODEL=qwen3.8-27b-128k and CLAUDE_CODE_MAX_CONTEXT_TOKENS=131072; for Codex set model = "qwen3.8-27b-128k" and model_context_window = 131072. Everything above holds for it too. What differs:

  • It costs twice as much per token as the 64K entry, for every kind of token: prompt, cached prompt and reply.
  • It is slower late in a session. Each step reads only what the session added since its last one, but each added token costs more the longer the conversation is. Near 128K, on a Mac like an M3 Max, a step that adds up to about 4,000 tokens (a command's output, a few small files) answers in about 2 minutes, and a big read of about 10,000 tokens (a file of about 650 lines) takes about 4 to 5 minutes. A reply streams at about 4 tokens a second there, so a reply of the full 8,192 tokens takes over half an hour. An older Max is slower.
  • A full read takes about 38 minutes. The first step of a session that is already long, and any step after the session lost its Mac, reads the whole conversation: 130,800 tokens took 38 minutes on an M3 Max. The network keeps the stream alive while it reads; Claude Code has been seen to wait 16 minutes so, and a longer wait is untested.
  • A pause of over an hour costs a full read. A session keeps its Mac for an hour after its last step (30 minutes on the 64K entry); after that another session may take the Mac, and the next step reads the whole conversation again. While your session holds a Mac, no other user can use it.
  • Fewer Macs can serve it. It needs a Max or Ultra with more free memory than the 64K entry needs, so it answers 503 and overloaded_error more often.

The 256K entry

For a session that outgrows 131,072 tokens, point the agent at qwen3.8-27b-256k: in the Claude Code command above set ANTHROPIC_MODEL=qwen3.8-27b-256k and CLAUDE_CODE_MAX_CONTEXT_TOKENS=262144; for Codex set model = "qwen3.8-27b-256k" and model_context_window = 262144. Everything above holds for it too. What differs:

  • It costs four times as much per token as the 64K entry (twice the 128K entry's), for every kind of token: prompt, cached prompt and reply.
  • It is slower again late in a session. On a Mac like an M3 Max, a reply streams at a little under 4 tokens a second near 256K, so a reply of the full 8,192 tokens takes about 35 minutes. Each step reads only what the session added since its last one: on the same Mac, a step that adds up to about 4,000 tokens is expected to answer in up to about 2 minutes, and a big read of about 10,000 tokens (a file of about 650 lines) in up to about 5 minutes. These step times are projected, not measured: they take each added token at about 0.03 seconds, its cost near 128K. They are an upper estimate because the measured full reads at 128K and 256K point to about 0.02 seconds an added token near 256K. An older Max is slower.
  • A full read takes about 1 hour 23 minutes. The first step of a session that is already long, and any step after the session lost its Mac, reads the whole conversation: 261,872 tokens took 83 minutes on an M3 Max. The network keeps the stream alive while it reads; Claude Code has been seen to wait 16 minutes so, and a longer wait is untested.
  • A pause of over two hours costs a full read. A session keeps its Mac for two hours after its last step; after that another session may take the Mac, and the next step reads the whole conversation again. While your session holds a Mac, no other user can use it.
  • Even fewer Macs can serve it. It needs a Max or Ultra with 64 GB of memory or more; a 48 GB Mac cannot hold it at macOS's default limit on the memory its GPU may use. So it answers 503 and overloaded_error more often than the 128K entry.

From a terminal, the CLI streams a reply the same way. Point it at the network with --api and give it your key in HOLONEAR_API_KEY for that one command. --api-key works too, but puts the key in the process list. Don't export the key: without --api the CLI talks to a local holonear serve, which rejects a key it did not issue.

Terminal
HOLONEAR_API_KEY=YOUR_API_KEY holonear chat --api https://coordinator.holonear.app \
  --model qwen3.8-27b-8k "Say hi. /no_think"

The CLI does not cap the reply; use curl or an SDK with max_tokens when you need one.

Every field and header the API accepts, and which ones it rejects, is in Request reference.