v21

latestOpenAPI 3.1.0raw.githubusercontent.com2025-05-22122299.2 KB

Code Chunker

Splits code into chunks based on its structure, leveraging Abstract Syntax Trees (ASTs) to create contextually relevant segments.

post/v1/chunk/code

Response

Successful Response: A list of CodeChunk objects.

textstring

The actual code text content of the chunk.

start_indexinteger

The starting character index of the chunk within the original input code.

end_indexinteger

The ending character index (exclusive) of the chunk within the original input code.

token_countinteger

The number of tokens in this specific chunk, according to the tokenizer used.