The mirror page lists Hugging Face's trending models without anything typed, with views for what is new this month and what is most downloaded, filters for task and size, and each repository's parameter count, architecture, context length and age from one registry call. "Only what these nodes can run" is on by default and leaves out architectures the nodes' llama.cpp cannot load, and adapters, saying how many it hid. Listings are remembered for ten minutes. The stylesheet is now linked by a hash of its content. It is cached for a day, so under a fixed name a deploy's new styles reached people a day after its markup. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
49 lines
1.8 KiB
HTML
49 lines
1.8 KiB
HTML
{{define "claim"}}<!doctype html>
|
|
<html lang="en"><head>
|
|
<meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
|
|
<meta name="robots" content="noindex, nofollow">
|
|
<title>Your llmgw key</title><link rel="stylesheet" href="{{stylesheet}}">
|
|
</head><body><div class="wrap">
|
|
<header>
|
|
<h1>Your API key</h1>
|
|
<p class="sub">llmgw · {{.BaseURL}}</p>
|
|
</header>
|
|
|
|
{{if .Secret}}
|
|
<p>This is shown once. Nothing can produce it again — only its hash was kept.</p>
|
|
<pre>{{.Secret}}</pre>
|
|
<p>Store it in a password manager now, then close this page.</p>
|
|
|
|
<h2>Using it</h2>
|
|
<pre>export LLMGW_API_KEY={{.Secret}}
|
|
|
|
curl {{.BaseURL}}/v1/chat/completions \
|
|
-H "Authorization: Bearer $LLMGW_API_KEY" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"model": "<model-name>", "messages": [{"role":"user","content":"hello"}]}'</pre>
|
|
<p class="note">
|
|
Replace <model-name> with a name from
|
|
<code>GET {{.BaseURL}}/v1/models</code>, which needs your key. Sending the
|
|
placeholder unchanged is answered with the list of models that are available.
|
|
</p>
|
|
<pre>from openai import OpenAI
|
|
client = OpenAI(base_url="{{.BaseURL}}/v1", api_key=os.environ["LLMGW_API_KEY"])</pre>
|
|
<p class="note"><code>GET {{.BaseURL}}/v1/models</code> lists what this key may use.
|
|
<code>GET {{.BaseURL}}/me</code> shows its limits and what it has spent.</p>
|
|
|
|
{{else if .Gone}}
|
|
<p>{{.Message}}</p>
|
|
<p class="note">A link works once and then expires. Ask whoever sent it for a new one.</p>
|
|
|
|
{{else}}
|
|
<p>A key was issued for you. Revealing it uses up this link, and the key is
|
|
shown only this once.</p>
|
|
<form method="post">
|
|
<button type="submit">Reveal my key</button>
|
|
</form>
|
|
<p class="note">Expires {{.ExpiresAt}}.</p>
|
|
{{end}}
|
|
|
|
<footer><span>llmgw {{.Version}}</span><span>{{.Now}}</span></footer>
|
|
</div></body></html>{{end}}
|