POST /api/v1/jobs endpoint accepts a document and starts a parse or compare job on FileRouter’s hosted infrastructure. You can submit documents in two ways: as a JSON body with a public URL, or as a raw binary body for direct file uploads. The endpoint always returns immediately with a job ID and an initial status — you then poll GET /api/v1/jobs/{jobId} to retrieve the result.
The TypeScript SDK (
FileRouterClient) handles all headers and body serialization automatically, including idempotency key generation. Use the REST API directly only if you’re integrating from a non-TypeScript environment.Required Headers
Bearer token authentication. Format:
Bearer <your-api-key>. See Authentication for details.A unique key (8–255 characters) that makes this request safely retryable. If you send the same
Idempotency-Key a second time with the same request body, the API returns the original job rather than creating a new one. Use a random UUID or a deterministic key derived from your request content.Request Formats
- JSON Body (URL input)
- Binary Body (file upload)
Use this format when your document is accessible at a public HTTP or HTTPS URL. Set
Content-Type: application/json and send the job parameters as a JSON object.Content-Type
Body Parameters
The job operation to perform. Must be either
"parse" (process with one provider) or "compare" (process with multiple providers side-by-side).The HTTP or HTTPS URL of the document to process. The URL must be publicly accessible from FileRouter’s infrastructure.
An array of output format IDs to request (at least one required). Example:
["markdown"]. The available output IDs depend on the provider’s declared capabilities.An optional array of one-based page numbers to process. When omitted, FileRouter processes the entire document. Example:
[1, 2, 3].The provider ID to use for a
parse operation (e.g., "llamaparse", "mistral-ocr"). When omitted, FileRouter uses a default provider. Only valid when operation is "parse".An array of provider IDs to use for a
compare operation. Requires at least one entry. Only valid when operation is "compare".Optional namespaced provider-specific options. Keys are provider IDs; values are objects containing that provider’s native options. Example:
{ "llamaparse": { "premium_mode": true } }.When
true, the completed job result includes the full raw response from the provider alongside the normalized outputs. Defaults to false. Use this only when you need provider-native data — raw responses can be large, especially for image-heavy documents.Example
Create a URL-based parse job
Responses
202 Accepted — Job created
The API accepted your request and created a new job. The job is nowqueued or already running.
202 response body
200 OK — Idempotent replay
You sent anIdempotency-Key that already exists for your account with the same request body. The API returns the original job without starting a new workflow. The response shape is identical to 202.
200 idempotent replay body
Error Responses
400 Bad Request
400 Bad Request
The request body or headers failed validation. The response body describes the specific field or constraint that failed.
400 error body
409 Conflict — Idempotency conflict
409 Conflict — Idempotency conflict
You sent the same
Idempotency-Key with a different request body. FileRouter will not overwrite an existing idempotency record. Use a new, unique key for a different request.409 error body
413 Content Too Large
413 Content Too Large
The uploaded file exceeds the 100 MB request body limit. Split your document or contact support about large-file upload sessions.
500 Internal Server Error
500 Internal Server Error
An unexpected server-side error occurred. The response includes a
request_id — include it when contacting support.