

# Choose SDK or HTTP API [#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 [#choose-by-environment]

| Environment                                      | Choose          | Why                                                                                                             |
| ------------------------------------------------ | --------------- | --------------------------------------------------------------------------------------------------------------- |
| Server-side TypeScript application               | Plain SDK       | You get typed calculator inputs and reports without HTTP transport.                                             |
| TypeScript application that wants typed failures | Safe SDK        | You get `TaxKit.safe.calculate` result values.                                                                  |
| Effect application                               | Effect SDK      | You can compose `calculateRunRequest`, `calculateReportRequest` and `calculateReport` with services and layers. |
| Browser application                              | HTTP API or SDK | HTTP sends the request to the server; the browser-safe SDK calculates on the device.                            |
| Non-TypeScript backend                           | HTTP API        | You can use JSON and generated OpenAPI reference.                                                               |
| Generated endpoint contract                      | HTTP API        | OpenAPI owns endpoint shape and status codes.                                                                   |

## Recommended paths [#recommended-paths]

<svg id="mermaid-0" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="flowchart" style="max-width: 1031.421875px;" viewBox="0 0 1031.421875 430" role="graphics-document document" aria-roledescription="flowchart-v2"><style>#mermaid-0{font-family:arial,sans-serif;font-size:16px;fill:#000000;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-0 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-0 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-0 .error-icon{fill:#552222;}#mermaid-0 .error-text{fill:#552222;stroke:#552222;}#mermaid-0 .edge-thickness-normal{stroke-width:1px;}#mermaid-0 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-0 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-0 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-0 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-0 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-0 .marker{fill:#666;stroke:#666;}#mermaid-0 .marker.cross{stroke:#666;}#mermaid-0 svg{font-family:arial,sans-serif;font-size:16px;}#mermaid-0 p{margin:0;}#mermaid-0 .label{font-family:arial,sans-serif;color:#000000;}#mermaid-0 .cluster-label text{fill:#333;}#mermaid-0 .cluster-label span{color:#333;}#mermaid-0 .cluster-label span p{background-color:transparent;}#mermaid-0 .label text,#mermaid-0 span{fill:#000000;color:#000000;}#mermaid-0 .node rect,#mermaid-0 .node circle,#mermaid-0 .node ellipse,#mermaid-0 .node polygon,#mermaid-0 .node path{fill:#eee;stroke:#999;stroke-width:1px;}#mermaid-0 .rough-node .label text,#mermaid-0 .node .label text,#mermaid-0 .image-shape .label,#mermaid-0 .icon-shape .label{text-anchor:middle;}#mermaid-0 .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-0 .rough-node .label,#mermaid-0 .node .label,#mermaid-0 .image-shape .label,#mermaid-0 .icon-shape .label{text-align:center;}#mermaid-0 .node.clickable{cursor:pointer;}#mermaid-0 .root .anchor path{fill:#666!important;stroke-width:0;stroke:#666;}#mermaid-0 .arrowheadPath{fill:#333333;}#mermaid-0 .edgePath .path{stroke:#666;stroke-width:1px;}#mermaid-0 .flowchart-link{stroke:#666;fill:none;}#mermaid-0 .edgeLabel{background-color:white;text-align:center;}#mermaid-0 .edgeLabel p{background-color:white;}#mermaid-0 .edgeLabel rect{opacity:0.5;background-color:white;fill:white;}#mermaid-0 .labelBkg{background-color:rgba(255, 255, 255, 0.5);}#mermaid-0 .cluster rect{fill:hsl(0, 0%, 98.9215686275%);stroke:#707070;stroke-width:1px;}#mermaid-0 .cluster text{fill:#333;}#mermaid-0 .cluster span{color:#333;}#mermaid-0 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:arial,sans-serif;font-size:12px;background:hsl(-160, 0%, 93.3333333333%);border:1px solid #707070;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-0 .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#000000;}#mermaid-0 rect.text{fill:none;stroke-width:0;}#mermaid-0 .icon-shape,#mermaid-0 .image-shape{background-color:white;text-align:center;}#mermaid-0 .icon-shape p,#mermaid-0 .image-shape p{background-color:white;padding:2px;}#mermaid-0 .icon-shape .label rect,#mermaid-0 .image-shape .label rect{opacity:0.5;background-color:white;fill:white;}#mermaid-0 .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-0 .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-0 .node .neo-node{stroke:#999;}#mermaid-0 [data-look="neo"].node rect,#mermaid-0 [data-look="neo"].cluster rect,#mermaid-0 [data-look="neo"].node polygon{stroke:url(#mermaid-0-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#mermaid-0 [data-look="neo"].node path{stroke:url(#mermaid-0-gradient);stroke-width:1px;}#mermaid-0 [data-look="neo"].node .outer-path{filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#mermaid-0 [data-look="neo"].node .neo-line path{stroke:#999;filter:none;}#mermaid-0 [data-look="neo"].node circle{stroke:url(#mermaid-0-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#mermaid-0 [data-look="neo"].node circle .state-start{fill:#000000;}#mermaid-0 [data-look="neo"].icon-shape .icon{fill:url(#mermaid-0-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#mermaid-0 [data-look="neo"].icon-shape .icon-neo path{stroke:url(#mermaid-0-gradient);filter:drop-shadow( 1px 2px 2px rgba(185,185,185,1));}#mermaid-0 :root{--mermaid-font-family:arial,sans-serif;}</style><g><marker id="mermaid-0_flowchart-v2-pointEnd" class="marker flowchart-v2" viewBox="0 0 10 10" refX="5" refY="5" markerUnits="userSpaceOnUse" markerWidth="8" markerHeight="8" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="mermaid-0_flowchart-v2-pointStart" class="marker flowchart-v2" viewBox="0 0 10 10" refX="4.5" refY="5" markerUnits="userSpaceOnUse" markerWidth="8" markerHeight="8" orient="auto"><path d="M 0 5 L 10 10 L 10 0 z" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="mermaid-0_flowchart-v2-pointEnd-margin" class="marker flowchart-v2" viewBox="0 0 11.5 14" refX="11.5" refY="7" markerUnits="userSpaceOnUse" markerWidth="10.5" markerHeight="14" orient="auto"><path d="M 0 0 L 11.5 7 L 0 14 z" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"/></marker><marker id="mermaid-0_flowchart-v2-pointStart-margin" class="marker flowchart-v2" viewBox="0 0 11.5 14" refX="1" refY="7" markerUnits="userSpaceOnUse" markerWidth="11.5" markerHeight="14" orient="auto"><polygon points="0,7 11.5,14 11.5,0" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"/></marker><marker id="mermaid-0_flowchart-v2-circleEnd" class="marker flowchart-v2" viewBox="0 0 10 10" refX="11" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="mermaid-0_flowchart-v2-circleStart" class="marker flowchart-v2" viewBox="0 0 10 10" refX="-1" refY="5" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 1; stroke-dasharray: 1, 0;"/></marker><marker id="mermaid-0_flowchart-v2-circleEnd-margin" class="marker flowchart-v2" viewBox="0 0 10 10" refY="5" refX="12.25" markerUnits="userSpaceOnUse" markerWidth="14" markerHeight="14" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"/></marker><marker id="mermaid-0_flowchart-v2-circleStart-margin" class="marker flowchart-v2" viewBox="0 0 10 10" refX="-2" refY="5" markerUnits="userSpaceOnUse" markerWidth="14" markerHeight="14" orient="auto"><circle cx="5" cy="5" r="5" class="arrowMarkerPath" style="stroke-width: 0; stroke-dasharray: 1, 0;"/></marker><marker id="mermaid-0_flowchart-v2-crossEnd" class="marker cross flowchart-v2" viewBox="0 0 11 11" refX="12" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"/></marker><marker id="mermaid-0_flowchart-v2-crossStart" class="marker cross flowchart-v2" viewBox="0 0 11 11" refX="-1" refY="5.2" markerUnits="userSpaceOnUse" markerWidth="11" markerHeight="11" orient="auto"><path d="M 1,1 l 9,9 M 10,1 l -9,9" class="arrowMarkerPath" style="stroke-width: 2; stroke-dasharray: 1, 0;"/></marker><marker id="mermaid-0_flowchart-v2-crossEnd-margin" class="marker cross flowchart-v2" viewBox="0 0 15 15" refX="17.7" refY="7.5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"><path d="M 1,1 L 14,14 M 1,14 L 14,1" class="arrowMarkerPath" style="stroke-width: 2.5;"/></marker><marker id="mermaid-0_flowchart-v2-crossStart-margin" class="marker cross flowchart-v2" viewBox="0 0 15 15" refX="-3.5" refY="7.5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"><path d="M 1,1 L 14,14 M 1,14 L 14,1" class="arrowMarkerPath" style="stroke-width: 2.5; stroke-dasharray: 1, 0;"/></marker><g class="root"><g class="clusters"/><g class="edgePaths"><path d="M426.316,49.579L375.059,55.816C323.802,62.052,221.288,74.526,170.031,89.43C118.773,104.333,118.773,121.667,118.773,139C118.773,156.333,118.773,173.667,118.773,187.833C118.773,202,118.773,213,118.773,218.5L118.773,224" id="mermaid-0-L_Start_ServerTs_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_Start_ServerTs_0" data-points="W3sieCI6NDI2LjMxNjQwNjI1LCJ5Ijo0OS41Nzg2MTMwMTc5MjQ1NX0seyJ4IjoxMTguNzczNDM3NSwieSI6ODd9LHsieCI6MTE4Ljc3MzQzNzUsInkiOjEzOX0seyJ4IjoxMTguNzczNDM3NSwieSI6MTkxfSx7IngiOjExOC43NzM0Mzc1LCJ5IjoyMjh9XQ==" data-look="classic" marker-end="url(#mermaid-0_flowchart-v2-pointEnd)"/><path d="M665.941,51.46L709.059,57.383C752.177,63.306,838.413,75.153,881.531,84.577C924.648,94,924.648,101,924.648,104.5L924.648,108" id="mermaid-0-L_Start_EffectApp_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_Start_EffectApp_0" data-points="W3sieCI6NjY1Ljk0MTQwNjI1LCJ5Ijo1MS40NTk1MjA1NDE1ODM2OH0seyJ4Ijo5MjQuNjQ4NDM3NSwieSI6ODd9LHsieCI6OTI0LjY0ODQzNzUsInkiOjExMn1d" data-look="classic" marker-end="url(#mermaid-0_flowchart-v2-pointEnd)"/><path d="M475.211,62L464.267,66.167C453.323,70.333,431.435,78.667,420.491,86.333C409.547,94,409.547,101,409.547,104.5L409.547,108" id="mermaid-0-L_Start_Browser_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_Start_Browser_0" data-points="W3sieCI6NDc1LjIxMTMxMzEwMDk2MTU1LCJ5Ijo2Mn0seyJ4Ijo0MDkuNTQ2ODc1LCJ5Ijo4N30seyJ4Ijo0MDkuNTQ2ODc1LCJ5IjoxMTJ9XQ==" data-look="classic" marker-end="url(#mermaid-0_flowchart-v2-pointEnd)"/><path d="M617.046,62L627.991,66.167C638.935,70.333,660.823,78.667,671.767,91.5C682.711,104.333,682.711,121.667,682.711,139C682.711,156.333,682.711,173.667,682.711,187.833C682.711,202,682.711,213,682.711,218.5L682.711,224" id="mermaid-0-L_Start_AnotherLanguage_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_Start_AnotherLanguage_0" data-points="W3sieCI6NjE3LjA0NjQ5OTM5OTAzODUsInkiOjYyfSx7IngiOjY4Mi43MTA5Mzc1LCJ5Ijo4N30seyJ4Ijo2ODIuNzEwOTM3NSwieSI6MTM5fSx7IngiOjY4Mi43MTA5Mzc1LCJ5IjoxOTF9LHsieCI6NjgyLjcxMDkzNzUsInkiOjIyOH1d" data-look="classic" marker-end="url(#mermaid-0_flowchart-v2-pointEnd)"/><path d="M118.773,282L118.773,290.167C118.773,298.333,118.773,314.667,121.798,328.414C124.822,342.161,130.871,353.322,133.895,358.903L136.919,364.483" id="mermaid-0-L_ServerTs_PlainSdk_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_ServerTs_PlainSdk_0" data-points="W3sieCI6MTE4Ljc3MzQzNzUsInkiOjI4Mn0seyJ4IjoxMTguNzczNDM3NSwieSI6MzMxfSx7IngiOjEzOC44MjQ4OTAxMzY3MTg3NSwieSI6MzY4fV0=" data-look="classic" marker-end="url(#mermaid-0_flowchart-v2-pointEnd)"/><path d="M924.648,166L924.648,170.167C924.648,174.333,924.648,182.667,924.648,192.333C924.648,202,924.648,213,924.648,218.5L924.648,224" id="mermaid-0-L_EffectApp_EffectSdk_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_EffectApp_EffectSdk_0" data-points="W3sieCI6OTI0LjY0ODQzNzUsInkiOjE2Nn0seyJ4Ijo5MjQuNjQ4NDM3NSwieSI6MTkxfSx7IngiOjkyNC42NDg0Mzc1LCJ5IjoyMjh9XQ==" data-look="classic" marker-end="url(#mermaid-0_flowchart-v2-pointEnd)"/><path d="M409.547,166L409.547,170.167C409.547,174.333,409.547,182.667,409.547,190.333C409.547,198,409.547,205,409.547,208.5L409.547,212" id="mermaid-0-L_Browser_Location_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_Browser_Location_0" data-points="W3sieCI6NDA5LjU0Njg3NSwieSI6MTY2fSx7IngiOjQwOS41NDY4NzUsInkiOjE5MX0seyJ4Ijo0MDkuNTQ2ODc1LCJ5IjoyMTZ9XQ==" data-look="classic" marker-end="url(#mermaid-0_flowchart-v2-pointEnd)"/><path d="M352.739,294L343.756,300.167C334.774,306.333,316.809,318.667,294.428,330.731C272.047,342.796,245.25,354.592,231.851,360.49L218.453,366.388" id="mermaid-0-L_Location_PlainSdk_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_Location_PlainSdk_0" data-points="W3sieCI6MzUyLjczODY5MjQzNDIxMDUsInkiOjI5NH0seyJ4IjoyOTguODQzNzUsInkiOjMzMX0seyJ4IjoyMTQuNzkyMDUzMjIyNjU2MjUsInkiOjM2OH1d" data-look="classic" marker-end="url(#mermaid-0_flowchart-v2-pointEnd)"/><path d="M463.779,294L472.354,300.167C480.93,306.333,498.08,318.667,519.212,330.717C540.344,342.768,565.457,354.535,578.013,360.419L590.57,366.303" id="mermaid-0-L_Location_HttpApi_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_Location_HttpApi_0" data-points="W3sieCI6NDYzLjc3OTI0NTQ3Njk3MzcsInkiOjI5NH0seyJ4Ijo1MTUuMjMwNDY4NzUsInkiOjMzMX0seyJ4Ijo1OTQuMTkxOTU1NTY2NDA2MiwieSI6MzY4fV0=" data-look="classic" marker-end="url(#mermaid-0_flowchart-v2-pointEnd)"/><path d="M682.711,282L682.711,290.167C682.711,298.333,682.711,314.667,680.024,328.4C677.336,342.133,671.962,353.265,669.274,358.832L666.587,364.398" id="mermaid-0-L_AnotherLanguage_HttpApi_0" class="edge-thickness-normal edge-pattern-solid edge-thickness-normal edge-pattern-solid flowchart-link" style=";" data-edge="true" data-et="edge" data-id="L_AnotherLanguage_HttpApi_0" data-points="W3sieCI6NjgyLjcxMDkzNzUsInkiOjI4Mn0seyJ4Ijo2ODIuNzEwOTM3NSwieSI6MzMxfSx7IngiOjY2NC44NDc3NzgzMjAzMTI1LCJ5IjozNjh9XQ==" data-look="classic" marker-end="url(#mermaid-0_flowchart-v2-pointEnd)"/></g><g class="edgeLabels"><g class="edgeLabel"><g class="label" data-id="L_Start_ServerTs_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_Start_EffectApp_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_Start_Browser_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_Start_AnotherLanguage_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_ServerTs_PlainSdk_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_EffectApp_EffectSdk_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_Browser_Location_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g><g class="edgeLabel" transform="translate(298.84375, 331)"><g class="label" data-id="L_Location_PlainSdk_0" transform="translate(-49.3671875, -12)"><foreignObject width="98.734375" height="24"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"><p>On the device</p></span></div></foreignObject></g></g><g class="edgeLabel" transform="translate(515.23046875, 331)"><g class="label" data-id="L_Location_HttpApi_0" transform="translate(-41.796875, -12)"><foreignObject width="83.59375" height="24"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"><p>On a server</p></span></div></foreignObject></g></g><g class="edgeLabel"><g class="label" data-id="L_AnotherLanguage_HttpApi_0" transform="translate(0, 0)"><foreignObject width="0" height="0"><div xmlns="http://www.w3.org/1999/xhtml" class="labelBkg" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="edgeLabel"></span></div></foreignObject></g></g></g><g class="nodes"><g class="node default" id="mermaid-0-flowchart-Start-0" data-look="classic" transform="translate(546.12890625, 35)"><rect class="basic label-container" style="" x="-119.8125" y="-27" width="239.625" height="54"/><g class="label" style="" transform="translate(-89.8125, -12)"><rect/><foreignObject width="179.625" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>Where will the caller run?</p></span></div></foreignObject></g></g><g class="node default" id="mermaid-0-flowchart-ServerTs-1" data-look="classic" transform="translate(118.7734375, 255)"><rect class="basic label-container" style="" x="-110.7734375" y="-27" width="221.546875" height="54"/><g class="label" style="" transform="translate(-80.7734375, -12)"><rect/><foreignObject width="161.546875" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>Server-side TypeScript</p></span></div></foreignObject></g></g><g class="node default" id="mermaid-0-flowchart-EffectApp-2" data-look="classic" transform="translate(924.6484375, 139)"><rect class="basic label-container" style="" x="-90.78125" y="-27" width="181.5625" height="54"/><g class="label" style="" transform="translate(-60.78125, -12)"><rect/><foreignObject width="121.5625" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>Effect application</p></span></div></foreignObject></g></g><g class="node default" id="mermaid-0-flowchart-Browser-3" data-look="classic" transform="translate(409.546875, 139)"><rect class="basic label-container" style="" x="-59.34375" y="-27" width="118.6875" height="54"/><g class="label" style="" transform="translate(-29.34375, -12)"><rect/><foreignObject width="58.6875" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>Browser</p></span></div></foreignObject></g></g><g class="node default" id="mermaid-0-flowchart-AnotherLanguage-4" data-look="classic" transform="translate(682.7109375, 255)"><rect class="basic label-container" style="" x="-93.1640625" y="-27" width="186.328125" height="54"/><g class="label" style="" transform="translate(-63.1640625, -12)"><rect/><foreignObject width="126.328125" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>Another language</p></span></div></foreignObject></g></g><g class="node default" id="mermaid-0-flowchart-Location-5" data-look="classic" transform="translate(409.546875, 255)"><rect class="basic label-container" style="" x="-130" y="-39" width="260" height="78"/><g class="label" style="" transform="translate(-100, -24)"><rect/><foreignObject width="200" height="48"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table; white-space: break-spaces; line-height: 1.5; max-width: 200px; text-align: center; width: 200px;"><span class="nodeLabel"><p>Where should the browser calculation run?</p></span></div></foreignObject></g></g><g class="node default" id="mermaid-0-flowchart-PlainSdk-6" data-look="classic" transform="translate(153.45703125, 395)"><rect class="basic label-container" style="" x="-95.3671875" y="-27" width="190.734375" height="54"/><g class="label" style="" transform="translate(-65.3671875, -12)"><rect/><foreignObject width="130.734375" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>Use the plain SDK</p></span></div></foreignObject></g></g><g class="node default" id="mermaid-0-flowchart-EffectSdk-7" data-look="classic" transform="translate(924.6484375, 255)"><rect class="basic label-container" style="" x="-98.7734375" y="-27" width="197.546875" height="54"/><g class="label" style="" transform="translate(-68.7734375, -12)"><rect/><foreignObject width="137.546875" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>Use the Effect SDK</p></span></div></foreignObject></g></g><g class="node default" id="mermaid-0-flowchart-HttpApi-8" data-look="classic" transform="translate(651.8125, 395)"><rect class="basic label-container" style="" x="-95.2109375" y="-27" width="190.421875" height="54"/><g class="label" style="" transform="translate(-65.2109375, -12)"><rect/><foreignObject width="130.421875" height="24"><div xmlns="http://www.w3.org/1999/xhtml" style="display: table-cell; white-space: nowrap; line-height: 1.5; max-width: 200px; text-align: center;"><span class="nodeLabel"><p>Use the HTTP API</p></span></div></foreignObject></g></g></g></g></g><defs><filter id="mermaid-0-drop-shadow" height="130%" width="130%"><feDropShadow dx="4" dy="4" stdDeviation="0" flood-opacity="0.06" flood-color="#000000"/></filter></defs><defs><filter id="mermaid-0-drop-shadow-small" height="150%" width="150%"><feDropShadow dx="2" dy="2" stdDeviation="0" flood-opacity="0.06" flood-color="#000000"/></filter></defs><linearGradient id="mermaid-0-gradient" gradientUnits="objectBoundingBox" x1="0%" y1="0%" x2="100%" y2="0%"><stop offset="0%" stop-color="hsl(0, 0%, 83.3333333333%)" stop-opacity="1"/><stop offset="100%" stop-color="hsl(0, 0%, 88.9215686275%)" stop-opacity="1"/></linearGradient></svg>

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 [#next-steps]

* Use [Plain SDK](/sdk/plain-sdk) for most server-side TypeScript apps.
* Use [Effect SDK](/sdk/effect-sdk) for in-process Effect composition.
* Use the API section when you need HTTP endpoint details.
