Kafka Connect billing

Each Kafka Connect cluster is billed on its own, on the same organization bill as your Kafka clusters. Charges are worked out every hour, starting from the hour the Connect cluster was created, and stop when it is deleted. Past charges stay on the bill with the rates they were priced at.

Billing models

A Connect cluster uses one of two billing models.

Model What is billed Meter Default rate
Usage-based (default) Hours that connector tasks spend running Task hours (TaskHours) 0.015 USD per task-hour
  Connector data read and written, in GiB (1 GiB = 1024³ bytes) Data processed (Throughput) 0.025 USD per GiB
Cost-based The compute cost of the Connect cluster’s own pods, times a rate Compute cost (ComputeCost) 1.25 × compute cost
  • Task hours counts only running tasks. A paused or failed task is not billed.
  • Data processed counts every connector’s reads and writes, whatever client ID the connector uses. The Connect cluster’s own bookkeeping (offsets, configuration and status) is not billed.
  • Compute cost comes from the fleet’s cost report. When the Kafka cluster is also cost-based, the Connect cluster’s pods are taken off the Kafka cluster’s charge, so they are never billed twice.
  • A new Connect cluster starts on usage-based billing with the default rates. A Strimzi Connect cluster is always cost-based: it starts on cost-based billing and can’t be switched to usage-based. Your Streamtime operator can change those defaults; existing Connect clusters keep the rates they have.
  • When the fleet’s metrics or cost report can’t be read for an hour, that hour is not billed as zero: it is billed on a later run, once the data is back.

Charges are priced with the rates the Connect cluster has when you view the bill. Changing a rate also changes the amount shown for earlier charges this month.

The API examples below share this setup:

export STREAMTIME_TOKEN=<your-access-token>
export API=https://api.example.com/organizations/<org>
import os
from streamtime_sdk.client import AuthenticatedClient

client = AuthenticatedClient(
    base_url="https://api.example.com",
    token=os.environ["STREAMTIME_TOKEN"],
)
ORG = "<org>"

Uses the generated client in streamtime-sdk/typescript/client.

import { client } from "./client/client.gen";

client.setConfig({
  baseUrl: "https://api.example.com",
  headers: { Authorization: `Bearer ${process.env.STREAMTIME_TOKEN}` },
});
const org = "<org>";
package main

import (
    "bytes"
    "crypto/rand"
    "encoding/hex"
    "encoding/json"
    "net/http"
    "os"
)

const api = "https://api.example.com/organizations/<org>"

// newKey returns a random idempotency key.
func newKey() string {
    b := make([]byte, 16)
    rand.Read(b)
    return hex.EncodeToString(b)
}

// call sends one request with the access token and a JSON body (or none).
// An optional idempotency key is sent as the Idempotency-Key header.
func call(method, path string, body any, idempotencyKey ...string) (*http.Response, error) {
    var buf bytes.Buffer
    if body != nil {
        if err := json.NewEncoder(&buf).Encode(body); err != nil {
            return nil, err
        }
    }
    req, err := http.NewRequest(method, api+path, &buf)
    if err != nil {
        return nil, err
    }
    req.Header.Set("Authorization", "Bearer "+os.Getenv("STREAMTIME_TOKEN"))
    req.Header.Set("Content-Type", "application/json")
    if len(idempotencyKey) > 0 {
        req.Header.Set("Idempotency-Key", idempotencyKey[0])
    }
    return http.DefaultClient.Do(req)
}

See a Connect cluster’s bill

  1. In the sidebar, select Kafka Connect, then the Connect cluster.
  2. On the Overview tab, the Billing card shows this month’s amount so far (Current) and the amount expected by the end of the month (Expected).
  3. On usage-based billing, the card also shows Task hours and Data processed for the month. On cost-based billing, it shows the chart only.
  4. To see every resource together, select Billing in the sidebar. On the Analysis tab, each Connect cluster has its own line, **Kafka Connect: **, with one row per meter. **Download Detail Report** on a line saves it as CSV; past months are on the **Invoices** tab.
curl "$API/kafka-connect/cdc/usage/" \
  -H "Authorization: Bearer $STREAMTIME_TOKEN"
{
  "cluster": "cdc",
  "total_amount": 1.5,
  "expected_amount": 4.2,
  "currency": "USD",
  "month": "2026-12-01T00:00:00Z",
  "items": {
    "TaskHours": {"usage": 48.0, "unit": "task-hour", "unit_charge": 0.015, "amount": 0.72},
    "Throughput": {"usage": 31.2, "unit": "GiB", "unit_charge": 0.025, "amount": 0.78}
  }
}

The response is empty ({}) until the first hour is billed. On the organization bill (GET $API/billing/current/), Connect lines have "resource_type": "kafka_connect".

from streamtime_sdk.api.kafka_connect import kafka_connect_usage_retrieve

bill = kafka_connect_usage_retrieve.sync(ORG, "cdc", client=client)
import { kafkaConnectUsageRetrieve } from "./client";

const { data: bill } = await kafkaConnectUsageRetrieve({
  path: { org_identifier: org, identifier: "cdc" },
});
resp, err := call("GET", "/kafka-connect/cdc/usage/", nil)

No command for one Connect cluster yet. The organization’s bill includes every Connect cluster:

streamtime billing current

Not available in MCP yet. See the bill in the UI, API or CLI.

Change the billing model or rates

The billing model and rates are a list of entries, the same shape as a Kafka cluster’s billing labels: CostModel (UsageBased or CostBased) and one rate per meter, each with a unit and a currency (USD or INR). Send the whole list: it replaces the current one.

When you change CostModel, billing on the new model starts from the current hour. Hours already billed on the old model are not billed again. Streamtime records that hour as BillingStart; it is set by Streamtime and ignored if you send it.

Not available in the UI. Change the model and rates through the API.

# Current model and rates
curl "$API/kafka-connect/cdc/labels/" \
  -H "Authorization: Bearer $STREAMTIME_TOKEN"

# Switch to cost-based billing at 1.4 × compute cost
curl -X PUT "$API/kafka-connect/cdc/labels/" \
  -H "Authorization: Bearer $STREAMTIME_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "labels": [
      {"key": "CostModel", "value": "CostBased"},
      {"key": "ComputeCost", "value": "1.4", "unit": "USD of compute", "currency": "USD"}
    ]
  }'

A CostModel other than UsageBased or CostBased, or none at all, is refused with 400, as is UsageBased on a Strimzi Connect cluster.

from streamtime_sdk.api.kafka_connect import kafka_connect_labels_update

kafka_connect_labels_update.sync(
    ORG,
    "cdc",
    client=client,
    body={  # or the generated request model
        "labels": [
            {"key": "CostModel", "value": "CostBased"},
            {"key": "ComputeCost", "value": "1.4", "unit": "USD of compute", "currency": "USD"},
        ],
    },
)
import { kafkaConnectLabelsUpdate } from "./client";

await kafkaConnectLabelsUpdate({
  path: { org_identifier: org, identifier: "cdc" },
  body: {
    labels: [
      { key: "CostModel", value: "CostBased" },
      { key: "ComputeCost", value: "1.4", unit: "USD of compute", currency: "USD" },
    ],
  },
});
resp, err := call("PUT", "/kafka-connect/cdc/labels/", map[string]any{
    "labels": []any{
        map[string]any{"key": "CostModel", "value": "CostBased"},
        map[string]any{"key": "ComputeCost", "value": "1.4", "unit": "USD of compute", "currency": "USD"},
    },
})

Not available in the CLI. Change the model and rates through the API.

Not available in MCP. Change the model and rates through the API.

See Kafka Connect to create and manage Connect clusters.