Skip to main content
The zerogpu/cookbook repo contains runnable demos: small apps you can clone, install, and run locally. Each demo lives in a dedicated folder under demos/.

Repository structure

cookbook/
├── README.md              # Overview and how to add demos
├── .gitignore             # Ignores .env, node_modules, dist
└── demos/
    ├── summarize-react/        # React summarization app
    ├── iab-classification-react/ # React IAB classification app
    ├── batch-requests-node/    # Node.js parallel batch requests
    ├── quickstart-python/      # Python one-shot request
    └── ...
Naming: Demos use descriptive folder names (e.g. 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 the zlm-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.
Run it:
git clone https://github.com/zerogpu/cookbook.git
cd cookbook/demos/summarize-react
npm install
npm run dev
See the demo README.

IAB classification (React)

Classify content into IAB categories with zlm-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.

Batch requests (Node.js)

Node.js script that sends multiple summarization requests in parallel. Set ZEROGPU_API_KEY and ZEROGPU_PROJECT_ID in the environment; run npm start or node run.js.

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-pythonpip install -r requirements.txt → set env vars → python run.py. See the demo README.

Security

  • Demos never commit .env or real API keys; the repo .gitignore excludes 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: