Minimal, interactive examples for testing the Samsar APIs with real request/response flows.
- Open a terminal in this folder:
cd /Users/pritamroy/Documents/others/workspace/samsar_one/examples - Install dependencies:
npm install
- Copy the env template:
cp .env.example .env
- (Optional) Add your key in
.env:API_KEY=your_real_key_here
- Start the app:
npm run dev
- Open: http://localhost:3067
- Sign in at app.samsar.one.
- Go to your account settings.
- Open the API keys section.
- Create a new key and copy it.
- Paste it into
.envasAPI_KEY=....
If you open the app without adding a key in the toolbar, it loads in read-only sample mode so you can browse the UI.
- Use the top toolbar and pick an API route from the endpoint dropdown.
- Choose a product (if the route supports product context).
- Paste your API key in the top toolbar and click
Use keyto enable live mode. - Switch between:
Adminview (request/workflow side)Storefrontview (customer-facing simulation)
- Click the run action in the toolbar to execute the route.
- Open the JSON panel to inspect request and response.
For video and long-running routes, the page will show progress and update when the job is complete.
| Category | Route |
|---|---|
| Chat | chat-enhance |
| Chat | chat-search-against-embedding |
| Chat | chat-similar-to-embedding |
| Image | image-enhance |
| Image | image-add-image-set |
| Image | image-remove-branding |
| Video | video-text-to-video |
| Video | video-image-list-to-video |
| Video | video-translate |
| Video | video-join |
- You see a read-only toolbar notice: add your API key in the top toolbar and click
Use key. - Request fails with auth error: key is invalid or expired.
- Route takes time: some video/image routes are async and need polling time.
- Want to return to sample mode: clear the API key from the toolbar.
