Limai Docs
CLI Reference

jobs

Job queue management and data submission

$limai jobs <subcommand>

Manage extraction jobs: check status, wait for completion, cancel, update, download source files, and submit extracted data.

Options
--jsonOutput raw JSON
--verboseEnable debug logging

Subcommands

limai jobs status <jobId>

Get the current status of a job, or poll until it completes.

$limai jobs status <jobId>

Get job status.

Options
--waitPoll until job completes
--timeout <seconds>Timeout in seconds(default: 300)

limai jobs wait <jobId>

Wait for a job to complete. Blocks until the job reaches a terminal state.

$limai jobs wait <jobId>

Wait for a job to complete.

Options
--timeout <seconds>Timeout in seconds(default: 300)

limai jobs cancel <jobId>

Cancel a queued job.

limai jobs cancel <jobId>

limai jobs update <jobId>

Manually update a job's status. Used by agent scripts to report progress.

$limai jobs update <jobId>

Update job status.

Options
--status <status>Status: PROCESSING, COMPLETED, or FAILED (required)
--error-message <msg>Error message (required when status is FAILED)
--pages <n>Pages processed (for COMPLETED billing)
--rows <n>Rows created (for COMPLETED billing)

limai jobs download <url>

Download a file from a URL. Optionally marks a job as PROCESSING before downloading.

$limai jobs download <url>

Download a file from a URL and optionally mark a job as PROCESSING.

Options
--job-id <id>Job ID to mark as PROCESSING (or use $LIMAI_JOB_ID env var)
--output <path>Output file path(default: ./source)

limai jobs submit <file>

Validate and submit extraction data from a JSON file, then mark the job as complete. Handles parent-child table relationships, batch uploads, and automatic row deletion before re-creation.

$limai jobs submit <file>

Validate and submit extraction data, then mark job complete.

Options
--context <path>Path to JOB_CONTEXT.json (required)
--job-id <id>Job ID (or use $LIMAI_JOB_ID env var)
--file-id <id>File ID (or use $LIMAI_FILE_ID env var)
--deployment-id <id>Deployment ID (or use $LIMAI_DEPLOYMENT_ID env var)
--batch-size <n>Rows per API batch(default: 200)
--dry-runValidate and show plan without submitting

Examples

Check job status

limai jobs status job_abc123

Wait for a job to finish

limai jobs wait job_abc123 --timeout 600

Cancel a queued job

limai jobs cancel job_abc123

Mark a job as processing

limai jobs update job_abc123 --status PROCESSING

Mark a job as failed

limai jobs update job_abc123 --status FAILED --error-message "Parser error on page 3"

Download source file for agent processing

limai jobs download "https://storage.example.com/file.pdf" --job-id job_abc123 --output ./input.pdf

Dry run a submission

limai jobs submit output.json --context JOB_CONTEXT.json --dry-run

Submit extraction results

limai jobs submit output.json --context JOB_CONTEXT.json --job-id job_abc123 --file-id file_xyz --deployment-id dep_456