Skip to main content
ZeroDrift publishes the public API as an OpenAPI 3.0 document. You generate a typed client from that file; ZeroDrift does not ship a first-party SDK package. The spec lives at:
See OpenAPI specification for the operations it covers. Authenticate every call with the x-api-key header. Base URL is https://api.zerodrift.ai.

Generate with an assistant

Download the spec, attach openapi.json to your coding assistant, and ask it to write a typed client. Name the API groups you need so the generated file covers them.

Attach openapi.json and ask an assistant to generate a typed TypeScript client.

Example prompt:
Use https://docs.zerodrift.com/openapi.json as the source, not a path on api.zerodrift.ai. After generation, confirm the client sends x-api-key and calls https://api.zerodrift.ai.

TypeScript with openapi-typescript

openapi-typescript turns the spec into TypeScript types. It does not emit an HTTP client; you call fetch (or your own wrapper) and type the requests with the generated paths interface.
That command writes zerodrift.ts with paths and components. Use it like this:
Regenerate zerodrift.ts when you pick up a new spec.

Python with OpenAPI Generator

OpenAPI Generator emits a full Python client. It needs Java, or Docker.
Follow the generated README. Set the API key on the ApiKeyHeader scheme (the x-api-key header) and use host https://api.zerodrift.ai. If you do not want Java or Docker, openapi-python-client generates a typed httpx client from the same URL:
That writes a package named from the spec title (zero_drift_enforcement_api_client). Pass the API key as a header. Do not use the default Authorization: Bearer client unless you override the header name.
Install the generated package into your environment (for example pip install ./zero-drift-public-api-client) before you import it.

Other languages

The same spec URL works with any OpenAPI 3.0 generator (-g typescript-fetch, Go, and so on). After codegen, check three things:
  1. Requests go to https://api.zerodrift.ai
  2. The API key is sent as x-api-key, not Authorization
  3. You regenerate the client when the spec changes
ZeroDrift does not publish pip install zerodrift or npm i @zerodrift/sdk. Keep the generated client in your repo or private registry.
API reference pages also show basic request examples. Use the language selector in the upper right for cURL, Python, JavaScript, PHP, Go, Java, or Ruby.