Your First Snippet
This guide walks you from creating a snippet to invoking it.
Create a snippet in the admin portal
- Open
http://localhost:8092 - Sign in
- Go to Snippets
- Create a new snippet
- Choose language: Bun or Python
- Add your handler code
- Publish to
dev
Invoke from the UI
Use the built-in test panel in the snippet editor to run your snippet immediately.
Invoke from the API
Use an API key and tenant slug.
KEY=vl_xxxx
TENANT=myorg
SNIPPET=<snippet-id-or-slug>
curl -s -X POST "http://localhost:8080/v1/invoke/$TENANT/$SNIPPET" \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"name":"world"}'
Environments and versions
dev: fast iterationstaging: pre-production checksprod: stable traffic
Each publish creates an immutable version, so rollback is straightforward.
What to do next
- Read
../invoke/invocation-modes.mdfor sync/async/stream behavior - Read
../integrations/overview.mdto call third-party APIs from snippets