devdocs-takram.html 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494
  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@300;400;500;600&family=JetBrains+Mono:wght@300;400;500&family=Noto+Serif+SC:wght@400;500;600&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: 'Inter', sans-serif;
  19. background: #F5F0EB;
  20. color: #3A3A35;
  21. }
  22. /* Navigation */
  23. nav {
  24. height: 72px;
  25. display: flex;
  26. align-items: center;
  27. justify-content: space-between;
  28. padding: 0 64px;
  29. }
  30. .nav-logo {
  31. display: flex;
  32. align-items: center;
  33. gap: 10px;
  34. }
  35. .nav-logo-mark {
  36. width: 36px;
  37. height: 36px;
  38. border-radius: 12px;
  39. background: #6B8F71;
  40. display: flex;
  41. align-items: center;
  42. justify-content: center;
  43. }
  44. .nav-logo-mark i { color: #F5F0EB; }
  45. .nav-logo-text {
  46. font-family: 'Noto Serif SC', serif;
  47. font-size: 18px;
  48. font-weight: 600;
  49. color: #2D3436;
  50. letter-spacing: -0.3px;
  51. }
  52. .nav-links {
  53. display: flex;
  54. gap: 32px;
  55. }
  56. .nav-links a {
  57. font-size: 13px;
  58. font-weight: 400;
  59. color: #999;
  60. text-decoration: none;
  61. transition: color 0.2s;
  62. letter-spacing: 0.3px;
  63. }
  64. .nav-links a:hover { color: #3A3A35; }
  65. .nav-links a.active { color: #3A3A35; font-weight: 500; }
  66. .nav-right {
  67. display: flex;
  68. align-items: center;
  69. gap: 20px;
  70. }
  71. .search-box {
  72. display: flex;
  73. align-items: center;
  74. gap: 8px;
  75. padding: 8px 16px;
  76. background: rgba(255,255,255,0.5);
  77. border-radius: 12px;
  78. border: 1px solid #E5DFCE;
  79. }
  80. .search-box span {
  81. font-size: 12px;
  82. color: #BBB;
  83. }
  84. .search-box kbd {
  85. font-family: 'Inter', sans-serif;
  86. font-size: 10px;
  87. background: #EDE8DC;
  88. border-radius: 4px;
  89. padding: 2px 6px;
  90. color: #AAA;
  91. margin-left: 24px;
  92. }
  93. /* Hero Section */
  94. .hero {
  95. display: flex;
  96. padding: 40px 64px 36px;
  97. gap: 56px;
  98. align-items: flex-start;
  99. }
  100. .hero-content {
  101. flex: 1;
  102. padding-top: 16px;
  103. }
  104. .hero-tag {
  105. display: inline-flex;
  106. align-items: center;
  107. gap: 6px;
  108. padding: 6px 14px;
  109. background: rgba(107,143,113,0.15);
  110. border-radius: 100px;
  111. font-size: 11px;
  112. font-weight: 500;
  113. color: #6B8F71;
  114. margin-bottom: 24px;
  115. letter-spacing: 0.5px;
  116. }
  117. .hero h1 {
  118. font-family: 'Noto Serif SC', serif;
  119. font-size: 44px;
  120. font-weight: 600;
  121. line-height: 1.15;
  122. letter-spacing: -1.5px;
  123. color: #2D3436;
  124. margin-bottom: 16px;
  125. }
  126. .hero p {
  127. font-size: 16px;
  128. font-weight: 300;
  129. line-height: 1.7;
  130. color: #888;
  131. max-width: 440px;
  132. margin-bottom: 32px;
  133. }
  134. .hero-buttons {
  135. display: flex;
  136. gap: 12px;
  137. }
  138. .hero-buttons a {
  139. display: inline-flex;
  140. align-items: center;
  141. gap: 8px;
  142. padding: 12px 24px;
  143. font-size: 13px;
  144. font-weight: 500;
  145. text-decoration: none;
  146. border-radius: 12px;
  147. transition: all 0.2s;
  148. }
  149. .btn-green {
  150. background: rgba(107, 143, 113, 0.12);
  151. color: #6B8F71;
  152. border: 1px solid rgba(107, 143, 113, 0.3);
  153. }
  154. .btn-green:hover { background: rgba(107, 143, 113, 0.18); }
  155. .btn-outline {
  156. background: rgba(255,255,255,0.5);
  157. color: #666;
  158. border: 1px solid #DDD8CB;
  159. }
  160. .btn-outline:hover { background: rgba(255,255,255,0.8); }
  161. /* Code + Diagram Area */
  162. .hero-visual {
  163. width: 560px;
  164. display: flex;
  165. flex-direction: column;
  166. gap: 20px;
  167. }
  168. /* Flow diagram */
  169. .flow-diagram {
  170. display: flex;
  171. align-items: center;
  172. justify-content: center;
  173. gap: 0;
  174. padding: 20px 24px;
  175. background: rgba(255,255,255,0.45);
  176. border-radius: 16px;
  177. border: 1px solid #E5DFCE;
  178. }
  179. .flow-node {
  180. display: flex;
  181. flex-direction: column;
  182. align-items: center;
  183. gap: 6px;
  184. }
  185. .flow-node-box {
  186. padding: 10px 20px;
  187. background: #FFFFFF;
  188. border-radius: 10px;
  189. border: 1px solid #E0DACE;
  190. font-size: 13px;
  191. font-weight: 500;
  192. color: #3A3A35;
  193. white-space: nowrap;
  194. box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  195. }
  196. .flow-node-box.highlight {
  197. background: #6B8F71;
  198. border-color: #6B8F71;
  199. color: #fff;
  200. }
  201. .flow-node-label {
  202. font-size: 10px;
  203. color: #BBB;
  204. letter-spacing: 0.5px;
  205. }
  206. .flow-arrow {
  207. display: flex;
  208. align-items: center;
  209. padding: 0 12px;
  210. }
  211. .flow-arrow-line {
  212. width: 40px;
  213. height: 1px;
  214. background: #CCC8BA;
  215. position: relative;
  216. }
  217. .flow-arrow-line::after {
  218. content: '';
  219. position: absolute;
  220. right: -1px;
  221. top: -3px;
  222. border: solid #CCC8BA;
  223. border-width: 0 1px 1px 0;
  224. padding: 3px;
  225. transform: rotate(-45deg);
  226. }
  227. .flow-models {
  228. display: flex;
  229. flex-direction: column;
  230. gap: 6px;
  231. }
  232. .flow-model-tag {
  233. padding: 6px 14px;
  234. background: #FFFFFF;
  235. border-radius: 8px;
  236. border: 1px solid #E0DACE;
  237. font-size: 11px;
  238. font-weight: 400;
  239. color: #888;
  240. box-shadow: 0 1px 4px rgba(0,0,0,0.02);
  241. }
  242. /* Code block */
  243. .code-card {
  244. background: #FAF5EC;
  245. border-radius: 16px;
  246. border: 1px solid #E5DFCE;
  247. overflow: hidden;
  248. }
  249. .code-card-header {
  250. display: flex;
  251. align-items: center;
  252. justify-content: space-between;
  253. padding: 12px 20px;
  254. border-bottom: 1px solid #E5DFCE;
  255. background: rgba(255,255,255,0.3);
  256. }
  257. .code-card-header .dots {
  258. display: flex;
  259. gap: 6px;
  260. }
  261. .code-card-header .dots span {
  262. width: 9px;
  263. height: 9px;
  264. border-radius: 50%;
  265. background: #DDD8CB;
  266. }
  267. .code-card-header .fname {
  268. font-family: 'JetBrains Mono', monospace;
  269. font-size: 11px;
  270. color: #BBB;
  271. }
  272. .code-card-body {
  273. padding: 20px 24px;
  274. font-family: 'JetBrains Mono', monospace;
  275. font-size: 12.5px;
  276. line-height: 1.8;
  277. color: #555;
  278. }
  279. .code-card-body .kw { color: #6B8F71; font-weight: 500; }
  280. .code-card-body .str { color: #D4A574; }
  281. .code-card-body .cmt { color: #C4C0B4; }
  282. /* Quick Links */
  283. .quick-links {
  284. display: flex;
  285. justify-content: center;
  286. gap: 20px;
  287. padding: 8px 64px 32px;
  288. }
  289. .quick-link {
  290. display: flex;
  291. align-items: center;
  292. gap: 10px;
  293. text-decoration: none;
  294. padding: 12px 22px;
  295. background: rgba(255,255,255,0.45);
  296. border: 1px solid #E5DFCE;
  297. border-radius: 12px;
  298. font-size: 13px;
  299. font-weight: 400;
  300. color: #777;
  301. transition: all 0.2s;
  302. }
  303. .quick-link:hover {
  304. background: rgba(255,255,255,0.7);
  305. color: #3A3A35;
  306. }
  307. .quick-link i { color: #6B8F71; }
  308. /* Features */
  309. .features {
  310. display: grid;
  311. grid-template-columns: repeat(3, 1fr);
  312. gap: 20px;
  313. padding: 0 64px;
  314. position: relative;
  315. }
  316. .feature-card {
  317. background: rgba(255,255,255,0.5);
  318. border: 1px solid #E5DFCE;
  319. border-radius: 16px;
  320. padding: 28px 24px;
  321. transition: all 0.2s;
  322. position: relative;
  323. }
  324. .feature-card:hover {
  325. background: rgba(255,255,255,0.75);
  326. box-shadow: 0 4px 20px rgba(0,0,0,0.03);
  327. }
  328. .feature-icon-wrap {
  329. width: 40px;
  330. height: 40px;
  331. border-radius: 12px;
  332. background: rgba(107,143,113,0.15);
  333. display: flex;
  334. align-items: center;
  335. justify-content: center;
  336. margin-bottom: 16px;
  337. }
  338. .feature-icon-wrap i { color: #6B8F71; }
  339. .feature-card h3 {
  340. font-family: 'Noto Serif SC', serif;
  341. font-size: 16px;
  342. font-weight: 500;
  343. margin-bottom: 8px;
  344. color: #2D3436;
  345. }
  346. .feature-card p {
  347. font-size: 13px;
  348. font-weight: 300;
  349. line-height: 1.65;
  350. color: #AAA;
  351. }
  352. /* Connection lines between feature cards */
  353. .features::before {
  354. content: '';
  355. position: absolute;
  356. top: 50%;
  357. left: calc(33.33% + 32px);
  358. width: calc(33.33% - 64px - 20px);
  359. height: 0;
  360. border-top: 1px dashed #D4CEBD;
  361. transform: translateX(10px);
  362. }
  363. .features::after {
  364. content: '';
  365. position: absolute;
  366. top: 50%;
  367. right: calc(33.33% + 32px);
  368. width: calc(33.33% - 64px - 20px);
  369. height: 0;
  370. border-top: 1px dashed #D4CEBD;
  371. transform: translateX(-10px);
  372. }
  373. </style>
  374. </head>
  375. <body>
  376. <!-- Navigation -->
  377. <nav>
  378. <div class="nav-logo">
  379. <div class="nav-logo-mark"><i data-lucide="zap" style="width:18px;height:18px;"></i></div>
  380. <span class="nav-logo-text">Nexus API</span>
  381. </div>
  382. <div class="nav-links">
  383. <a href="#" class="active">Docs</a>
  384. <a href="#">API</a>
  385. <a href="#">Changelog</a>
  386. <a href="#">Status</a>
  387. <a href="#">GitHub</a>
  388. </div>
  389. <div class="nav-right">
  390. <div class="search-box">
  391. <i data-lucide="search" style="width:13px;height:13px;color:#CCC;"></i>
  392. <span>Search documentation...</span>
  393. <kbd>/</kbd>
  394. </div>
  395. </div>
  396. </nav>
  397. <!-- Hero -->
  398. <section class="hero">
  399. <div class="hero-content">
  400. <div class="hero-tag"><i data-lucide="sparkles" style="width:12px;height:12px;"></i> Unified AI Gateway</div>
  401. <h1>One API,<br>every AI model</h1>
  402. <p>Access GPT, Claude, Gemini, and 20+ models through a single endpoint. Intelligent routing, unified billing, zero vendor lock-in.</p>
  403. <div class="hero-buttons">
  404. <a href="#" class="btn-green"><i data-lucide="book-open" style="width:14px;height:14px;"></i> Get Started</a>
  405. <a href="#" class="btn-outline">API Reference</a>
  406. </div>
  407. </div>
  408. <div class="hero-visual">
  409. <!-- Flow diagram -->
  410. <div class="flow-diagram">
  411. <div class="flow-node">
  412. <div class="flow-node-box">Your App</div>
  413. <span class="flow-node-label">request</span>
  414. </div>
  415. <div class="flow-arrow"><div class="flow-arrow-line"></div></div>
  416. <div class="flow-node">
  417. <div class="flow-node-box highlight">Nexus</div>
  418. <span class="flow-node-label">routes</span>
  419. </div>
  420. <div class="flow-arrow"><div class="flow-arrow-line"></div></div>
  421. <div class="flow-models">
  422. <div class="flow-model-tag">GPT-4o</div>
  423. <div class="flow-model-tag">Claude 3.5</div>
  424. <div class="flow-model-tag">Gemini Pro</div>
  425. </div>
  426. </div>
  427. <!-- Code block -->
  428. <div class="code-card">
  429. <div class="code-card-header">
  430. <div class="dots"><span></span><span></span><span></span></div>
  431. <span class="fname">quickstart.py</span>
  432. <i data-lucide="copy" style="width:13px;height:13px;color:#CCC;cursor:pointer;"></i>
  433. </div>
  434. <div class="code-card-body">
  435. <span class="kw">from</span> nexus <span class="kw">import</span> Client<br><br>
  436. client = Client(api_key=<span class="str">"your-key"</span>)<br>
  437. response = client.chat(<br>
  438. &nbsp;&nbsp;&nbsp;&nbsp;model=<span class="str">"auto"</span>,&nbsp;&nbsp;<span class="cmt"># intelligently routes</span><br>
  439. &nbsp;&nbsp;&nbsp;&nbsp;messages=[{<span class="str">"role"</span>: <span class="str">"user"</span>, <span class="str">"content"</span>: <span class="str">"Hello!"</span>}]<br>
  440. )
  441. </div>
  442. </div>
  443. </div>
  444. </section>
  445. <!-- Quick Links -->
  446. <div class="quick-links">
  447. <a href="#" class="quick-link"><i data-lucide="rocket" style="width:14px;height:14px;"></i> Getting Started</a>
  448. <a href="#" class="quick-link"><i data-lucide="file-text" style="width:14px;height:14px;"></i> API Reference</a>
  449. <a href="#" class="quick-link"><i data-lucide="layers" style="width:14px;height:14px;"></i> Models</a>
  450. <a href="#" class="quick-link"><i data-lucide="credit-card" style="width:14px;height:14px;"></i> Pricing</a>
  451. </div>
  452. <!-- Features -->
  453. <section class="features">
  454. <div class="feature-card">
  455. <div class="feature-icon-wrap"><i data-lucide="git-branch" style="width:18px;height:18px;"></i></div>
  456. <h3>Model Routing</h3>
  457. <p>Automatically select the best model for each request based on task complexity, latency, and cost constraints.</p>
  458. </div>
  459. <div class="feature-card">
  460. <div class="feature-icon-wrap"><i data-lucide="trending-down" style="width:18px;height:18px;"></i></div>
  461. <h3>Cost Optimization</h3>
  462. <p>Reduce AI spend by up to 60% with intelligent selection and automatic fallback to cost-effective alternatives.</p>
  463. </div>
  464. <div class="feature-card">
  465. <div class="feature-icon-wrap"><i data-lucide="bar-chart-3" style="width:18px;height:18px;"></i></div>
  466. <h3>Usage Analytics</h3>
  467. <p>Real-time dashboards tracking token usage, latency, model performance, and cost breakdowns per project.</p>
  468. </div>
  469. </section>
  470. <!-- Spec annotation -->
  471. <svg style="position:absolute;bottom:24px;right:64px;opacity:0.12;" width="120" height="40" viewBox="0 0 120 40" fill="none">
  472. <line x1="0" y1="20" x2="72" y2="20" stroke="#6B8F71" stroke-width="0.5"/>
  473. <circle cx="72" cy="20" r="2.5" fill="none" stroke="#6B8F71" stroke-width="0.5"/>
  474. <text x="82" y="23" font-family="Inter" font-size="8" fill="#6B8F71" letter-spacing="0.5">20+ models</text>
  475. </svg>
  476. <script>lucide.createIcons();</script>
  477. </body>
  478. </html>