Skip to main content
Use this section to troubleshoot issues encountered when calling the Extract API (/v2/extract) and Extract Jobs (/v2/extract/jobs).

Error Response Format

Every error from the v2 APIs returns a JSON body with two fields:
The code field is a stable identifier you can branch on, such as validation_error, unknown_model_version, invalid_url, invalid_api_key, or rate_limit_exceeded. The message field is a human-readable description; treat its exact wording as variable. The error messages quoted on this page are message values.

Common Status Codes

These status codes are handled at the account and gateway level and can apply to any request.

Status Codes

Status 206: Partial Success

This status code indicates the extraction completed but not cleanly. The response body has the normal success shape, plus one or both of these signals:
  • The schema_violation_error field is set when options.strict is false and the schema contained fields the model could not extract. The extraction is partial: unsupported fields were skipped.
  • The warnings array lists non-fatal warnings emitted during extraction.
What to do:
  • Review the flagged fields and adjust your schema, or set options.strict to true to fail the request with a 422 error instead. See Schema Fields Not Supported (Strict Mode).
  • For Extract Jobs, the poll response stays HTTP 200; check warnings and schema_violation_error inside result instead of relying on the status code.

Status 422: Unprocessable Entity

This status code indicates input validation failures. Review the error message and adjust your request parameters.

Error: markdown_url Fetch Failed

This error occurs when the Markdown cannot be fetched from the provided markdown_url. The URL is validated and fetched when you submit the request, so an unusable URL fails immediately, before any processing starts. Error message:
or
or
What to do:
  • Verify the URL is publicly accessible and serves the Markdown directly. A URL that responds with a redirect is rejected; supply the final URL.
  • If the URL is presigned, confirm it has not expired.

Error: Field extraction invalid

This error occurs when the extraction process fails due to issues with the extraction schema or the extracted data. Error message:
What to do:
  • Review the error details in the response.
  • Verify the JSON schema follows the guidelines described in Extraction Schema (JSON). Update your JSON schema if needed.
  • Ensure all required fields are properly defined in the schema.
  • Check if the document contains data that matches the schema structure.

Error: Unknown Extract Version

This error occurs when an unsupported model version is specified. The error code is unknown_model_version. Error message:
What to do:
  • Use one of the supported versions listed in the error message.
  • Use extract-latest to automatically use the latest version.
  • If you don’t specify a version, the API uses the latest version by default.
  • For more information, go to Model Version.

Error: The provided schema is not valid JSON

This error occurs when the schema parameter cannot be parsed as JSON. Error message:
What to do:
  • Verify your extraction schema is valid JSON.
  • Check for syntax errors such as missing commas, quotes, or brackets.
  • See Extraction Schema (JSON) for the required structure.

Error: The provided schema must have “type”: “object” for the root

This error occurs when the schema is a valid JSON object, but its type keyword is not set to "object". The extraction engine requires the root schema to explicitly declare "type": "object". Error message:
What to do: Set "type": "object" at the root of your schema. Correct:
Incorrect:

Error: The provided JSON must parse to an object at the root

This error occurs when the schema parameter is valid JSON, but the root value is not a JSON object. For example, the root is a JSON array ([...]), a string, or a number rather than {...}. Error message:
What to do: Wrap your schema in a JSON object ({...}). Correct:
Incorrect:

Error: The provided JSON object was not a valid JSON schema

This error occurs when the schema parameter contains a JSON object that does not conform to the JSON Schema specification. Error message:
What to do:
  • Review the error details to identify the specific schema issue.
  • Check that every type value is a JSON Schema type (string, number, integer, boolean, object, array, or null). A custom type such as "money" fails validation, and the error details report that the value is not valid under any of the given schemas.
  • Verify your schema follows the guidelines described in Extraction Schema (JSON).

Error: The provided schema contains recursive local $ref cycles

This error occurs when the extraction schema contains circular $ref references (for example, a schema that references itself). Error message:
What to do: Remove circular $ref references from your schema. Restructure nested types to avoid self-referencing definitions.

Error: Fields the model cannot extract (strict mode)

This error occurs when strict is true and the schema contains one or more fields the model cannot extract. When strict is false (default), those fields are skipped and extraction continues. What to do:
  • Confirm the document actually contains the data for the fields that could not be extracted.
  • Refine each field’s description and x-alternativeNames to help the model locate the data. See Field Descriptions and Alternative Names.
  • To skip fields that cannot be extracted instead of returning an error, set strict to false.

Error: Schema fields not supported (strict mode)

This error occurs when strict is true and the schema contains keywords the extraction engine does not support. When strict is false (default), unsupported keywords are ignored and extraction continues. Error message:
What to do:
  • Remove the listed keywords from your schema. See Extraction Schema (JSON) for the supported schema features.
  • To ignore unsupported keywords instead of returning an error, set strict to false.

Error: Cannot provide both ‘markdown’ and ‘markdown_url’

This error occurs when both a Markdown file and a URL to a Markdown file are provided in the same request. Error message:
What to do: Choose one input method:
  • Provide a Markdown file using the markdown parameter, OR
  • Provide a URL to a Markdown file using the markdown_url parameter.

Error: Provide exactly one Markdown source

This error occurs when your request does not include a Markdown source. Error message:
What to do: Add one of these parameters to your request:
  • Use the markdown parameter to upload a Markdown file, OR
  • Use the markdown_url parameter to provide a URL to a Markdown file.

Error: No markdown file or URL provided

This error occurs when you include a markdown or markdown_url parameter in your request, but the value is empty or blank. Error message:
What to do:
  • If using markdown: Ensure you are uploading a valid Markdown file (not an empty file or blank value).
  • If using markdown_url: Ensure the parameter contains a valid URL (not an empty string or blank value).
  • Verify that your request properly includes the file or URL value.

Error: Invalid URL format

This error occurs when the markdown_url parameter contains a value that is not a valid URL. Error message:
What to do:
  • Verify the URL is properly formatted with a valid protocol (http:// or https://).
  • Check for typos or missing characters in the URL.
  • Ensure the URL is properly encoded if it contains special characters.

Error: Multiple Markdown files detected

This error occurs when multiple Markdown files are included in the request. Error message:
What to do: Send only one Markdown file per request.

Error: Unsupported format

This error occurs when you provide a file other than Markdown (.md) to the extract endpoint, such as PDF, DOCX, XLSX, or image files. Error message:
What to do:
  • The extract endpoint only accepts Markdown files with a .md extension.
  • If you have a PDF, DOCX, or other document format, use the Parse API to convert your document to Markdown first.
  • Ensure your file has a .md extension and contains valid UTF-8 encoded Markdown content.

Error: service_tier Is Only Valid on Extract Jobs

This error occurs when a request to the synchronous Extract endpoint (POST /v2/extract) includes the service_tier parameter. Service tiers only apply to asynchronous endpoints, like Extract Jobs. The parameter is rejected even when its value is empty. Error message:
What to do:

Error: output_save_url Expired or Expires Too Soon

This error occurs when you create an Extract Job with an output_save_url whose presigned URL is already expired or does not stay valid long enough for the job to complete. The output is delivered when the job completes, so the URL must have at least 15 minutes of remaining validity at submission. The error code is invalid_url. Error message:
or
What to do:
  • Sign a fresh presigned URL with a longer validity and create the job again. The job is rejected before processing starts, so no credits are consumed.
  • For Azure SAS URLs, also confirm the token grants write (w) or create (c) permission. A URL without write access is rejected with a similar 422 error.
  • Sign delivery URLs with long-lived credentials. A URL signed with temporary session credentials can pass this check but still fail at delivery if the session expires before the job completes.

Status 500: Internal Server Error

This error indicates an unexpected server error occurred during processing. What to do:

Status 504: Gateway Timeout

This error occurs when the extraction process exceeds the timeout limit (475 seconds). You are not billed for a request that times out. Error message:
What to do:

Extract Jobs

These status codes apply to the asynchronous Extract Jobs v2 endpoints.

Create a Job

These status codes apply to POST /v2/extract/jobs.

Get a Job

These status codes apply to GET /v2/extract/jobs/{job_id}.

When Are Credits Consumed?

Credits are consumed only when the API returns a 200 or 206 status code. Error responses do not consume credits. For Extract Jobs, credits are consumed only when a job reaches the completed status; failed jobs do not consume credits. For more information, see Credit Consumption.