diff --git a/apps/portal/src/app/Header.tsx b/apps/portal/src/app/Header.tsx index d6b763c7c0d..a12cc79b3bc 100644 --- a/apps/portal/src/app/Header.tsx +++ b/apps/portal/src/app/Header.tsx @@ -124,7 +124,7 @@ export const connectLinks: Array<{ const apisLinks = [ { - href: "https://api.thirdweb.com/reference", + href: "/reference", name: "HTTP API", }, { diff --git a/apps/portal/src/app/ai/chat/page.mdx b/apps/portal/src/app/ai/chat/page.mdx index 9dacfe92cc6..45cb19cea5b 100644 --- a/apps/portal/src/app/ai/chat/page.mdx +++ b/apps/portal/src/app/ai/chat/page.mdx @@ -88,4 +88,4 @@ print(chat_completion) - [Handle streaming responses](/ai/chat/streaming) - [Transaction Execution](/ai/chat/execution) - [Use the Vercel AI SDK](/ai/chat/ai-sdk) -- [Full API Reference](https://api.thirdweb.com/reference#tag/ai/post/ai/chat) \ No newline at end of file +- [Full API Reference](/reference#tag/ai/post/ai/chat) \ No newline at end of file diff --git a/apps/portal/src/app/ai/llm-txt/page.mdx b/apps/portal/src/app/ai/llm-txt/page.mdx index 223891ee745..07f308c7480 100644 --- a/apps/portal/src/app/ai/llm-txt/page.mdx +++ b/apps/portal/src/app/ai/llm-txt/page.mdx @@ -18,7 +18,7 @@ Docs: https://api.thirdweb.com/llms.txt ## thirdweb API reference -The [thirdweb HTTP API reference](https://api.thirdweb.com/reference) as markdown. +The [thirdweb HTTP API reference](/reference) as markdown. Available at: https://api.thirdweb.com/llms.txt diff --git a/apps/portal/src/app/ai/sidebar.tsx b/apps/portal/src/app/ai/sidebar.tsx index fe2b85cc3e3..ea85b3cf180 100644 --- a/apps/portal/src/app/ai/sidebar.tsx +++ b/apps/portal/src/app/ai/sidebar.tsx @@ -31,7 +31,7 @@ export const sidebar: SideBar = { }, { name: "API Reference", - href: "https://api.thirdweb.com/reference#tag/ai/post/ai/chat", + href: "/reference#tag/ai/post/ai/chat", }, ], }, diff --git a/apps/portal/src/app/contracts/sidebar.tsx b/apps/portal/src/app/contracts/sidebar.tsx index 2f064f91834..c764a226af2 100644 --- a/apps/portal/src/app/contracts/sidebar.tsx +++ b/apps/portal/src/app/contracts/sidebar.tsx @@ -63,7 +63,7 @@ export const sidebar: SideBar = { isCollapsible: false, links: [ { - href: "https://api.thirdweb.com/reference#tag/contracts", + href: "/reference#tag/contracts", icon: , name: "HTTP API", }, diff --git a/apps/portal/src/app/nebula/api-reference/chat/EndpointMetadata.tsx b/apps/portal/src/app/nebula/api-reference/chat/EndpointMetadata.tsx index d69c52f7dc8..453de34ef07 100644 --- a/apps/portal/src/app/nebula/api-reference/chat/EndpointMetadata.tsx +++ b/apps/portal/src/app/nebula/api-reference/chat/EndpointMetadata.tsx @@ -30,7 +30,7 @@ export function EndpointMetadata() { method: "POST", origin: "https://nebula-api.thirdweb.com", path: "/chat", - referenceUrl: "https://api.thirdweb.com/reference#tag/ai/ai/chat", + referenceUrl: "/reference#tag/ai/post/ai/chat", request: { queryParameters: [], bodyParameters: [ diff --git a/apps/portal/src/app/nebula/api-reference/clear-session/EndpointMetadata.tsx b/apps/portal/src/app/nebula/api-reference/clear-session/EndpointMetadata.tsx index d1a6339905a..616629ed9b9 100644 --- a/apps/portal/src/app/nebula/api-reference/clear-session/EndpointMetadata.tsx +++ b/apps/portal/src/app/nebula/api-reference/clear-session/EndpointMetadata.tsx @@ -15,8 +15,7 @@ export function EndpointMetadata() { method: "POST", origin: "https://nebula-api.thirdweb.com", path: "/session/{session_id}/clear", - referenceUrl: - "https://api.thirdweb.com/reference#tag/ai/ai/clear-session", + referenceUrl: "/reference#tag/ai/ai/clear-session", request: { queryParameters: [], bodyParameters: [], diff --git a/apps/portal/src/app/nebula/api-reference/create-session/EndpointMetadata.tsx b/apps/portal/src/app/nebula/api-reference/create-session/EndpointMetadata.tsx index a56fc3db122..7312d7c0ceb 100644 --- a/apps/portal/src/app/nebula/api-reference/create-session/EndpointMetadata.tsx +++ b/apps/portal/src/app/nebula/api-reference/create-session/EndpointMetadata.tsx @@ -15,8 +15,7 @@ export function EndpointMetadata() { method: "POST", origin: "https://nebula-api.thirdweb.com", path: "/session", - referenceUrl: - "https://api.thirdweb.com/reference#tag/ai/ai/create-session", + referenceUrl: "/reference#tag/ai/ai/create-session", request: { queryParameters: [], bodyParameters: [ diff --git a/apps/portal/src/app/nebula/api-reference/delete-session/EndpointMetadata.tsx b/apps/portal/src/app/nebula/api-reference/delete-session/EndpointMetadata.tsx index 81e4f6784b9..d9f57e5037d 100644 --- a/apps/portal/src/app/nebula/api-reference/delete-session/EndpointMetadata.tsx +++ b/apps/portal/src/app/nebula/api-reference/delete-session/EndpointMetadata.tsx @@ -22,8 +22,7 @@ export function EndpointMetadata() { method: "DELETE", origin: "https://nebula-api.thirdweb.com", path: "/session/{session_id}", - referenceUrl: - "https://api.thirdweb.com/reference#tag/ai/ai/delete-session", + referenceUrl: "/reference#tag/ai/ai/delete-session", request: { queryParameters: [], bodyParameters: [], diff --git a/apps/portal/src/app/nebula/api-reference/execute/EndpointMetadata.tsx b/apps/portal/src/app/nebula/api-reference/execute/EndpointMetadata.tsx index 93631e5c1b5..b6a038c16f1 100644 --- a/apps/portal/src/app/nebula/api-reference/execute/EndpointMetadata.tsx +++ b/apps/portal/src/app/nebula/api-reference/execute/EndpointMetadata.tsx @@ -36,7 +36,7 @@ export function EndpointMetadata() { method: "POST", origin: "https://nebula-api.thirdweb.com", path: "/execute", - referenceUrl: "https://api.thirdweb.com/reference#tag/ai/ai/execute", + referenceUrl: "/reference#tag/ai/post/ai/chat", request: { queryParameters: [], bodyParameters: [ diff --git a/apps/portal/src/app/nebula/api-reference/get-session/EndpointMetadata.tsx b/apps/portal/src/app/nebula/api-reference/get-session/EndpointMetadata.tsx index f82ce213e0a..54ee6ccf5a5 100644 --- a/apps/portal/src/app/nebula/api-reference/get-session/EndpointMetadata.tsx +++ b/apps/portal/src/app/nebula/api-reference/get-session/EndpointMetadata.tsx @@ -15,8 +15,7 @@ export function EndpointMetadata() { method: "GET", origin: "https://nebula-api.thirdweb.com", path: "/session/{session_id}", - referenceUrl: - "https://api.thirdweb.com/reference#tag/ai/ai/get-session", + referenceUrl: "/reference#tag/ai/ai/get-session", request: { bodyParameters: [], headers: [nebulaSecretKeyHeaderParameter], diff --git a/apps/portal/src/app/nebula/api-reference/list-session/EndpointMetadata.tsx b/apps/portal/src/app/nebula/api-reference/list-session/EndpointMetadata.tsx index da97738c965..02e17211c3d 100644 --- a/apps/portal/src/app/nebula/api-reference/list-session/EndpointMetadata.tsx +++ b/apps/portal/src/app/nebula/api-reference/list-session/EndpointMetadata.tsx @@ -24,8 +24,7 @@ export function EndpointMetadata() { method: "GET", origin: "https://nebula-api.thirdweb.com", path: "/session/list", - referenceUrl: - "https://api.thirdweb.com/reference#tag/ai/ai/list-session", + referenceUrl: "/reference#tag/ai/ai/list-session", request: { bodyParameters: [], headers: [nebulaSecretKeyHeaderParameter], diff --git a/apps/portal/src/app/nebula/api-reference/update-session/EndpointMetadata.tsx b/apps/portal/src/app/nebula/api-reference/update-session/EndpointMetadata.tsx index 67e875ced33..abf5442333f 100644 --- a/apps/portal/src/app/nebula/api-reference/update-session/EndpointMetadata.tsx +++ b/apps/portal/src/app/nebula/api-reference/update-session/EndpointMetadata.tsx @@ -16,8 +16,7 @@ export function EndpointMetadata() { method: "PUT", origin: "https://nebula-api.thirdweb.com", path: "/session/{session_id}", - referenceUrl: - "https://api.thirdweb.com/reference#tag/ai/ai/update-session", + referenceUrl: "/reference#tag/ai/ai/update-session", request: { bodyParameters: [ { diff --git a/apps/portal/src/app/page.tsx b/apps/portal/src/app/page.tsx index bcea3a8dd06..b0ef1999ae8 100644 --- a/apps/portal/src/app/page.tsx +++ b/apps/portal/src/app/page.tsx @@ -137,11 +137,7 @@ function ReferenceSection() {
- + - For more details, see the full [API Reference](https://api.thirdweb.com/reference). + For more details, see the full [API Reference](/reference). diff --git a/apps/portal/src/app/transactions/page.mdx b/apps/portal/src/app/transactions/page.mdx index af589237c39..75a49c3a205 100644 --- a/apps/portal/src/app/transactions/page.mdx +++ b/apps/portal/src/app/transactions/page.mdx @@ -64,7 +64,7 @@ Send, monitor, and manage transactions. Send transactions from user or server wa ### Send raw transactions - Send a raw transaction from a [user wallet](/wallets/users) from the frontend, or [server wallet](/wallets/server) from the backend using the [thirdweb API](https://api.thirdweb.com/reference#tag/transactions/post/v1/transactions). + Send a raw transaction from a [user wallet](/wallets/users) from the frontend, or [server wallet](/wallets/server) from the backend using the [thirdweb API](/reference#tag/transactions/post/v1/transactions). - For server wallets, you can execute transactions with just your project secret key. - For user wallets in React applications that use the SDK, you can obtain the user wallet auth token (JWT) with the [`useAuthToken()`](/references/typescript/v5/useAuthToken) hook. diff --git a/apps/portal/src/app/transactions/sponsor/page.mdx b/apps/portal/src/app/transactions/sponsor/page.mdx index 647753f9ecf..f718deb7abd 100644 --- a/apps/portal/src/app/transactions/sponsor/page.mdx +++ b/apps/portal/src/app/transactions/sponsor/page.mdx @@ -55,7 +55,7 @@ Sponsor gas fees using [EIP-7702](https://eips.ethereum.org/EIPS/eip-7702), enab - EIP-7702 is the default execution mode in the [thirdweb API](https://api.thirdweb.com/reference) for your user and server wallets. + EIP-7702 is the default execution mode in the [thirdweb API](/reference) for your user and server wallets. Example sponsored contract write request: diff --git a/apps/portal/src/app/wallets/server/page.mdx b/apps/portal/src/app/wallets/server/page.mdx index c9b2438bf69..e46754f330c 100644 --- a/apps/portal/src/app/wallets/server/page.mdx +++ b/apps/portal/src/app/wallets/server/page.mdx @@ -31,7 +31,7 @@ Server wallets are wallets that are managed by your own application, like a trea ### Use an existing Server Wallet -Once created, you can use your server wallet by passing it as the `from` field of the [thirdweb API](https://api.thirdweb.com/reference#tag/transactions/post/v1/transactions). +Once created, you can use your server wallet by passing it as the `from` field of the [thirdweb API](/reference#tag/transactions/post/v1/transactions). ### Create a new Server Wallet diff --git a/apps/portal/src/app/wallets/sidebar.tsx b/apps/portal/src/app/wallets/sidebar.tsx index 65ae9bc1836..eb8ecf20938 100644 --- a/apps/portal/src/app/wallets/sidebar.tsx +++ b/apps/portal/src/app/wallets/sidebar.tsx @@ -73,7 +73,7 @@ export const sidebar: SideBar = { isCollapsible: false, links: [ { - href: "https://api.thirdweb.com/reference#tag/wallets", + href: "/reference#tag/wallets", icon: , name: "HTTP API", }, diff --git a/apps/portal/src/components/Document/APIEndpointMeta/OpenApiEndpoint.tsx b/apps/portal/src/components/Document/APIEndpointMeta/OpenApiEndpoint.tsx index 7a57f6dad94..1b6cdd5383d 100644 --- a/apps/portal/src/components/Document/APIEndpointMeta/OpenApiEndpoint.tsx +++ b/apps/portal/src/components/Document/APIEndpointMeta/OpenApiEndpoint.tsx @@ -500,12 +500,10 @@ async function OpenApiEndpointInner({ } } -const BASE_API_URL = "https://api.thirdweb.com"; - function generateReferenceUrl( tag: string, path: string, method: string, ): string { - return `${BASE_API_URL}/reference#tag/${tag.toLowerCase()}/${method.toLowerCase()}${path}`; + return `/reference#tag/${tag.toLowerCase()}/${method.toLowerCase()}${path}`; }