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

# API Reference

> Five stable v1 endpoints. Bearer-key auth. JSON in, JSON out. Rate limit 60 requests per minute per key.

## Base URL

```
https://www.landedfees.com/api/v1
```

## OpenAPI spec

The full OpenAPI 3.1 document is served alongside the API:

```
https://www.landedfees.com/api/openapi.yaml
```

Use it to generate typed clients for any language:

```bash theme={null}
# Python
openapi-python-client generate --url https://www.landedfees.com/api/openapi.yaml

# TypeScript
openapi-typescript https://www.landedfees.com/api/openapi.yaml -o landedfees.ts

# Go
oapi-codegen -generate types,client https://www.landedfees.com/api/openapi.yaml
```

## Endpoints

| Method | Path                       | Purpose                                    |
| ------ | -------------------------- | ------------------------------------------ |
| POST   | `/v1/calc`                 | Landed cost for one shipment.              |
| POST   | `/v1/calc/bulk`            | Up to 500 rows in one call.                |
| POST   | `/v1/classify`             | HS or HTS code from a product description. |
| POST   | `/v1/compare`              | Up to 6 origin countries side-by-side.     |
| GET    | `/v1/rates/{country}/{hs}` | Duty and tax rate lookup.                  |

## Authentication

Every request carries `Authorization: Bearer sk_live_...`. See
[Authentication](/authentication) for key management, rotation, and
tier gating.

## Idempotency

Every POST accepts an `Idempotency-Key` header. Repeat within 24
hours to get the cached response. Different bodies with the same key
return `409 IDEMPOTENCY_KEY_REUSED`.

## Rate limits

Sliding window: 60 requests per minute per key. Every response
carries `X-RateLimit-Limit`, `X-RateLimit-Remaining`, and
`X-RateLimit-Reset`. See [Rate limits](/rate-limits).

## Versioning

Additive changes ship under `/v1` with a 30-day changelog notice.
Breaking changes ship under a new major version prefix (`/v2`, etc.)
and `/v1` remains supported for at least 12 months after `/v2` GAs.
