Point docs clients + samples at canonical api.hanzo.ai front door (#20)

The cloud API now sits behind one front door (ingress -> gateway -> cloud).
api.cloud.hanzo.ai / cloud-api.hanzo.ai / functions.hanzo.ai are redundant
aliases routing to the same backend, so migrate clients to api.hanzo.ai.

- docs + bot-docs lib/hanzo/client.ts, scripts/update-hanzo-index.ts:
  search/index/chat-docs default base cloud-api|api.cloud.hanzo.ai ->
  api.hanzo.ai (RAG paths stay /api/* — served there per cloud AUTH_PUBLIC_PATHS)
- cloud landing page.tsx: curl base + request-flow label api.cloud.hanzo.ai ->
  api.hanzo.ai
- functions.mdx (x2): collapse Endpoint+Gateway to one canonical
  api.hanzo.ai/v1/functions/*
- hanzo-openapi.mdx: Cloud endpoint label api.cloud.hanzo.ai -> api.hanzo.ai

Non-breaking: the aliases still resolve to the same backend.
This commit is contained in:
2026-06-30 16:49:04 -07:00
committed by GitHub
parent 71b2c95f5b
commit c35c188b83
7 changed files with 13 additions and 15 deletions
+3 -3
View File
@@ -1,14 +1,14 @@
export const searchEndpoint =
process.env.NEXT_PUBLIC_HANZO_SEARCH_ENDPOINT ??
'https://cloud-api.hanzo.ai/api/search-docs?store=bot-docs';
'https://api.hanzo.ai/api/search-docs?store=bot-docs';
export const indexEndpoint =
process.env.HANZO_SEARCH_INDEX_ENDPOINT ??
'https://cloud-api.hanzo.ai/api/index-docs?store=bot-docs';
'https://api.hanzo.ai/api/index-docs?store=bot-docs';
export const chatEndpoint =
process.env.NEXT_PUBLIC_HANZO_CHAT_ENDPOINT ??
'https://cloud-api.hanzo.ai/api/chat-docs?store=bot-docs';
'https://api.hanzo.ai/api/chat-docs?store=bot-docs';
export const publishableKey =
process.env.NEXT_PUBLIC_HANZO_SEARCH_KEY ?? 'pk-hanzo-docs-search-2026';
+3 -3
View File
@@ -165,13 +165,13 @@ export default function Page() {
<div className="size-3 rounded-full bg-green-500/80" />
</div>
<span className="ml-2 text-xs text-text-dim font-mono">
api.cloud.hanzo.ai
api.hanzo.ai
</span>
</div>
<pre className="overflow-x-auto p-6 text-sm font-mono leading-relaxed">
<code className="text-text-muted">
<span className="text-brand">curl</span>
{' https://api.cloud.hanzo.ai/v1/chat/completions \\\n'}
{' https://api.hanzo.ai/v1/chat/completions \\\n'}
{' -H '}
<span className="text-green-400">
{'"Authorization: Bearer sk-hanzo-..."'}
@@ -266,7 +266,7 @@ export default function Page() {
{[
{
icon: GlobeIcon,
path: 'api.cloud.hanzo.ai',
path: 'api.hanzo.ai',
desc: 'Cloudflare Edge + TLS',
},
{
+1 -2
View File
@@ -15,7 +15,6 @@ Serverless compute platform for deploying event-driven functions. Any language,
- **Secure by Default** -- IAM-scoped execution identity, KMS secrets injection, zero-trust networking
- **Observability** -- Automatic OTEL tracing, Prometheus metrics, and structured log collection
**Endpoint:** `functions.hanzo.ai`
**Gateway:** `api.hanzo.ai/v1/functions/*`
**Endpoint:** `api.hanzo.ai/v1/functions/*`
[Full documentation](/docs/services/functions)
@@ -7,8 +7,7 @@ description: Serverless compute platform for event-driven functions with auto-sc
Hanzo Functions is a serverless compute platform for deploying event-driven functions. Write in any language, deploy as an OCI container, and let the platform handle scaling, secrets, networking, and observability. Functions integrate natively with PubSub (event triggers), Tasks (activity execution), KMS (secrets injection), and IAM (scoped execution identity).
**Endpoint:** `functions.hanzo.ai`
**Gateway:** `api.hanzo.ai/v1/functions/*`
**Endpoint:** `api.hanzo.ai/v1/functions/*`
**Console:** `console.hanzo.ai` > Functions
**Source:** [github.com/hanzoai/functions](https://github.com/hanzoai/functions)
@@ -58,7 +58,7 @@ Repo: `hanzoai/openapi` (1.8MB, 3 stars).
### AI and Intelligence
| Service | Spec | Endpoint |
|---------|------|----------|
| Cloud | `cloud/openapi.yaml` (116KB) | `api.cloud.hanzo.ai` |
| Cloud | `cloud/openapi.yaml` (116KB) | `api.hanzo.ai` |
| Chat | `chat/openapi.yaml` | `hanzo.chat` |
| Search | `search/openapi.yaml` | `search.hanzo.ai` |
| Bot | `bot/openapi.yaml` | `app.hanzo.bot` |
+3 -3
View File
@@ -6,18 +6,18 @@ export const searchEndpoint =
process.env.NEXT_PUBLIC_HANZO_SEARCH_ENDPOINT ??
(searchBackend === 'meilisearch'
? 'https://search.hanzo.ai'
: 'https://cloud-api.hanzo.ai/api/search-docs');
: 'https://api.hanzo.ai/api/search-docs');
export const searchIndex =
process.env.NEXT_PUBLIC_HANZO_SEARCH_INDEX ?? 'app-docs-hanzo-ai-docs';
export const indexEndpoint =
process.env.HANZO_SEARCH_INDEX_ENDPOINT ??
'https://cloud-api.hanzo.ai/api/index-docs';
'https://api.hanzo.ai/api/index-docs';
export const chatEndpoint =
process.env.NEXT_PUBLIC_HANZO_CHAT_ENDPOINT ??
'https://cloud-api.hanzo.ai/api/chat-docs';
'https://api.hanzo.ai/api/chat-docs';
export const publishableKey =
process.env.NEXT_PUBLIC_HANZO_SEARCH_KEY ??
+1 -1
View File
@@ -18,7 +18,7 @@ export async function updateSearchIndexes(): Promise<void> {
const defaultEndpoint =
backend === 'meilisearch'
? 'https://search.hanzo.ai'
: 'https://api.cloud.hanzo.ai/api/index-docs';
: 'https://api.hanzo.ai/api/index-docs';
await sync({
endpoint: process.env.HANZO_SEARCH_INDEX_ENDPOINT ?? defaultEndpoint,