Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions docs/api-reference.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
id: api-reference
title: API Reference
sidebar_label: API Reference
slug: /api
description: Complete API reference documentation for NEAR AI Cloud
hide_title: true
hide_table_of_contents: true
---

import BrowserOnly from '@docusaurus/BrowserOnly';

<div className="api-reference-container">
<BrowserOnly>
{() => (
<iframe
src="https://cloud-api.near.ai/docs"
className="api-reference-iframe"
title="NEAR AI Cloud API Documentation"
allow="fullscreen"
/>
)}
</BrowserOnly>
</div>

9 changes: 9 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ const config = {
position: 'left',
label: 'Docs',
},
{
to: 'api',
position: 'left',
label: 'API',
},
{
href: 'https://cloud.near.ai',
label: 'Developer Dashboard',
Expand Down Expand Up @@ -113,6 +118,10 @@ const config = {
label: 'Verification',
to: 'cloud/verification',
},
{
label: 'API Reference',
to: 'api',
},
],
},
{
Expand Down
7 changes: 7 additions & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,13 @@ const sidebars = {
'cloud/verification/chat-verification',
],
},
{
type: 'doc',
id: 'api-reference',
customProps: {
icon: '/img/icons/unified-api.svg',
},
},
],
};

Expand Down
30 changes: 30 additions & 0 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -847,3 +847,33 @@ table tbody tr:hover {
::-webkit-scrollbar-thumb:hover {
background: rgba(131, 210, 250, 0.5);
}

/* API Reference page - Scalar iframe embedding */
.api-reference-container {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
width: 100%;
height: calc(100vh - 60px);
margin: 0;
padding: 0;
}

.api-reference-iframe {
width: 100%;
height: 100%;
border: none;
display: block;
}

/* Remove padding for API reference page */
[id="api-reference"] .theme-doc-markdown {
padding: 0 !important;
margin: 0 !important;
}

[id="api-reference"] .theme-doc-markdown > *:not(.api-reference-container) {
display: none;
}