modelflaredev commited on
Commit
eb1e503
·
verified ·
1 Parent(s): 93e9f0c

Update start landing README.md and index.html

Browse files
Files changed (2) hide show
  1. README.md +6 -6
  2. index.html +106 -79
README.md CHANGED
@@ -6,14 +6,14 @@ colorTo: pink
6
  sdk: static
7
  pinned: true
8
  license: mit
9
- short_description: Modelflare gateway — console, docs, and SDK
10
  ---
11
 
12
  # Start with Modelflare
13
 
14
- Static landing Space that sends Hugging Face visitors to the Modelflare console and docs.
15
- OpenAI-compatible gateway for LLM, image, and video — one key, group failover, usage & cost tracking.
16
 
17
- - Console: https://modelflare.dev/
18
- - Docs: https://docs.modelflare.dev/
19
- - Org: https://huggingface.co/Modelflare
 
 
6
  sdk: static
7
  pinned: true
8
  license: mit
9
+ short_description: Modelflare gateway — console, docs, bilingual SDK
10
  ---
11
 
12
  # Start with Modelflare
13
 
14
+ Hugging Face landing for [Modelflare](https://modelflare.dev/) — OpenAI-compatible AI API gateway (LLM / image / video).
 
15
 
16
+ - Console: https://modelflare.dev/?utm_source=huggingface&utm_medium=space&utm_campaign=start
17
+ - Docs: https://docs.modelflare.dev/?utm_source=huggingface&utm_medium=space&utm_campaign=start
18
+ - SDK guide: https://huggingface.co/spaces/Modelflare/openai-sdk
19
+ - Collection: https://huggingface.co/collections/Modelflare/modelflare-getting-started
index.html CHANGED
@@ -1,94 +1,104 @@
1
  <!DOCTYPE html>
2
- <html lang="en">
3
  <head>
4
  <meta charset="UTF-8" />
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
6
  <title>Modelflare — AI API Gateway</title>
 
7
  <style>
8
  :root {
9
- --bg: #0b1020;
10
- --card: #121a2f;
11
- --text: #e8ecf7;
12
- --muted: #9aa6c2;
13
- --accent: #8b5cf6;
14
- --accent2: #ec4899;
15
- --border: rgba(255,255,255,.08);
16
  }
17
- * { box-sizing: border-box; }
18
- body {
19
- margin: 0;
20
- font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
21
- background: radial-gradient(1200px 600px at 10% -10%, #2a1850 0%, transparent 50%),
22
- radial-gradient(900px 500px at 100% 0%, #3b0f2e 0%, transparent 45%),
23
- var(--bg);
24
- color: var(--text);
25
- min-height: 100vh;
26
  }
27
- .wrap { max-width: 880px; margin: 0 auto; padding: 48px 20px 64px; }
28
- .badge {
29
- display: inline-flex; gap: 8px; align-items: center;
30
- padding: 6px 12px; border-radius: 999px;
31
- background: rgba(139,92,246,.15); border: 1px solid rgba(139,92,246,.35);
32
- color: #d6c7ff; font-size: 13px; margin-bottom: 18px;
33
- }
34
- h1 { font-size: clamp(28px, 5vw, 40px); line-height: 1.15; margin: 0 0 12px; }
35
- .lead { color: var(--muted); font-size: 18px; line-height: 1.6; margin: 0 0 28px; max-width: 640px; }
36
- .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 36px; }
37
- a.btn {
38
- display: inline-flex; align-items: center; justify-content: center;
39
- padding: 12px 18px; border-radius: 12px; text-decoration: none; font-weight: 600;
40
- border: 1px solid transparent;
41
- }
42
- a.btn.primary {
43
- background: linear-gradient(135deg, var(--accent), var(--accent2));
44
- color: white;
45
- }
46
- a.btn.ghost {
47
- background: transparent; color: var(--text); border-color: var(--border);
48
- }
49
- .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 28px; }
50
- .card {
51
- background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 18px;
52
- }
53
- .card h3 { margin: 0 0 8px; font-size: 16px; }
54
- .card p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
55
- pre {
56
- background: #070b16; border: 1px solid var(--border); border-radius: 14px;
57
- padding: 16px; overflow: auto; font-size: 13px; line-height: 1.45; color: #d7def0;
58
- }
59
- .foot { margin-top: 28px; color: var(--muted); font-size: 13px; }
60
- code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
61
  </style>
62
  </head>
63
  <body>
64
  <div class="wrap">
65
- <div class="badge">Hugging Face × Modelflare</div>
66
- <h1>Stable, lower-cost AI API gateway</h1>
67
- <p class="lead">
68
- One key for LLM, image, and video. OpenAI-compatible chat — point your SDK at
69
- <code>https://modelflare.dev/v1</code>, with group failover and per-request cost tracking.
70
- </p>
71
- <div class="cta">
72
- <a class="btn primary" href="https://modelflare.dev/?utm_source=huggingface&utm_medium=space&utm_campaign=start" target="_blank" rel="noopener">Open Console →</a>
73
- <a class="btn ghost" href="https://docs.modelflare.dev/?utm_source=huggingface&utm_medium=space&utm_campaign=start" target="_blank" rel="noopener">Read Docs</a>
74
- <a class="btn ghost" href="https://huggingface.co/Modelflare" target="_blank" rel="noopener">Org on Hub</a>
75
  </div>
76
- <div class="grid">
77
- <div class="card">
78
- <h3>One key</h3>
79
- <p>Chat, Responses, Anthropic Messages, Images, and Video on the same auth.</p>
 
 
 
 
 
 
 
 
 
 
 
80
  </div>
81
- <div class="card">
82
- <h3>Group failover</h3>
83
- <p>Ordered fallbacks so one unavailable route does not fail the request.</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
  </div>
85
- <div class="card">
86
- <h3>Usage &amp; cost</h3>
87
- <p>Track tokens, images, and video spend per request in one place.</p>
 
88
  </div>
89
- </div>
90
- <h2 style="font-size:18px;margin:0 0 10px">Quick start</h2>
91
- <pre>from openai import OpenAI
92
 
93
  client = OpenAI(
94
  api_key="YOUR_MODELFLARE_KEY",
@@ -99,11 +109,28 @@ r = client.chat.completions.create(
99
  model="grok-4.7",
100
  messages=[{"role": "user", "content": "Hello from Hugging Face"}],
101
  )
102
- print(r.choices[0].message.content)</pre>
103
- <p class="foot">Coming from Hugging Face? Grab a key in the console, then follow the <a href="https://huggingface.co/spaces/Modelflare/openai-sdk" style="color:#c4b5fd">SDK one-line guide</a>.
104
- Create a key in the console, then swap <code>base_url</code>. Guides for Codex, Claude Code, and more:
105
- <a href="https://docs.modelflare.dev/" style="color:#c4b5fd">docs.modelflare.dev</a>
106
- </p>
107
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
  </body>
109
  </html>
 
1
  <!DOCTYPE html>
2
+ <html lang="zh-CN">
3
  <head>
4
  <meta charset="UTF-8" />
5
  <meta name="viewport" content="width=device-width, initial-scale=1" />
6
  <title>Modelflare — AI API Gateway</title>
7
+ <meta name="description" content="Modelflare: OpenAI-compatible AI API gateway for LLM, image, and video. One key, group failover, cost tracking." />
8
  <style>
9
  :root {
10
+ --bg:#0b1020; --card:#121a2f; --text:#e8ecf7; --muted:#9aa6c2;
11
+ --accent:#8b5cf6; --accent2:#ec4899; --border:rgba(255,255,255,.08); --ok:#34d399;
 
 
 
 
 
12
  }
13
+ *{box-sizing:border-box}
14
+ body{
15
+ margin:0;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
16
+ background:radial-gradient(1200px 600px at 10% -10%,#2a1850 0%,transparent 50%),
17
+ radial-gradient(900px 500px at 100% 0%,#3b0f2e 0%,transparent 45%),var(--bg);
18
+ color:var(--text);min-height:100vh;line-height:1.55;
 
 
 
19
  }
20
+ .wrap{max-width:880px;margin:0 auto;padding:40px 18px 64px}
21
+ .lang{display:flex;gap:8px;margin-bottom:16px}
22
+ .lang button{background:transparent;border:1px solid var(--border);color:var(--muted);border-radius:999px;padding:6px 12px;cursor:pointer}
23
+ .lang button.on{color:#fff;border-color:rgba(139,92,246,.5);background:rgba(139,92,246,.2)}
24
+ .badge{display:inline-flex;gap:8px;align-items:center;padding:6px 12px;border-radius:999px;background:rgba(139,92,246,.15);border:1px solid rgba(139,92,246,.35);color:#d6c7ff;font-size:13px;margin-bottom:18px}
25
+ h1{font-size:clamp(28px,5vw,40px);line-height:1.15;margin:0 0 12px}
26
+ .lead{color:var(--muted);font-size:17px;margin:0 0 24px;max-width:640px}
27
+ .cta{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:28px}
28
+ a.btn{display:inline-flex;align-items:center;padding:12px 16px;border-radius:12px;text-decoration:none;font-weight:600}
29
+ a.primary{background:linear-gradient(135deg,var(--accent),var(--accent2));color:#fff}
30
+ a.ghost{border:1px solid var(--border);color:var(--text)}
31
+ .grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin-bottom:28px}
32
+ .card{background:var(--card);border:1px solid var(--border);border-radius:16px;padding:18px}
33
+ .card h3{margin:0 0 8px;font-size:16px}
34
+ .card p{margin:0;color:var(--muted);font-size:14px}
35
+ h2{font-size:18px;margin:0 0 10px}
36
+ pre{background:#070b16;border:1px solid var(--border);border-radius:14px;padding:14px 16px;overflow:auto;font-size:12.5px;color:#d7def0;position:relative}
37
+ .copy{position:absolute;top:8px;right:8px;font-size:11px;border:1px solid var(--border);background:#121a2f;color:var(--muted);border-radius:8px;padding:4px 8px;cursor:pointer}
38
+ .foot{margin-top:24px;color:var(--muted);font-size:13px}
39
+ .note{background:var(--card);border:1px solid var(--border);border-radius:14px;padding:14px 16px;color:var(--muted);font-size:14px;margin-top:16px}
40
+ .note strong{color:var(--ok)}
41
+ code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
42
+ .hidden{display:none}
43
+ a{color:#c4b5fd}
 
 
 
 
 
 
 
 
 
 
44
  </style>
45
  </head>
46
  <body>
47
  <div class="wrap">
48
+ <div class="lang">
49
+ <button type="button" class="on" data-lang="zh">中文</button>
50
+ <button type="button" data-lang="en">English</button>
 
 
 
 
 
 
 
51
  </div>
52
+
53
+ <section id="zh">
54
+ <div class="badge">Hugging Face × Modelflare</div>
55
+ <h1>稳定、更省的 AI API 网关</h1>
56
+ <p class="lead">文本 / 图片 / 视频同一把钥匙。OpenAI 兼容 —— 把 SDK 的 <code>base_url</code> 指到 <code>https://modelflare.dev/v1</code>,带分组故障转移与按请求成本记录。</p>
57
+ <div class="cta">
58
+ <a class="btn primary" href="https://modelflare.dev/?utm_source=huggingface&utm_medium=space&utm_campaign=start" target="_blank" rel="noopener">打开控制台 →</a>
59
+ <a class="btn ghost" href="https://docs.modelflare.dev/?utm_source=huggingface&utm_medium=space&utm_campaign=start" target="_blank" rel="noopener">阅读文档</a>
60
+ <a class="btn ghost" href="https://huggingface.co/spaces/Modelflare/openai-sdk" target="_blank" rel="noopener">SDK 一行接入</a>
61
+ <a class="btn ghost" href="https://huggingface.co/collections/Modelflare/modelflare-getting-started" target="_blank" rel="noopener">Getting Started 合集</a>
62
+ </div>
63
+ <div class="grid">
64
+ <div class="card"><h3>一把钥匙</h3><p>Chat、Responses、Anthropic Messages、图片与视频共用鉴权。</p></div>
65
+ <div class="card"><h3>分组故障转移</h3><p>主路由不可用时按序回退,请求不白挂。</p></div>
66
+ <div class="card"><h3>用量与成本</h3><p>按请求记录 token / 图片 / 视频花费。</p></div>
67
  </div>
68
+ <h2>快速开始</h2>
69
+ <pre><button class="copy" type="button">复制</button><code>from openai import OpenAI
70
+
71
+ client = OpenAI(
72
+ api_key="YOUR_MODELFLARE_KEY",
73
+ base_url="https://modelflare.dev/v1",
74
+ )
75
+
76
+ r = client.chat.completions.create(
77
+ model="grok-4.7",
78
+ messages=[{"role": "user", "content": "Hello from Hugging Face"}],
79
+ )
80
+ print(r.choices[0].message.content)</code></pre>
81
+ <div class="note"><strong>从 Hub 来?</strong>先领 key,再看 <a href="https://huggingface.co/spaces/Modelflare/openai-sdk">中英 SDK 教程</a>。可互动 Chat Demo 需 HF PRO 后上线;现在请用控制台 + API。</div>
82
+ <p class="foot">Coding agents(Codex / Claude Code / Gemini CLI)配置见 <a href="https://docs.modelflare.dev/?utm_source=huggingface&utm_medium=space&utm_campaign=start">docs.modelflare.dev</a> · Org:<a href="https://huggingface.co/Modelflare">huggingface.co/Modelflare</a></p>
83
+ </section>
84
+
85
+ <section id="en" class="hidden">
86
+ <div class="badge">Hugging Face × Modelflare</div>
87
+ <h1>Stable, lower-cost AI API gateway</h1>
88
+ <p class="lead">One key for LLM, image, and video. OpenAI-compatible chat — point your SDK at <code>https://modelflare.dev/v1</code>, with group failover and per-request cost tracking.</p>
89
+ <div class="cta">
90
+ <a class="btn primary" href="https://modelflare.dev/?utm_source=huggingface&utm_medium=space&utm_campaign=start" target="_blank" rel="noopener">Open Console →</a>
91
+ <a class="btn ghost" href="https://docs.modelflare.dev/?utm_source=huggingface&utm_medium=space&utm_campaign=start" target="_blank" rel="noopener">Read Docs</a>
92
+ <a class="btn ghost" href="https://huggingface.co/spaces/Modelflare/openai-sdk" target="_blank" rel="noopener">SDK one-line guide</a>
93
+ <a class="btn ghost" href="https://huggingface.co/collections/Modelflare/modelflare-getting-started" target="_blank" rel="noopener">Getting Started</a>
94
  </div>
95
+ <div class="grid">
96
+ <div class="card"><h3>One key</h3><p>Chat, Responses, Anthropic Messages, Images, and Video on the same auth.</p></div>
97
+ <div class="card"><h3>Group failover</h3><p>Ordered fallbacks so one unavailable route does not fail the request.</p></div>
98
+ <div class="card"><h3>Usage &amp; cost</h3><p>Track tokens, images, and video spend per request in one place.</p></div>
99
  </div>
100
+ <h2>Quick start</h2>
101
+ <pre><button class="copy" type="button">Copy</button><code>from openai import OpenAI
 
102
 
103
  client = OpenAI(
104
  api_key="YOUR_MODELFLARE_KEY",
 
109
  model="grok-4.7",
110
  messages=[{"role": "user", "content": "Hello from Hugging Face"}],
111
  )
112
+ print(r.choices[0].message.content)</code></pre>
113
+ <div class="note"><strong>Coming from Hub?</strong> Grab a key, then follow the <a href="https://huggingface.co/spaces/Modelflare/openai-sdk">bilingual SDK guide</a>. Interactive Chat Demo needs HF PRO; use console + API for now.</div>
114
+ <p class="foot">Coding-agent setups: <a href="https://docs.modelflare.dev/?utm_source=huggingface&utm_medium=space&utm_campaign=start">docs.modelflare.dev</a> · Org: <a href="https://huggingface.co/Modelflare">huggingface.co/Modelflare</a></p>
115
+ </section>
 
116
  </div>
117
+ <script>
118
+ const zh=document.getElementById('zh'), en=document.getElementById('en');
119
+ document.querySelectorAll('.lang button').forEach(btn=>{
120
+ btn.addEventListener('click',()=>{
121
+ document.querySelectorAll('.lang button').forEach(b=>b.classList.remove('on'));
122
+ btn.classList.add('on');
123
+ const l=btn.dataset.lang;
124
+ zh.classList.toggle('hidden',l!=='zh');
125
+ en.classList.toggle('hidden',l!=='en');
126
+ });
127
+ });
128
+ document.querySelectorAll('pre .copy').forEach(btn=>{
129
+ btn.addEventListener('click',async()=>{
130
+ const code=btn.parentElement.querySelector('code').innerText;
131
+ try{await navigator.clipboard.writeText(code);const t=btn.textContent;btn.textContent=t.includes('Copy')?'Copied':'已复制';setTimeout(()=>btn.textContent=t,1200)}catch(_){}
132
+ });
133
+ });
134
+ </script>
135
  </body>
136
  </html>