Anthropic-compatible client
Securely launch an arbitrary Anthropic-compatible client with ephemeral credential environment variables.
Securely launch an arbitrary Anthropic-compatible client with ephemeral credential environment variables.
| Mode | Protocols | Secret delivery |
|---|---|---|
| Secure launch | anthropic-messages | Child process environment |
@unlimgpt/cli package.unlimgpt configure generic-anthropic to prepare the profile and key.unlimgpt launch anthropic: after --, supply its installed executable name and normal arguments. The key is never written to a shell profile.work, add --profile work before -- when launching; this uses that profile's key without changing the active profile.--profile work, add the same flag before -- in the runnable example below, using your actual profile name; otherwise it uses the active profile's key.This launch check requires Python 3 and makes one billable request through the child process environment. If gpt-5.6-sol is unavailable to your key, use an accessible model ID from the catalog; the secret does not appear in command arguments.
unlimgpt launch anthropic -- python3 - << 'PY'
import json
import os
import urllib.request
body = {"model": "gpt-5.6-sol", "max_tokens": 64, "messages": [{"role": "user", "content": "Reply with READY"}], "stream": False}
request = urllib.request.Request(
os.environ["ANTHROPIC_BASE_URL"].rstrip("/") + "/v1/messages",
data=json.dumps(body).encode("utf-8"),
headers={"x-api-key": os.environ["ANTHROPIC_API_KEY"], "anthropic-version": "2023-06-01", "Content-Type": "application/json"},
method="POST",
)
with urllib.request.urlopen(request, timeout=60) as response:
print(response.status, response.headers.get("request-id"))
print(response.read().decode("utf-8"))
PY
unlimgpt keys list, then create a new key with unlimgpt keys create --name rotated-client.| Problem | Resolution |
|---|---|
| The client uses custom variable names. | Use its documented endpoint/secret mechanism; never move the key into argv. |
If the request fails, run unlimgpt doctor --client generic-anthropic and see troubleshooting. Diagnostics do not replace a real request.