mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
feat(docs): provide instant developer guest API key curl snippet
Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
@@ -60,12 +60,12 @@ const PATHS = [
|
||||
id: 'api',
|
||||
eyebrow: 'Lower level',
|
||||
title: 'Build with API',
|
||||
body: 'Over 400 models behind one REST endpoint. One bearer token works across every service we run.',
|
||||
body: 'Over 400 models behind one REST endpoint. Test instantly with a guest temporary key — no signup required.',
|
||||
href: '/docs/openapi',
|
||||
external: false,
|
||||
cta: 'Read the API reference',
|
||||
lang: 'Request',
|
||||
code: 'curl https://api.hanzo.ai/v1/chat/completions \\\n -H "Authorization: Bearer sk-..." \\\n -d \'{"model":"enso","messages":[...]}\'',
|
||||
code: 'curl https://api.hanzo.ai/v1/chat/completions \\\n -H "Authorization: Bearer guest_temp_key" \\\n -d \'{"model": "zen-free", "messages": [{"role": "user", "content": "hello"}]}\'',
|
||||
},
|
||||
] as const;
|
||||
|
||||
|
||||
@@ -45,6 +45,16 @@ not hand you a secret key because you asked for something it did not recognize
|
||||
handing an `sk-` to someone who wanted a browser key is exactly the accident the
|
||||
refusal exists to prevent.
|
||||
|
||||
### Guest temporary key (Instant testing)
|
||||
|
||||
For quick local evaluation and testing without creating an account, developers can use the guest temporary key with `zen-free`:
|
||||
|
||||
```bash
|
||||
curl https://api.hanzo.ai/v1/chat/completions \
|
||||
-H "Authorization: Bearer guest_temp_key" \
|
||||
-d '{"model": "zen-free", "messages": [{"role": "user", "content": "hello"}]}'
|
||||
```
|
||||
|
||||
## Creating keys
|
||||
|
||||
### In the console
|
||||
|
||||
@@ -7,6 +7,16 @@ description: Build anything with Hanzo. Every model, every tool, one key — in
|
||||
|
||||
<DocsHero />
|
||||
|
||||
## Instant Guest API Key
|
||||
|
||||
Test the API immediately in your terminal without creating an account:
|
||||
|
||||
```bash
|
||||
curl https://api.hanzo.ai/v1/chat/completions \
|
||||
-H "Authorization: Bearer guest_temp_key" \
|
||||
-d '{"model": "zen-free", "messages": [{"role": "user", "content": "hello"}]}'
|
||||
```
|
||||
|
||||
## Every model, one key
|
||||
|
||||
<ProviderStrip />
|
||||
|
||||
@@ -13,6 +13,16 @@ SDKs and the MCP tools are all generated from the same description of it. So
|
||||
there is nothing to wire up per service: get a key once and everything is
|
||||
reachable.
|
||||
|
||||
### Instant Guest API Key
|
||||
|
||||
Want to test immediately without installing anything or signing up? Use the guest temporary key directly in your terminal:
|
||||
|
||||
```bash
|
||||
curl https://api.hanzo.ai/v1/chat/completions \
|
||||
-H "Authorization: Bearer guest_temp_key" \
|
||||
-d '{"model": "zen-free", "messages": [{"role": "user", "content": "hello"}]}'
|
||||
```
|
||||
|
||||
## 1. Install
|
||||
|
||||
<Tabs items={['npm', 'Script', 'Homebrew', 'From source']}>
|
||||
|
||||
Reference in New Issue
Block a user