File size: 7,381 Bytes
313c12f
 
b05132b
 
 
313c12f
 
b05132b
313c12f
 
b05132b
 
 
 
 
 
fcd4683
b05132b
 
 
c62af56
b05132b
 
 
 
 
 
c62af56
b05132b
 
 
 
 
 
c62af56
 
 
b05132b
c62af56
b05132b
 
9187a79
 
 
 
8cc37c2
9187a79
 
174e766
 
 
 
 
 
 
fcd4683
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8cc37c2
 
 
 
 
 
 
c62af56
 
 
 
 
 
 
b05132b
 
 
 
 
 
 
fcd4683
8cc37c2
b05132b
 
 
 
 
 
c62af56
 
 
8cc37c2
c62af56
 
 
 
8cc37c2
c62af56
 
 
b05132b
 
c62af56
 
 
8cc37c2
fcd4683
8cc37c2
 
b05132b
 
 
 
 
 
fcd4683
 
c62af56
b05132b
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
---
title: README
emoji: ⚡
colorFrom: indigo
colorTo: pink
sdk: static
pinned: false
license: mit
---

<div class="grid lg:grid-cols-3 gap-x-4 gap-y-6">
  <div class="lg:col-span-3">
    <h1>Modelflare</h1>
    <p>
      Stable, lower-cost <strong>AI API gateway</strong> for LLM, image, and video models.
      One key for OpenAI-compatible Chat &amp; Responses, Anthropic Messages, plus native image and video contracts —
      with ordered model-group fallbacks, per-request usage &amp; cost tracking, Smart keys, and cache hit guarantee.
    </p>
  </div>

  <a href="https://modelflare.dev/?utm_source=huggingface&utm_medium=org&utm_campaign=card" class="block overflow-hidden group">
    <div class="w-full h-28 mb-2 rounded-lg flex items-center justify-center bg-gradient-to-br from-indigo-50 to-pink-50 border border-gray-100 px-4">
      <span class="text-lg font-semibold text-gray-800">Console &amp; Pricing</span>
    </div>
    <div class="underline">modelflare.dev</div>
  </a>

  <a href="https://docs.modelflare.dev/?utm_source=huggingface&utm_medium=org&utm_campaign=card" class="block overflow-hidden group">
    <div class="w-full h-28 mb-2 rounded-lg flex items-center justify-center bg-gradient-to-br from-indigo-50 to-pink-50 border border-gray-100 px-4">
      <span class="text-lg font-semibold text-gray-800">API Docs</span>
    </div>
    <div class="underline">docs.modelflare.dev</div>
  </a>

  <a href="https://huggingface.co/collections/Modelflare/modelflare-getting-started" class="block overflow-hidden group">
    <div class="w-full h-28 mb-2 rounded-lg flex items-center justify-center bg-gradient-to-br from-amber-50 to-orange-50 border border-gray-100 px-4">
      <span class="text-lg font-semibold text-gray-800">Getting Started</span>
    </div>
    <div class="underline">Hub collection · start here</div>
  </a>

  <a href="https://huggingface.co/spaces/Modelflare/start" class="block overflow-hidden group">
    <div class="w-full h-28 mb-2 rounded-lg flex items-center justify-center bg-gradient-to-br from-violet-50 to-fuchsia-50 border border-gray-100 px-4">
      <span class="text-lg font-semibold text-gray-800">Start here → Console</span>
    </div>
    <div class="underline">Hub landing</div>
  </a>

  <a href="https://huggingface.co/spaces/Modelflare/openai-sdk" class="block overflow-hidden group">
    <div class="w-full h-28 mb-2 rounded-lg flex items-center justify-center bg-gradient-to-br from-blue-50 to-purple-50 border border-gray-100 px-4">
      <span class="text-lg font-semibold text-gray-800">OpenAI SDK guide</span>
    </div>
    <div class="underline">One-line base_url switch</div>
  </a>

  <a href="https://huggingface.co/spaces/Modelflare/coding-agents" class="block overflow-hidden group">
    <div class="w-full h-28 mb-2 rounded-lg flex items-center justify-center bg-gradient-to-br from-indigo-50 to-pink-50 border border-gray-100 px-4">
      <span class="text-lg font-semibold text-gray-800">Coding Agents</span>
    </div>
    <div class="underline">Codex · Claude Code · Gemini CLI</div>
  </a>

  <a href="https://huggingface.co/spaces/Modelflare/api-recipes" class="block overflow-hidden group">
    <div class="w-full h-28 mb-2 rounded-lg flex items-center justify-center bg-gradient-to-br from-rose-50 to-orange-50 border border-gray-100 px-4">
      <span class="text-lg font-semibold text-gray-800">API Recipes</span>
    </div>
    <div class="underline">curl · Python · endpoint picker</div>
  </a>

  <a href="https://huggingface.co/datasets/Modelflare/api-examples" class="block overflow-hidden group">
    <div class="w-full h-28 mb-2 rounded-lg flex items-center justify-center bg-gradient-to-br from-emerald-50 to-teal-50 border border-gray-100 px-4">
      <span class="text-lg font-semibold text-gray-800">API Examples Dataset</span>
    </div>
    <div class="underline">JSONL request sketches</div>
  </a>

  <a href="https://huggingface.co/spaces/Modelflare/blog" class="block overflow-hidden group">
    <div class="w-full h-28 mb-2 rounded-lg flex items-center justify-center bg-gradient-to-br from-sky-50 to-indigo-50 border border-gray-100 px-4">
      <span class="text-lg font-semibold text-gray-800">Blog</span>
    </div>
    <div class="underline">Setup guides and engineering notes</div>
  </a>

  <a href="https://docs.modelflare.dev/guides/features/?utm_source=huggingface&utm_medium=org&utm_campaign=card" class="block overflow-hidden group">
    <div class="w-full h-28 mb-2 rounded-lg flex items-center justify-center bg-gradient-to-br from-indigo-50 to-pink-50 border border-gray-100 px-4">
      <span class="text-lg font-semibold text-gray-800">Platform Features</span>
    </div>
    <div class="underline">Failover · Smart keys · Cache guarantee</div>
  </a>

  <div class="lg:col-span-3">
    <h2>What you get</h2>
    <ul>
      <li><strong>One key</strong> for text, image, and video models</li>
      <li><strong>OpenAI-compatible</strong> chat — point your SDK at <code>https://modelflare.dev/v1</code></li>
      <li><strong>Group failover</strong> so one unavailable route does not fail the request</li>
      <li><strong>Per-request</strong> token, image, and video cost records</li>
      <li><strong>Smart keys</strong> and <strong>cache hit guarantee</strong></li>
      <li>Guides for <strong>Codex, Claude Code, Gemini CLI</strong>: see the Coding Agents Space and the <a href="https://huggingface.co/spaces/Modelflare/blog">Blog</a></li>
    </ul>
  </div>

  <div class="lg:col-span-3">
    <h2>Quick start</h2>
    <div class="p-4 bg-gradient-to-b from-gray-50 to-white border border-gray-100 rounded-lg relative mb-2">
      <pre class="break-words whitespace-pre-line text-xs md:text-sm text-gray-800">from openai import OpenAI

client = OpenAI(
    api_key="YOUR_MODELFLARE_API_KEY",
    base_url="https://modelflare.dev/v1",
)

r = client.chat.completions.create(
    model="gpt-5.6-sol",  # must be enabled on your group
    messages=[{"role":"user","content":"Hello from Hugging Face"}],
)
print(r.choices[0].message.content)</pre>
    </div>
    <p>
      Create a key in the <a href="https://modelflare.dev/?utm_source=huggingface&utm_medium=org&utm_campaign=card" class="underline">console</a>,
      then switch <code>base_url</code> to <code>https://modelflare.dev/v1</code>.
      Full guides: <a href="https://docs.modelflare.dev/?utm_source=huggingface&utm_medium=org&utm_campaign=card" class="underline">docs.modelflare.dev</a>
      · SDK walkthrough: <a href="https://huggingface.co/spaces/Modelflare/openai-sdk" class="underline">openai-sdk</a>
      · recipes: <a href="https://huggingface.co/spaces/Modelflare/api-recipes" class="underline">api-recipes</a>
      · agents: <a href="https://huggingface.co/spaces/Modelflare/coding-agents" class="underline">coding-agents</a>
      · blog: <a href="https://huggingface.co/spaces/Modelflare/blog" class="underline">Modelflare/blog</a>.
    </p>
  </div>

  <div class="lg:col-span-3">
    <p>
      This Hub organization hosts Modelflare demos, examples, and community Spaces.
      Feedback welcome in the
      <a href="https://huggingface.co/spaces/Modelflare/start/discussions/1" class="underline">start Space discussion #1</a>.
      Interactive Gradio Chat Demo ships after HF PRO; until then use the console + API path above.
    </p>
  </div>
</div>