Choose SDK or HTTP API

Choose the SDK when your application can import TypeScript packages. Choose the HTTP API when the calculation should run on the server or the caller cannot import TypeScript packages. The SDK's root, AU and schema entrypoints also support browser callers; those calculations run on the caller's device.

Choose by environment

EnvironmentChooseWhy
Server-side TypeScript applicationPlain SDKYou get typed calculator inputs and reports without HTTP transport.
TypeScript application that wants typed failuresSafe SDKYou get TaxKit.safe.calculate result values.
Effect applicationEffect SDKYou can compose calculateRunRequest, calculateReportRequest and calculateReport with services and layers.
Browser applicationHTTP API or SDKHTTP sends the request to the server; the browser-safe SDK calculates on the device.
Non-TypeScript backendHTTP APIYou can use JSON and generated OpenAPI reference.
Generated endpoint contractHTTP APIOpenAPI owns endpoint shape and status codes.

On the device

On a server

Where will the caller run?

Server-side TypeScript

Effect application

Browser

Another language

Where should the browser calculation run?

Use the plain SDK

Use the Effect SDK

Use the HTTP API

The HTTP API calls the calculator service directly. The SDK calls the same service in-process. Keep tax logic in the shared calculator and rule packages.

Next steps

  • Use Plain SDK for most server-side TypeScript apps.
  • Use Effect SDK for in-process Effect composition.
  • Use the API section when you need HTTP endpoint details.