Skip to content

About

ZeroGPU API SDKs are the official API client libraries for ZeroGPU. Use them to call POST /v1/responses with your API key and project id.

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

27 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZeroGPU

ZeroGPU API SDKs

Official API clients for ZeroGPU.
Typed helpers for responses, chat completions, moderations, embeddings, and audio — publishable packages on npm (zerogpu-api) and PyPI (pip install zerogpu-sdk → import zerogpu).

Open ZeroGPU platform   Open ZeroGPU website   ZeroGPU documentation

GitHub stars npm version PyPI version License ZeroGPU Router

ZeroGPU API SDKs — dashboard and integration preview


ZeroGPU API SDKs are the official API client libraries for ZeroGPU. Use them to call responses, chat completions, moderations, embeddings, and audio (transcriptions and speech) with your API key.

API reference and guides: docs.zerogpu.ai (authentication, models, error codes).

Packages

Registry Package Source
npm zerogpu-api npm/ (bundles sdks/typescript)
PyPI zerogpu-sdk (import zerogpu) pypi/ (synced from sdks/python)

Quick start (local checkout)

Environment variables (same as the dashboard snippets):

  • ZEROGPU_API_KEY

Clients always use the production API base URL https://api.zerogpu.ai/v1. There is no environment variable to change it.

Smoke tests — one live POST /v1/responses per SDK (TypeScript and Python); see smoke/README.md. TypeScript example:

cd smoke/typescript
npm install
export ZEROGPU_API_KEY=…
export ZEROGPU_MODEL=…   # from your dashboard
npm run smoke

Do not commit secrets.

input shape (OpenAPI + SDKs)

The OpenAPI spec models input as either a non-empty string or a non-empty array of role / content messages, matching what production accepts.

POST /v1/responses (reminder)

  • Production base URL: https://api.zerogpu.ai/v1
  • Path: /responses
  • Headers: x-api-key, content-type: application/json

Full spec: Responses API.

Also supported: POST /v1/chat/completions (client.chat), POST /v1/moderations (client.moderations), POST /v1/embeddings (client.embeddings), and POST /v1/audio/transcriptions / POST /v1/audio/speech (client.audio). Optional metadata on POST /v1/responses carries model-specific options (e.g. PII).


For maintainers

The clients in sdks/typescript and sdks/python are maintained by hand. When the API changes, update specs/zerogpu.openapi.yaml and both clients together, then run ./scripts/sync-pypi-from-sdks.sh.

Publishing to npm and PyPI

Path Registry Package name (change if taken)
npm/ npmjs.com zerogpu-api (see npm/package.json)
pypi/ PyPI zerogpu-sdk — pip install zerogpu-sdk imports zerogpu

npm

cd npm
npm install
npm run build
npm publish --access public

PyPI — use a venv and PyPI API token:

./scripts/sync-pypi-from-sdks.sh   # copy sdks/python into pypi/src/zerogpu
cd pypi
python -m venv .venv && . .venv/bin/activate
pip install build twine
python -m build
twine upload dist/*

Repository layout

Path Description
specs/zerogpu.openapi.yaml OpenAPI reference for the API
sdks/ TypeScript and Python client source
npm/ npm package (tsup bundles sdks/typescript)
pypi/ PyPI package (src/zerogpu synced from sdks/python)
scripts/sync-pypi-from-sdks.sh Copy sdks/python into the PyPI package
smoke/ Live-request smoke tests for TypeScript and Python (see smoke/README.md)

License

Add a root LICENSE when you publish; align it with the npm and PyPI packages.

About

ZeroGPU API SDKs are the official API client libraries for ZeroGPU. Use them to call POST /v1/responses with your API key and project id.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages