SDK Reference
Chunking
SDK reference for the Chunking API, available in Node.js and Python.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Orq MCP is live: Use natural language to interrogate traces, spot regressions, and experiment your way to optimal AI configurations. Available in Claude Desktop, Claude Code, Cursor, and more. Start now →
SDK reference for the Chunking API, available in Node.js and Python.
from orq_ai_sdk import Orq
import os
with Orq(
api_key=os.getenv("ORQ_API_KEY", ""),
) as orq:
res = orq.chunking.parse(request={
"text": "The quick brown fox jumps over the lazy dog. This is a sample text that will be chunked into smaller pieces. Each chunk will maintain context while respecting the maximum chunk size.",
"metadata": True,
"strategy": "semantic",
"chunk_size": 256,
"threshold": 0.8,
"embedding_model": "openai/text-embedding-3-small",
"dimensions": 512,
"mode": "window",
"similarity_window": 1,
})
# Handle response
print(res)
Show Parameters
Was this page helpful?