Parse API
Extract structured fields from PDFs and images using REST. This guide covers parse endpoints, API keys, job polling, and future webhooks.
Base URL
https://api.warakai.com
How it works
Parse requests are asynchronous. A successful enqueue returns HTTP 202 with a job id. Poll GET /api/v1/parse/jobs/:jobId until the job completes or fails, or subscribe to a webhook URL when we enable delivery (coming soon).
Usage rows in your account reference parseJobId — the same id as the single job or the shared bulk job id for every file in a bulk run.
Authentication
Include credentials on every request using one of:
- Header X-Api-Key: wk_…
- Authorization: Bearer wk_…
- Authorization: Bearer JWT — your active API key is used for quota and usage (you still need at least one key).
API keys
Create a test or live key under API Keys. The secret is shown only once. Without an active key, parse requests return API_KEY_REQUIRED_FOR_PARSE.
Manage API keysarrow_forwardEndpoints
| Method | Path | Description |
|---|---|---|
| POST | /api/v1/parse/document | Enqueue a single document (multipart: file, schema JSON string, optional documentType). |
| POST | /api/v1/parse/bulk | Enqueue a bulk run (ZIP or multiple files) with the same schema shape. |
| GET | /api/v1/parse/jobs | List recent jobs still in Redis (summary only; may be truncated). |
| GET | /api/v1/parse/jobs/:jobId | Poll job status; response has either bulk or single object. |
POST /api/v1/parse/document
Send multipart/form-data with a file and a schema field containing a JSON string that describes field names and types. Successful responses return 202 with id, status, and createdAt.
Form fields
- file
- PDF or image (allowed types depend on your plan).
- schema
- JSON string, e.g. {"total":"number","vendor":"string"}.
- documentType
- Optional label (max 40 characters).
On success you may receive X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-RateLimit-Plan.
POST /api/v1/parse/bulk
Same multipart pattern, but uploads go to object storage for large batches. Use one ZIP archive, or attach multiple file parts as documented in Postman.
Bulk jobs return a single job id; each file’s usage row shares the same parseJobId.
GET /api/v1/parse/jobs
Returns jobs and truncated when more rows existed than the server limit. Use GET /api/v1/parse/jobs/:jobId for full detail.
GET /api/v1/parse/jobs/:jobId
Exactly one of bulk or single is non-null. When completed, single.fields holds extracted values with confidence. Failed jobs may include single.error or bulk.errors.
Rate limits & quotas
Plan quotas and per-minute parse rate limits apply. A 429 response includes a machine-readable code (e.g. RATE_LIMIT_PARSE_DOCUMENT or LIMIT_EXCEEDED).
Errors
Typical JSON error shape:
Validation errors may include a details object. Always log requestId when contacting support.
Webhooks
You will be able to register an HTTPS URL to receive job completion payloads (signed) for your integration. This is not active yet — poll until then.
When enabled, we will document the payload schema, signature verification, and retry policy here.