Skip to main content
The 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

Authorization
string
required
Bearer token authentication. Format: Bearer <your-api-key>. See Authentication for details.
Idempotency-Key
string
required
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

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

operation
string
required
The job operation to perform. Must be either "parse" (process with one provider) or "compare" (process with multiple providers side-by-side).
source.url
string
required
The HTTP or HTTPS URL of the document to process. The URL must be publicly accessible from FileRouter’s infrastructure.
outputs
array
required
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.
pages
array
An optional array of one-based page numbers to process. When omitted, FileRouter processes the entire document. Example: [1, 2, 3].
provider
string
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".
providers
array
An array of provider IDs to use for a compare operation. Requires at least one entry. Only valid when operation is "compare".
providerOptions
object
Optional namespaced provider-specific options. Keys are provider IDs; values are objects containing that provider’s native options. Example: { "llamaparse": { "premium_mode": true } }.
includeRaw
boolean
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 now queued or already running.
202 response body

200 OK — Idempotent replay

You sent an Idempotency-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

The request body or headers failed validation. The response body describes the specific field or constraint that failed.
400 error body
The Authorization header is missing, invalid, or the API key has been disabled or expired. See Authentication for details.
401 error body
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
The uploaded file exceeds the 100 MB request body limit. Split your document or contact support about large-file upload sessions.
An unexpected server-side error occurred. The response includes a request_id — include it when contacting support.