> ## Documentation Index
> Fetch the complete documentation index at: https://docs-test.symmetry.com/llms.txt
> Use this file to discover all available pages before exploring further.

# STL API overview

> Base URL, authentication, and endpoints for the Symmetry Tax Logic (STL) API — the service that turns a payroll calculation into a plain-language explanation.

The **Symmetry Tax Logic (STL) API** takes a completed payroll calculation and returns an AI-generated, plain-language explanation of how each tax was computed. The endpoint reference in this section is generated from the live OpenAPI specification.

<Note>
  Looking for concepts, integration steps, and sample clients? Start with the [Symmetry Tax Logic API guide](/ste/ai-interfaces/tax-logic-api) under **AI tools**. This section is the endpoint-level reference for the same service.
</Note>

## Base URL

The STL API is a hosted service that Symmetry runs for you.

| Environment | Base URL                       |
| ----------- | ------------------------------ |
| Production  | `https://api.symmetry.com/stl` |

Endpoints are versioned under `/v1` (for example, `https://api.symmetry.com/stl/v1/explain`).

## Authentication

All `/v1/*` endpoints require a **Bearer token**. You exchange your Symmetry API key for a short-lived access token, then send that token on each STL request:

<Steps>
  <Step title="Exchange your API key for a token">
    Call `GET /authentication/login` on the Symmetry API with your API key in the `api-key` header. The response includes an `accessToken`.
  </Step>

  <Step title="Call STL with the Bearer token">
    Send the token in the `Authorization` header as `Bearer <accessToken>` on every `/v1/*` request.
  </Step>
</Steps>

```http theme={null}
POST /v1/explain HTTP/1.1
Host: api.symmetry.com
Authorization: Bearer your_access_token_here
Content-Type: application/json
Accept: application/json
```

<Warning>
  The STL API expects a `Bearer` token — unlike the [STE Hosted Web API](/ste/api-reference/overview), which takes the raw API key as the `Authorization` value. Don't reuse the same header format across the two services.
</Warning>

## Endpoints

| Method | Path                       | Purpose                                                                           |
| ------ | -------------------------- | --------------------------------------------------------------------------------- |
| `POST` | `/v1/explain`              | Explain 1–10 taxes for a single paycheck, given a PayCalc context or STE session. |
| `POST` | `/v1/experimental/compare` | Compare two paychecks and return a narrative of the meaningful differences.       |
| `GET`  | `/v1/version`              | Return the current STL API version.                                               |
| `GET`  | `/v1/health`, `/health`    | Service health and readiness checks.                                              |

The full request/response schemas — including `ExplainInput`, `ExplainOutput`, and the `PayCalcContext` shape — are documented in the **Endpoints** pages in this section.

## Try it with live Swagger

For interactive, authenticated calls against the running service, use the hosted Swagger UI.

<Card title="STL Swagger" href="https://api.symmetry.com/stl/docs" icon="play">
  Live API explorer for the Symmetry Tax Logic API.
</Card>
