devdocs-pentagram.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=1440">
  6. <title>Nexus API Documentation</title>
  7. <link rel="preconnect" href="https://fonts.googleapis.com">
  8. <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
  9. <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&family=Space+Grotesk:wght@400;500;600;700&display=swap" rel="stylesheet">
  10. <script src="https://unpkg.com/lucide@latest"></script>
  11. <style>
  12. * { margin: 0; padding: 0; box-sizing: border-box; }
  13. body {
  14. width: 1440px;
  15. height: 900px;
  16. overflow: hidden;
  17. margin: 0;
  18. font-family: 'Helvetica Neue', Arial, sans-serif;
  19. background: #FFFFFF;
  20. color: #111111;
  21. display: flex;
  22. }
  23. /* Sidebar */
  24. .sidebar {
  25. width: 260px;
  26. min-width: 260px;
  27. height: 900px;
  28. border-right: 1px solid #111;
  29. display: flex;
  30. flex-direction: column;
  31. padding: 0;
  32. overflow-y: auto;
  33. }
  34. .sidebar-logo {
  35. padding: 24px 28px;
  36. border-bottom: 1px solid #111;
  37. display: flex;
  38. align-items: center;
  39. gap: 10px;
  40. }
  41. .sidebar-logo .logo-mark {
  42. width: 28px;
  43. height: 28px;
  44. background: #E63946;
  45. display: flex;
  46. align-items: center;
  47. justify-content: center;
  48. }
  49. .sidebar-logo .logo-mark svg { color: #fff; }
  50. .sidebar-logo span {
  51. font-family: 'Helvetica Neue', Arial, sans-serif;
  52. font-weight: 700;
  53. font-size: 18px;
  54. letter-spacing: -0.5px;
  55. }
  56. .sidebar-section {
  57. padding: 20px 28px 8px;
  58. }
  59. .sidebar-section-label {
  60. font-family: 'Helvetica Neue', Arial, sans-serif;
  61. font-size: 10px;
  62. font-weight: 600;
  63. letter-spacing: 2px;
  64. text-transform: uppercase;
  65. color: #999;
  66. margin-bottom: 12px;
  67. }
  68. .sidebar-link {
  69. display: block;
  70. padding: 6px 0;
  71. font-size: 13px;
  72. font-weight: 500;
  73. color: #555;
  74. text-decoration: none;
  75. transition: color 0.15s;
  76. }
  77. .sidebar-link:hover { color: #111; }
  78. .sidebar-link.active {
  79. color: #E63946;
  80. font-weight: 600;
  81. }
  82. .sidebar-link.active::before {
  83. content: '';
  84. display: inline-block;
  85. width: 6px;
  86. height: 6px;
  87. background: #E63946;
  88. margin-right: 8px;
  89. vertical-align: middle;
  90. }
  91. .sidebar-divider {
  92. height: 1px;
  93. background: #E8E8E8;
  94. margin: 12px 28px;
  95. }
  96. /* Main content */
  97. .main {
  98. flex: 1;
  99. height: 900px;
  100. overflow-y: auto;
  101. display: flex;
  102. flex-direction: column;
  103. }
  104. /* Top nav */
  105. .topnav {
  106. height: 52px;
  107. min-height: 52px;
  108. border-bottom: 1px solid #111;
  109. display: flex;
  110. align-items: center;
  111. justify-content: space-between;
  112. padding: 0 40px;
  113. }
  114. .topnav-links {
  115. display: flex;
  116. gap: 28px;
  117. }
  118. .topnav-links a {
  119. font-size: 12px;
  120. font-weight: 600;
  121. letter-spacing: 1px;
  122. text-transform: uppercase;
  123. text-decoration: none;
  124. color: #555;
  125. transition: color 0.15s;
  126. }
  127. .topnav-links a:hover { color: #111; }
  128. .topnav-links a.active-nav { color: #E63946; }
  129. .topnav-right {
  130. display: flex;
  131. align-items: center;
  132. gap: 16px;
  133. }
  134. .topnav-right .status-dot {
  135. width: 7px;
  136. height: 7px;
  137. background: #E63946;
  138. border-radius: 50%;
  139. display: inline-block;
  140. }
  141. .topnav-right span {
  142. font-size: 11px;
  143. color: #888;
  144. font-weight: 500;
  145. }
  146. .topnav-right a {
  147. color: #555;
  148. text-decoration: none;
  149. }
  150. /* Hero */
  151. .hero {
  152. display: grid;
  153. grid-template-columns: 1fr 1fr;
  154. min-height: 400px;
  155. border-bottom: 1px solid #E8E8E8;
  156. }
  157. .hero-left {
  158. padding: 56px 48px 48px;
  159. display: flex;
  160. flex-direction: column;
  161. justify-content: center;
  162. }
  163. .hero-badge {
  164. font-family: 'Helvetica Neue', Arial, sans-serif;
  165. font-size: 10px;
  166. font-weight: 600;
  167. letter-spacing: 2.5px;
  168. text-transform: uppercase;
  169. color: #E63946;
  170. margin-bottom: 20px;
  171. }
  172. .hero-left h1 {
  173. font-family: 'Helvetica Neue', Arial, sans-serif;
  174. font-size: 52px;
  175. font-weight: 900;
  176. line-height: 1.05;
  177. letter-spacing: -2px;
  178. margin-bottom: 16px;
  179. }
  180. .hero-left p {
  181. font-size: 16px;
  182. line-height: 1.6;
  183. color: #666;
  184. max-width: 420px;
  185. margin-bottom: 32px;
  186. }
  187. .hero-links {
  188. display: flex;
  189. gap: 12px;
  190. }
  191. .hero-links a {
  192. display: inline-flex;
  193. align-items: center;
  194. gap: 6px;
  195. padding: 10px 20px;
  196. font-size: 13px;
  197. font-weight: 600;
  198. text-decoration: none;
  199. transition: all 0.15s;
  200. }
  201. .hero-links a.primary {
  202. background: #111;
  203. color: #fff;
  204. }
  205. .hero-links a.primary:hover { background: #E63946; }
  206. .hero-links a.secondary {
  207. border: 1px solid #DDD;
  208. color: #333;
  209. background: #fff;
  210. }
  211. .hero-links a.secondary:hover { border-color: #111; }
  212. /* Code block */
  213. .hero-right {
  214. padding: 40px 48px 40px 24px;
  215. display: flex;
  216. align-items: center;
  217. justify-content: center;
  218. background: #FAFAFA;
  219. border-left: 1px solid #E8E8E8;
  220. }
  221. .code-block {
  222. background: #FFFFFF;
  223. border: 1px solid #DDD;
  224. width: 100%;
  225. max-width: 480px;
  226. }
  227. .code-header {
  228. display: flex;
  229. align-items: center;
  230. justify-content: space-between;
  231. padding: 10px 16px;
  232. border-bottom: 1px solid #DDD;
  233. background: #FAFAFA;
  234. }
  235. .code-header span {
  236. font-family: 'JetBrains Mono', monospace;
  237. font-size: 11px;
  238. color: #999;
  239. font-weight: 500;
  240. }
  241. .code-dots {
  242. display: flex;
  243. gap: 6px;
  244. }
  245. .code-dots i { width: 10px; height: 10px; }
  246. .code-body {
  247. padding: 20px;
  248. font-family: 'JetBrains Mono', monospace;
  249. font-size: 13px;
  250. line-height: 1.7;
  251. color: #111;
  252. }
  253. .code-body .kw { color: #111; font-weight: 500; }
  254. .code-body .str { color: #E63946; }
  255. .code-body .cmt { color: #AAAAAA; }
  256. .code-body .fn { color: #555; }
  257. /* Quick links bar */
  258. .quick-bar {
  259. display: grid;
  260. grid-template-columns: repeat(4, 1fr);
  261. border-bottom: 1px solid #E8E8E8;
  262. }
  263. .quick-bar a {
  264. display: flex;
  265. align-items: center;
  266. gap: 10px;
  267. padding: 18px 28px;
  268. text-decoration: none;
  269. color: #333;
  270. font-size: 13px;
  271. font-weight: 600;
  272. border-right: 1px solid #E8E8E8;
  273. transition: background 0.15s;
  274. }
  275. .quick-bar a:last-child { border-right: none; }
  276. .quick-bar a:hover { background: #FAFAFA; }
  277. .quick-bar a i { color: #E63946; }
  278. /* Features */
  279. .features {
  280. display: grid;
  281. grid-template-columns: repeat(3, 1fr);
  282. flex: 1;
  283. }
  284. .feature-card {
  285. padding: 36px 32px;
  286. border-right: 1px solid #E8E8E8;
  287. display: flex;
  288. flex-direction: column;
  289. }
  290. .feature-card:last-child { border-right: none; }
  291. .feature-card .feature-label {
  292. font-family: 'Helvetica Neue', Arial, sans-serif;
  293. font-size: 10px;
  294. font-weight: 600;
  295. letter-spacing: 2px;
  296. text-transform: uppercase;
  297. color: #E63946;
  298. margin-bottom: 14px;
  299. }
  300. .feature-card h3 {
  301. font-family: 'Helvetica Neue', Arial, sans-serif;
  302. font-size: 20px;
  303. font-weight: 600;
  304. letter-spacing: -0.5px;
  305. margin-bottom: 10px;
  306. }
  307. .feature-card p {
  308. font-size: 13px;
  309. line-height: 1.65;
  310. color: #777;
  311. }
  312. .feature-icon {
  313. width: 36px;
  314. height: 36px;
  315. background: #111;
  316. display: flex;
  317. align-items: center;
  318. justify-content: center;
  319. margin-bottom: 18px;
  320. }
  321. .feature-icon i { color: #fff; }
  322. </style>
  323. </head>
  324. <body>
  325. <!-- Sidebar -->
  326. <aside class="sidebar">
  327. <div class="sidebar-logo">
  328. <div class="logo-mark"><i data-lucide="zap" style="width:16px;height:16px;"></i></div>
  329. <span>Nexus API</span>
  330. </div>
  331. <div class="sidebar-section">
  332. <div class="sidebar-section-label">Getting Started</div>
  333. <a href="#" class="sidebar-link active">Introduction</a>
  334. <a href="#" class="sidebar-link">Quick Start</a>
  335. <a href="#" class="sidebar-link">Authentication</a>
  336. <a href="#" class="sidebar-link">Installation</a>
  337. </div>
  338. <div class="sidebar-divider"></div>
  339. <div class="sidebar-section">
  340. <div class="sidebar-section-label">Core Concepts</div>
  341. <a href="#" class="sidebar-link">Model Routing</a>
  342. <a href="#" class="sidebar-link">Chat Completions</a>
  343. <a href="#" class="sidebar-link">Streaming</a>
  344. <a href="#" class="sidebar-link">Error Handling</a>
  345. </div>
  346. <div class="sidebar-divider"></div>
  347. <div class="sidebar-section">
  348. <div class="sidebar-section-label">API Reference</div>
  349. <a href="#" class="sidebar-link">POST /chat</a>
  350. <a href="#" class="sidebar-link">GET /models</a>
  351. <a href="#" class="sidebar-link">GET /usage</a>
  352. <a href="#" class="sidebar-link">Webhooks</a>
  353. </div>
  354. <div class="sidebar-divider"></div>
  355. <div class="sidebar-section">
  356. <div class="sidebar-section-label">Resources</div>
  357. <a href="#" class="sidebar-link">Models</a>
  358. <a href="#" class="sidebar-link">Pricing</a>
  359. <a href="#" class="sidebar-link">SDKs</a>
  360. <a href="#" class="sidebar-link">Changelog</a>
  361. </div>
  362. </aside>
  363. <!-- Main -->
  364. <main class="main">
  365. <!-- Top Nav -->
  366. <nav class="topnav">
  367. <div class="topnav-links">
  368. <a href="#" class="active-nav">Docs</a>
  369. <a href="#">API</a>
  370. <a href="#">Changelog</a>
  371. <a href="#">Status</a>
  372. <a href="#">GitHub</a>
  373. </div>
  374. <div class="topnav-right">
  375. <span class="status-dot"></span>
  376. <span>All systems operational</span>
  377. <a href="#"><i data-lucide="search" style="width:16px;height:16px;color:#888;"></i></a>
  378. </div>
  379. </nav>
  380. <!-- Hero -->
  381. <section class="hero">
  382. <div class="hero-left">
  383. <div class="hero-badge">Unified AI Gateway</div>
  384. <h1>One API,<br>every AI model</h1>
  385. <p>Access GPT, Claude, Gemini, and 20+ models through a single endpoint. Intelligent routing, unified billing, zero vendor lock-in.</p>
  386. <div class="hero-links">
  387. <a href="#" class="primary"><i data-lucide="arrow-right" style="width:14px;height:14px;"></i> Get Started</a>
  388. <a href="#" class="secondary">API Reference</a>
  389. </div>
  390. </div>
  391. <div class="hero-right">
  392. <div class="code-block">
  393. <div class="code-header">
  394. <div class="code-dots">
  395. <i data-lucide="circle" style="width:10px;height:10px;color:#DDD;fill:#DDD;"></i>
  396. <i data-lucide="circle" style="width:10px;height:10px;color:#DDD;fill:#DDD;"></i>
  397. <i data-lucide="circle" style="width:10px;height:10px;color:#DDD;fill:#DDD;"></i>
  398. </div>
  399. <span>quickstart.py</span>
  400. </div>
  401. <div class="code-body">
  402. <span class="kw">from</span> nexus <span class="kw">import</span> Client<br><br>
  403. client = Client(api_key=<span class="str">"your-key"</span>)<br>
  404. response = client.chat(<br>
  405. &nbsp;&nbsp;&nbsp;&nbsp;model=<span class="str">"auto"</span>,&nbsp;&nbsp;<span class="cmt"># intelligently routes</span><br>
  406. &nbsp;&nbsp;&nbsp;&nbsp;messages=[{<br>
  407. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="str">"role"</span>: <span class="str">"user"</span>,<br>
  408. &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="str">"content"</span>: <span class="str">"Hello!"</span><br>
  409. &nbsp;&nbsp;&nbsp;&nbsp;}]<br>
  410. )
  411. </div>
  412. </div>
  413. </div>
  414. </section>
  415. <!-- Quick Links -->
  416. <div class="quick-bar">
  417. <a href="#"><i data-lucide="rocket" style="width:16px;height:16px;"></i> Getting Started</a>
  418. <a href="#"><i data-lucide="file-text" style="width:16px;height:16px;"></i> API Reference</a>
  419. <a href="#"><i data-lucide="layers" style="width:16px;height:16px;"></i> Models</a>
  420. <a href="#"><i data-lucide="credit-card" style="width:16px;height:16px;"></i> Pricing</a>
  421. </div>
  422. <!-- Features -->
  423. <section class="features">
  424. <div class="feature-card">
  425. <div class="feature-icon"><i data-lucide="git-branch" style="width:18px;height:18px;"></i></div>
  426. <div class="feature-label">Feature 01</div>
  427. <h3>Model Routing</h3>
  428. <p>Automatically select the best model for each request based on task complexity, latency requirements, and cost constraints.</p>
  429. </div>
  430. <div class="feature-card">
  431. <div class="feature-icon"><i data-lucide="trending-down" style="width:18px;height:18px;"></i></div>
  432. <div class="feature-label">Feature 02</div>
  433. <h3>Cost Optimization</h3>
  434. <p>Reduce AI spend by up to 60% with intelligent model selection and automatic fallback to cost-effective alternatives.</p>
  435. </div>
  436. <div class="feature-card">
  437. <div class="feature-icon"><i data-lucide="bar-chart-3" style="width:18px;height:18px;"></i></div>
  438. <div class="feature-label">Feature 03</div>
  439. <h3>Usage Analytics</h3>
  440. <p>Real-time dashboards tracking token usage, response latency, model performance, and cost breakdowns per project.</p>
  441. </div>
  442. </section>
  443. </main>
  444. <script>lucide.createIcons();</script>
  445. </body>
  446. </html>