demos/.
Repository structure
summarize-react, batch-requests-node). See the repo README for the full layout and how to add a new demo.
Available demos
Summarize (React)
A minimal React app that summarizes text with the ZeroGPU API using thezlm-v1-summary-cloud model.
- Stack: React, Vite, TypeScript
- Repo path: demos/summarize-react
- Features: Enter API key and project ID in the UI (stored in the browser only); paste or type text and click Summarize to see the result and token usage.
IAB classification (React)
Classify content into IAB categories withzlm-v1-iab-classify-cloud. Same credential-in-UI pattern; paste content and click Classify. The app parses the JSON response and shows Audience, Content (IAB 1.0 / 2.2), Topics, Keywords, and User intent with a Copy result button. Works best with a paragraph or more of content.
- Repo path: demos/iab-classification-react
- Run it:
cd cookbook/demos/iab-classification-react→npm install→npm run dev. See the demo README.
Batch requests (Node.js)
Node.js script that sends multiple summarization requests in parallel. SetZEROGPU_API_KEY and ZEROGPU_PROJECT_ID in the environment; run npm start or node run.js.
- Repo path: demos/batch-requests-node
- Run it:
cd cookbook/demos/batch-requests-node→ set env vars →npm start. See the demo README.
Quickstart (Python)
Minimal Python script: one request to the API, print response and token usage. Env vars for credentials.- Repo path: demos/quickstart-python
- Run it:
cd cookbook/demos/quickstart-python→pip install -r requirements.txt→ set env vars →python run.py. See the demo README.
Security
- Demos never commit
.envor real API keys; the repo.gitignoreexcludes them. - Credentials entered in the browser (e.g. in the React demo) are for local try-it use only. For production, call the ZeroGPU API from a backend so your API key is not exposed in client code.
More recipes
For copy-paste code snippets (cURL, Python, etc.) rather than full apps, see the other cookbook pages:- Summarize text — request/response for summarization
- IAB content classification — classify content into IAB categories
- Batch requests — parallel requests and error handling

