Hugging Face wrapper

Claude2API

Claude.ai sessions, surfaced as an Anthropic-compatible API. This root page exists to make the Space legible at first glance; the actual admin dashboard, health probe, and API behavior still come from the upstream claude2api runtime.

Where to go

The wrapper fixes the root experience only. It does not replace upstream routing, persistence, or configuration semantics.

/admin

Upstream dashboard for accounts, model mapping, proxy settings, and API key changes.

/health

Direct passthrough to the upstream health endpoint, kept simple for probes and checks.

/v1/messages

Anthropic-compatible request path. Auth and streaming semantics remain upstream-defined.

Quick request

Use the Space URL as the base URL. If the Space is private, Hugging Face must allow the request before the app can evaluate its own token checks.

curl https://YOUR-SPACE.hf.space/v1/messages \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $CLAUDE_API_KEY" \
  -d '{
    "model": "claude-sonnet-4-6",
    "max_tokens": 128,
    "messages": [
      {"role": "user", "content": "hello"}
    ]
  }'

Runtime edits made in /admin do not mean Hugging Face Secrets were updated. Treat wrapper config, Secrets, and any upstream persistence layer as separate concerns.

This page intentionally avoids live status, mutable controls, and any secret-derived values. It is an entrance, not a console.

For stable persisted settings after restart, rely on upstream-supported storage and verify the behavior explicitly instead of assuming the wrapper can override startup precedence.