> For the complete documentation index, see [llms.txt](https://docs.lenses.io/latest/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.lenses.io/latest/k2k/configuration-reference/licenses.md).

# License

License token and EULA acceptance.

Before K2K can connect to Kafka, the deployment must accept the EULA. `license.acceptEula: true` is mandatory—neither the replicator nor the offset mapper starts without it.

The license **token** is optional. Without a token, K2K runs in [free tier](#free-tier) mode: replication works, but it is capped at a small number of source partitions and the licensed features are unavailable. With a token, the cap is lifted and the features the token carries are unlocked—see [Licensed features](#licensed-features).

Obtain a license from [Lenses](https://lenses.io). Set `license.acceptEula` and `license.token` in the pipeline, or inject the token from the environment through [Secrets and templates](https://docs.lenses.io/latest/k2k/configuration-reference/secrets-and-templates.md). Once licensed, continue with [Deployment](https://docs.lenses.io/latest/k2k/deployment.md) and [Kafka connectivity and authentication](https://docs.lenses.io/latest/k2k/configuration-reference/kafka-connectivity-authentication.md).

## Prerequisites

* EULA acceptance (`license.acceptEula: true`)
* A K2K license from Lenses to replicate beyond the [free tier](#free-tier) partition cap or to use [licensed features](#licensed-features)

## Example

Use this pipeline configuration:

```yaml
name: "my_pipeline"
license:
  acceptEula: true
  token: "<license-token>"
source:
  kafka:
    common:
      "bootstrap.servers": "source:9092"
    consumer:
      "group.id": "my-k2k-group"
target:
  kafka:
    common:
      "bootstrap.servers": "target:9092"
replication:
  - source:
      topic: "orders.*"
  - sink:
      topic: source
      partition: source
```

## Configuration keys

| Key                  | Description                                                    | Required | Default | Used by |
| -------------------- | -------------------------------------------------------------- | -------- | ------- | ------- |
| `license.acceptEula` | Accept the K2K EULA (must be `true`)                           | Yes      | `false` | Both    |
| `license.token`      | K2K license token. Omit to run in [free tier](#free-tier) mode | No       | (none)  | Both    |

## Free tier

When `license.token` is omitted, K2K starts in free tier mode and logs a warning at startup. Replication is limited to **5 partitions** in total across every topic matched by the source stage.

The count is the sum of partitions across all matching source topics, and it is re-evaluated on **every consumer group rebalance**—not only at startup. A pipeline using a topic regex can therefore start successfully and later fail when a newly created topic pushes the total over the limit. When that happens, K2K stops with a free tier limit error naming the current count and the maximum.

Free tier mode also leaves every [licensed feature](#licensed-features) unavailable.

To replicate more partitions, add a `license.token`.

## Licensed features

A license token carries entitlements per feature. Enabling a feature the token does not cover fails the pipeline at startup with a license restriction error.

| Feature toggle                      | Guide                                                                                                               |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| `features.schemaMapping`            | [Schema migration](https://docs.lenses.io/latest/k2k/configuration-reference/schema-migration.md)                   |
| `features.bidirectionalReplication` | [Bidirectional replication](https://docs.lenses.io/latest/k2k/configuration-reference/bidirectional-replication.md) |
| `features.offsetMapping`            | [Offset mapping](https://docs.lenses.io/latest/k2k/configuration-reference/offset-mapping.md)                       |

For `features.offsetMapping`, both the replicator and the offset mapper check the entitlement, so a token missing it fails both applications.

Other features—including [exactly once delivery](https://docs.lenses.io/latest/k2k/configuration-reference/exactly-once-delivery.md), [topic creation](https://docs.lenses.io/latest/k2k/configuration-reference/topic-creation.md), [record tracing](https://docs.lenses.io/latest/k2k/configuration-reference/record-tracing.md), and [header replication](https://docs.lenses.io/latest/k2k/configuration-reference/header-replication.md)—are not entitlement-gated and work in free tier mode within the partition cap.

## Expiry

A token may carry an expiry date. K2K validates it at startup and **continues to check it while running**, so a pipeline that is up when its license expires will stop. Renew before the expiry date to avoid an interruption.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.lenses.io/latest/k2k/configuration-reference/licenses.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
