Files
fil/docs/snippets/kotlin/api/batch_extract_bytes_sync.md
Henrik Jess Nielsen b4c07d3693
All checks were successful
Deploy fil (kreuzberg) / deploy (push) Successful in 49s
Nomad changes
2026-06-01 23:40:55 +02:00

501 B

import dev.kreuzberg.*

fun main() {
    val config = ExtractionConfig.builder().build()
    val items = listOf(
        BatchBytesItem("Hello, world!".toByteArray(), "text/plain", null),
        BatchBytesItem("# Heading\n\nParagraph text.".toByteArray(), "text/markdown", null),
    )
    val results = Kreuzberg.batchExtractBytesSync(items, config)

    results.forEachIndexed { index, result ->
        println("Item $index: ${result.content().length} chars")
    }
}