Data Operations
Creating Tasks
Learn how to upload files and create processing tasks with Chunkr AI
The Chunkr AI SDK provides two main methods for uploading files:
upload()
: Upload and wait for complete processingcreate_task()
: Upload and get an immediate task response
Complete Processing with upload()
The upload()
method handles the entire process - it uploads your file and waits for processing to complete:
Instant Response with create_task()
If you want to start processing but don’t want to wait for completion, use create_task()
:
Checking Task Status with poll()
When using create_task()
, you can check the status later using poll()
:
For async applications, remember to use await
:
Supported File Types
We support PDFs, Office files (Word, Excel, PowerPoint), and images. You can upload them in several ways:
Note: When sending base64 strings, include only the raw base64-encoded data. Do not include MIME type headers like
data:application/pdf;base64,
. For example:
- ❌
data:application/pdf;base64,JVBERi0...
- ✅
JVBERi0...