{"id":50795281,"url":"https://github.com/zerogpu/zerogpu-api-sdk","last_synced_at":"2026-06-12T14:01:31.628Z","repository":{"id":357845819,"uuid":"1208513615","full_name":"zerogpu/zerogpu-api-sdk","owner":"zerogpu","description":"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.","archived":false,"fork":false,"pushed_at":"2026-05-14T13:11:46.000Z","size":9463,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-14T15:20:35.770Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.zerogpu.ai/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zerogpu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-12T11:44:04.000Z","updated_at":"2026-05-14T13:11:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zerogpu/zerogpu-api-sdk","commit_stats":null,"previous_names":["zerogpu/zerogpu-api-sdk"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/zerogpu/zerogpu-api-sdk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerogpu%2Fzerogpu-api-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerogpu%2Fzerogpu-api-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerogpu%2Fzerogpu-api-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerogpu%2Fzerogpu-api-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zerogpu","download_url":"https://codeload.github.com/zerogpu/zerogpu-api-sdk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerogpu%2Fzerogpu-api-sdk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34247461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-12T02:00:06.859Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-12T14:01:08.576Z","updated_at":"2026-06-12T14:01:31.611Z","avatar_url":"https://github.com/zerogpu.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://zerogpu.ai/assets/zerogpu-icon-dark-DB2Jfxq2.png\" alt=\"ZeroGPU\" width=\"160\"/\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eZeroGPU API SDKs\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eOfficial API clients for \u003ca href=\"https://zerogpu.ai\"\u003eZeroGPU\u003c/a\u003e.\u003c/strong\u003e\u003cbr/\u003e\n  Call \u003ccode\u003ePOST /v1/responses\u003c/code\u003e and \u003ccode\u003ePOST /v1/chat/completions\u003c/code\u003e with typed helpers — publishable packages on \u003ca href=\"https://www.npmjs.com/package/zerogpu-api\"\u003enpm\u003c/a\u003e (\u003ccode\u003ezerogpu-api\u003c/code\u003e) and \u003ca href=\"https://pypi.org/project/zerogpu-api/\"\u003ePyPI\u003c/a\u003e (\u003ccode\u003epip install zerogpu-api\u003c/code\u003e → import \u003ccode\u003ezerogpu\u003c/code\u003e).\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://platform.zerogpu.ai\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Platform-Dashboard-22c55e?style=for-the-badge\" alt=\"Open ZeroGPU platform\" /\u003e\n  \u003c/a\u003e\n  \u0026nbsp;\n  \u003ca href=\"https://www.zerogpu.ai\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Main-Website-22c55e?style=for-the-badge\" alt=\"Open ZeroGPU website\" /\u003e\n  \u003c/a\u003e\n  \u0026nbsp;\n  \u003ca href=\"https://docs.zerogpu.ai\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Docs-docs.zerogpu.ai-111827?style=for-the-badge\" alt=\"ZeroGPU documentation\" /\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/zerogpu/SDK/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/zerogpu/SDK?style=flat-square\" alt=\"GitHub stars\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/zerogpu-api\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/zerogpu-api?style=flat-square\" alt=\"npm version\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/zerogpu-api/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/zerogpu-api?style=flat-square\" alt=\"PyPI version\" /\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/badge/License-MIT-yellow?style=flat-square\" alt=\"License\" /\u003e\n  \u003ca href=\"https://github.com/zerogpu/zerogpu-router\"\u003e\u003cimg src=\"https://img.shields.io/badge/Related-Router-111827?style=flat-square\" alt=\"ZeroGPU Router\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"assets/zerogpu%20-%20sdk%20gif.gif\" alt=\"ZeroGPU API SDKs — dashboard and integration preview\" width=\"720\"/\u003e\n\u003c/p\u003e\n\n---\n\n**ZeroGPU API SDKs** are the official API client libraries for [ZeroGPU](https://zerogpu.ai). Use them to call `POST /v1/responses` with your API key and project id.\n\n**API reference and guides:** [docs.zerogpu.ai](https://docs.zerogpu.ai) (authentication, models, error codes).\n\n## Languages\n\nClients live under `sdks/`:\n\n| Directory | Language |\n|-----------|----------|\n| `sdks/typescript` | TypeScript / JavaScript |\n| `sdks/python` | Python |\n| `sdks/go` | Go |\n| `sdks/ruby` | Ruby |\n| `sdks/java` | Java |\n| `sdks/rust` | Rust |\n| `sdks/csharp` | C# / .NET |\n| `sdks/php/sdk` | PHP |\n| `sdks/swift/sdk` | Swift |\n\nWhen you publish packages to npm, PyPI, crates.io, etc., point users at those registries and [docs.zerogpu.ai](https://docs.zerogpu.ai); most developers do not need the internals of the **ZeroGPU API SDKs** repository.\n\n## Quick start (local checkout)\n\nEnvironment variables (same as the [dashboard](https://zerogpu.ai) snippets):\n\n- `ZEROGPU_API_KEY`\n- `ZEROGPU_PROJECT_ID`\n\nClients always use the production API base URL `https://api.zerogpu.ai/v1`. There is no environment variable to change it.\n\n**Smoke tests** — one live `POST /v1/responses` per generated SDK; see [`smoke/README.md`](./smoke/README.md). TypeScript example:\n\n```bash\ncd smoke/typescript\nnpm install\nexport ZEROGPU_API_KEY=…\nexport ZEROGPU_PROJECT_ID=…\nexport ZEROGPU_MODEL=…   # from your dashboard\nnpm run smoke\n```\n\nGo uses the repo [`go.work`](./go.work) so builds resolve the `sdk` module; from the **Fern SDK** directory run `go run -C smoke/go .` (after exporting the same variables).\n\nDo not commit secrets.\n\n### `input` shape (OpenAPI + SDKs)\n\nThe OpenAPI spec models `input` as **either** a non-empty **string** **or** a non-empty **array** of `role` / `content` messages, matching what production accepts. Regenerate clients with Fern after changing `specs/zerogpu.openapi.yaml`.\n\n## `POST /v1/responses` (reminder)\n\n- **Production base URL:** `https://api.zerogpu.ai/v1`\n- **Path:** `/responses`\n- **Headers:** `x-api-key`, `x-project-id`, `content-type: application/json`\n\nFull spec: [Responses API](https://docs.zerogpu.ai/api-reference/endpoint/responses).\n\n**Also supported in the generated clients:** `POST /v1/chat/completions` via `client.chat` (Python: `client.chat`) for models that use the chat-completions route. Optional **`metadata`** on `POST /v1/responses` is included in `CreateResponseRequest` for model-specific options (e.g. PII).\n\n---\n\n## For maintainers: regenerating clients\n\nSDKs are generated from `specs/zerogpu.openapi.yaml` using [Fern](https://buildwithfern.com/). To update or rebuild:\n\n1. Edit the OpenAPI file if the API changed.\n2. Run `npx fern-api check` from the `fern/` directory (or repo root with paths adjusted).\n3. Run `npx fern-api generate` (after `fern login` or with `FERN_TOKEN`). Generator groups and output paths are in `fern/generators.yml`.\n\nSee Fern’s [SDK quickstart](https://buildwithfern.com/learn/sdks/overview/quickstart) for CLI install details.\n\n### Publishing to npm and PyPI (recommended)\n\n**ZeroGPU API SDKs** ship **standalone packages** that do not rely on Fern’s paid registry flow:\n\n| Path | Registry | Package name (change if taken) |\n|------|----------|----------------------------------|\n| [`npm/`](./npm/) | [npmjs.com](https://www.npmjs.com/) | `zerogpu-api` (see `npm/package.json`) |\n| [`pypi/`](./pypi/) | [PyPI](https://pypi.org/) | `zerogpu-api` — `pip install zerogpu-api` imports **`zerogpu`** |\n\n**npm**\n\n```bash\ncd npm\nnpm install\nnpm run build\nnpm publish --access public\n```\n\n**PyPI** — use a [venv](https://docs.python.org/3/library/venv.html) and [PyPI API token](https://pypi.org/manage/account/token/):\n\n```bash\n./scripts/sync-pypi-from-sdks.sh   # after `fern generate` updates sdks/python\ncd pypi\npython -m venv .venv \u0026\u0026 . .venv/bin/activate\npip install build twine\npython -m build\ntwine upload dist/*\n```\n\nAfter regenerating Python with Fern, run **`sync-pypi-from-sdks.sh`** so `pypi/src/zerogpu` stays in sync with `sdks/python`.\n\n**Optional:** Fern can also publish directly from `generators.yml` ([npm](https://buildwithfern.com/learn/sdks/generators/typescript/publishing), [PyPI](https://buildwithfern.com/learn/sdks/generators/python/publishing)); you don’t need that if you use `npm/` and `pypi/` above.\n\n## Repository layout\n\n| Path | Description |\n|------|-------------|\n| `specs/zerogpu.openapi.yaml` | API definition used for generation |\n| `fern/` | Fern configuration |\n| `sdks/` | Generated output (do not hand-edit; regenerate) |\n| `npm/` | npm package (`tsup` bundles `sdks/typescript`) |\n| `pypi/` | PyPI package (`src/zerogpu` synced from `sdks/python`) |\n| `scripts/sync-pypi-from-sdks.sh` | Refresh Python package after Fern regen |\n| `go.work` | Go workspace linking `sdks/go` and `smoke/go` for smoke runs |\n| `smoke/` | Live-request smoke tests per SDK (see `smoke/README.md`) |\n\n## License\n\nAdd a root `LICENSE` when you publish; align it with packages you ship to npm, PyPI, etc.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzerogpu%2Fzerogpu-api-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzerogpu%2Fzerogpu-api-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzerogpu%2Fzerogpu-api-sdk/lists"}