curl --request POST \
--url https://api.runpulse.com/extract_async \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <api-key>' \
--form file='@example-file' \
--form 'fileUrl=<string>' \
--form detectSelections=true \
--form extractionConfigId=3c90c3cc-0d44-4b50-8888-8dd25736052a \
--form 'pages=<string>' \
--form forceUrl=false \
--form 'figureProcessing={
"description": false,
"showImages": false
}' \
--form 'extensions={
"footnoteReferences": false,
"document_metadata": false,
"chunking": {
"chunkTypes": [],
"chunkSize": 2
},
"altOutputs": {
"wlbb": false,
"returnHtml": false,
"returnXml": false
}
}' \
--form 'spreadsheet={
"includeHiddenRows": false,
"includeHiddenCols": false,
"includeHiddenSheets": false,
"useRawValues": false,
"onlyDataRows": false,
"onlyDataCols": false,
"cellData": true
}' \
--form 'storage={
"enabled": true,
"folderName": "<string>",
"folderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}' \
--form async=false \
--form 'structuredOutput={
"schema": {},
"schemaPrompt": "<string>",
"effort": false
}' \
--form 'schema={}' \
--form 'schemaPrompt=<string>' \
--form 'customPrompt=<string>' \
--form 'chunking=<string>' \
--form chunkSize=2 \
--form extractFigure=false \
--form figureDescription=false \
--form showImages=false \
--form returnHtml=false \
--form thinking=falseimport requests
url = "https://api.runpulse.com/extract_async"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"fileUrl": "<string>",
"detectSelections": "true",
"extractionConfigId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pages": "<string>",
"forceUrl": "false",
"figureProcessing": "{
\"description\": false,
\"showImages\": false
}",
"extensions": "{
\"footnoteReferences\": false,
\"document_metadata\": false,
\"chunking\": {
\"chunkTypes\": [],
\"chunkSize\": 2
},
\"altOutputs\": {
\"wlbb\": false,
\"returnHtml\": false,
\"returnXml\": false
}
}",
"spreadsheet": "{
\"includeHiddenRows\": false,
\"includeHiddenCols\": false,
\"includeHiddenSheets\": false,
\"useRawValues\": false,
\"onlyDataRows\": false,
\"onlyDataCols\": false,
\"cellData\": true
}",
"storage": "{
\"enabled\": true,
\"folderName\": \"<string>\",
\"folderId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"
}",
"async": "false",
"structuredOutput": "{
\"schema\": {},
\"schemaPrompt\": \"<string>\",
\"effort\": false
}",
"schema": "{}",
"schemaPrompt": "<string>",
"customPrompt": "<string>",
"chunking": "<string>",
"chunkSize": "2",
"extractFigure": "false",
"figureDescription": "false",
"showImages": "false",
"returnHtml": "false",
"thinking": "false"
}
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('fileUrl', '<string>');
form.append('detectSelections', 'true');
form.append('extractionConfigId', '3c90c3cc-0d44-4b50-8888-8dd25736052a');
form.append('pages', '<string>');
form.append('forceUrl', 'false');
form.append('figureProcessing', '{
"description": false,
"showImages": false
}');
form.append('extensions', '{
"footnoteReferences": false,
"document_metadata": false,
"chunking": {
"chunkTypes": [],
"chunkSize": 2
},
"altOutputs": {
"wlbb": false,
"returnHtml": false,
"returnXml": false
}
}');
form.append('spreadsheet', '{
"includeHiddenRows": false,
"includeHiddenCols": false,
"includeHiddenSheets": false,
"useRawValues": false,
"onlyDataRows": false,
"onlyDataCols": false,
"cellData": true
}');
form.append('storage', '{
"enabled": true,
"folderName": "<string>",
"folderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}');
form.append('async', 'false');
form.append('structuredOutput', '{
"schema": {},
"schemaPrompt": "<string>",
"effort": false
}');
form.append('schema', '{}');
form.append('schemaPrompt', '<string>');
form.append('customPrompt', '<string>');
form.append('chunking', '<string>');
form.append('chunkSize', '2');
form.append('extractFigure', 'false');
form.append('figureDescription', 'false');
form.append('showImages', 'false');
form.append('returnHtml', 'false');
form.append('thinking', 'false');
const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
options.body = form;
fetch('https://api.runpulse.com/extract_async', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.runpulse.com/extract_async",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileUrl\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"detectSelections\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"extractionConfigId\"\r\n\r\n3c90c3cc-0d44-4b50-8888-8dd25736052a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"pages\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"forceUrl\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"figureProcessing\"\r\n\r\n{\r\n \"description\": false,\r\n \"showImages\": false\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"extensions\"\r\n\r\n{\r\n \"footnoteReferences\": false,\r\n \"document_metadata\": false,\r\n \"chunking\": {\r\n \"chunkTypes\": [],\r\n \"chunkSize\": 2\r\n },\r\n \"altOutputs\": {\r\n \"wlbb\": false,\r\n \"returnHtml\": false,\r\n \"returnXml\": false\r\n }\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"spreadsheet\"\r\n\r\n{\r\n \"includeHiddenRows\": false,\r\n \"includeHiddenCols\": false,\r\n \"includeHiddenSheets\": false,\r\n \"useRawValues\": false,\r\n \"onlyDataRows\": false,\r\n \"onlyDataCols\": false,\r\n \"cellData\": true\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"storage\"\r\n\r\n{\r\n \"enabled\": true,\r\n \"folderName\": \"<string>\",\r\n \"folderId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"async\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"structuredOutput\"\r\n\r\n{\r\n \"schema\": {},\r\n \"schemaPrompt\": \"<string>\",\r\n \"effort\": false\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"schema\"\r\n\r\n{}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"schemaPrompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customPrompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"chunking\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"chunkSize\"\r\n\r\n2\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"extractFigure\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"figureDescription\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"showImages\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"returnHtml\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"thinking\"\r\n\r\nfalse\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.runpulse.com/extract_async"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileUrl\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"detectSelections\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"extractionConfigId\"\r\n\r\n3c90c3cc-0d44-4b50-8888-8dd25736052a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"pages\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"forceUrl\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"figureProcessing\"\r\n\r\n{\r\n \"description\": false,\r\n \"showImages\": false\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"extensions\"\r\n\r\n{\r\n \"footnoteReferences\": false,\r\n \"document_metadata\": false,\r\n \"chunking\": {\r\n \"chunkTypes\": [],\r\n \"chunkSize\": 2\r\n },\r\n \"altOutputs\": {\r\n \"wlbb\": false,\r\n \"returnHtml\": false,\r\n \"returnXml\": false\r\n }\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"spreadsheet\"\r\n\r\n{\r\n \"includeHiddenRows\": false,\r\n \"includeHiddenCols\": false,\r\n \"includeHiddenSheets\": false,\r\n \"useRawValues\": false,\r\n \"onlyDataRows\": false,\r\n \"onlyDataCols\": false,\r\n \"cellData\": true\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"storage\"\r\n\r\n{\r\n \"enabled\": true,\r\n \"folderName\": \"<string>\",\r\n \"folderId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"async\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"structuredOutput\"\r\n\r\n{\r\n \"schema\": {},\r\n \"schemaPrompt\": \"<string>\",\r\n \"effort\": false\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"schema\"\r\n\r\n{}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"schemaPrompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customPrompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"chunking\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"chunkSize\"\r\n\r\n2\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"extractFigure\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"figureDescription\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"showImages\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"returnHtml\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"thinking\"\r\n\r\nfalse\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.runpulse.com/extract_async")
.header("x-api-key", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileUrl\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"detectSelections\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"extractionConfigId\"\r\n\r\n3c90c3cc-0d44-4b50-8888-8dd25736052a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"pages\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"forceUrl\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"figureProcessing\"\r\n\r\n{\r\n \"description\": false,\r\n \"showImages\": false\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"extensions\"\r\n\r\n{\r\n \"footnoteReferences\": false,\r\n \"document_metadata\": false,\r\n \"chunking\": {\r\n \"chunkTypes\": [],\r\n \"chunkSize\": 2\r\n },\r\n \"altOutputs\": {\r\n \"wlbb\": false,\r\n \"returnHtml\": false,\r\n \"returnXml\": false\r\n }\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"spreadsheet\"\r\n\r\n{\r\n \"includeHiddenRows\": false,\r\n \"includeHiddenCols\": false,\r\n \"includeHiddenSheets\": false,\r\n \"useRawValues\": false,\r\n \"onlyDataRows\": false,\r\n \"onlyDataCols\": false,\r\n \"cellData\": true\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"storage\"\r\n\r\n{\r\n \"enabled\": true,\r\n \"folderName\": \"<string>\",\r\n \"folderId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"async\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"structuredOutput\"\r\n\r\n{\r\n \"schema\": {},\r\n \"schemaPrompt\": \"<string>\",\r\n \"effort\": false\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"schema\"\r\n\r\n{}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"schemaPrompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customPrompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"chunking\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"chunkSize\"\r\n\r\n2\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"extractFigure\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"figureDescription\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"showImages\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"returnHtml\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"thinking\"\r\n\r\nfalse\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runpulse.com/extract_async")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileUrl\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"detectSelections\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"extractionConfigId\"\r\n\r\n3c90c3cc-0d44-4b50-8888-8dd25736052a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"pages\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"forceUrl\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"figureProcessing\"\r\n\r\n{\r\n \"description\": false,\r\n \"showImages\": false\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"extensions\"\r\n\r\n{\r\n \"footnoteReferences\": false,\r\n \"document_metadata\": false,\r\n \"chunking\": {\r\n \"chunkTypes\": [],\r\n \"chunkSize\": 2\r\n },\r\n \"altOutputs\": {\r\n \"wlbb\": false,\r\n \"returnHtml\": false,\r\n \"returnXml\": false\r\n }\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"spreadsheet\"\r\n\r\n{\r\n \"includeHiddenRows\": false,\r\n \"includeHiddenCols\": false,\r\n \"includeHiddenSheets\": false,\r\n \"useRawValues\": false,\r\n \"onlyDataRows\": false,\r\n \"onlyDataCols\": false,\r\n \"cellData\": true\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"storage\"\r\n\r\n{\r\n \"enabled\": true,\r\n \"folderName\": \"<string>\",\r\n \"folderId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"async\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"structuredOutput\"\r\n\r\n{\r\n \"schema\": {},\r\n \"schemaPrompt\": \"<string>\",\r\n \"effort\": false\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"schema\"\r\n\r\n{}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"schemaPrompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customPrompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"chunking\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"chunkSize\"\r\n\r\n2\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"extractFigure\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"figureDescription\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"showImages\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"returnHtml\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"thinking\"\r\n\r\nfalse\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"status": "pending",
"message": "<string>",
"queuedAt": "2023-11-07T05:31:56Z",
"credits_used": 123
}Extract File Async (Deprecated)
Deprecated: Use /extract with async: true instead.
Starts an asynchronous extraction job. The request mirrors the synchronous options but returns immediately with a job identifier that clients can poll for completion status.
curl --request POST \
--url https://api.runpulse.com/extract_async \
--header 'Content-Type: multipart/form-data' \
--header 'x-api-key: <api-key>' \
--form file='@example-file' \
--form 'fileUrl=<string>' \
--form detectSelections=true \
--form extractionConfigId=3c90c3cc-0d44-4b50-8888-8dd25736052a \
--form 'pages=<string>' \
--form forceUrl=false \
--form 'figureProcessing={
"description": false,
"showImages": false
}' \
--form 'extensions={
"footnoteReferences": false,
"document_metadata": false,
"chunking": {
"chunkTypes": [],
"chunkSize": 2
},
"altOutputs": {
"wlbb": false,
"returnHtml": false,
"returnXml": false
}
}' \
--form 'spreadsheet={
"includeHiddenRows": false,
"includeHiddenCols": false,
"includeHiddenSheets": false,
"useRawValues": false,
"onlyDataRows": false,
"onlyDataCols": false,
"cellData": true
}' \
--form 'storage={
"enabled": true,
"folderName": "<string>",
"folderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}' \
--form async=false \
--form 'structuredOutput={
"schema": {},
"schemaPrompt": "<string>",
"effort": false
}' \
--form 'schema={}' \
--form 'schemaPrompt=<string>' \
--form 'customPrompt=<string>' \
--form 'chunking=<string>' \
--form chunkSize=2 \
--form extractFigure=false \
--form figureDescription=false \
--form showImages=false \
--form returnHtml=false \
--form thinking=falseimport requests
url = "https://api.runpulse.com/extract_async"
files = { "file": ("example-file", open("example-file", "rb")) }
payload = {
"fileUrl": "<string>",
"detectSelections": "true",
"extractionConfigId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"pages": "<string>",
"forceUrl": "false",
"figureProcessing": "{
\"description\": false,
\"showImages\": false
}",
"extensions": "{
\"footnoteReferences\": false,
\"document_metadata\": false,
\"chunking\": {
\"chunkTypes\": [],
\"chunkSize\": 2
},
\"altOutputs\": {
\"wlbb\": false,
\"returnHtml\": false,
\"returnXml\": false
}
}",
"spreadsheet": "{
\"includeHiddenRows\": false,
\"includeHiddenCols\": false,
\"includeHiddenSheets\": false,
\"useRawValues\": false,
\"onlyDataRows\": false,
\"onlyDataCols\": false,
\"cellData\": true
}",
"storage": "{
\"enabled\": true,
\"folderName\": \"<string>\",
\"folderId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"
}",
"async": "false",
"structuredOutput": "{
\"schema\": {},
\"schemaPrompt\": \"<string>\",
\"effort\": false
}",
"schema": "{}",
"schemaPrompt": "<string>",
"customPrompt": "<string>",
"chunking": "<string>",
"chunkSize": "2",
"extractFigure": "false",
"figureDescription": "false",
"showImages": "false",
"returnHtml": "false",
"thinking": "false"
}
headers = {"x-api-key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('file', '<string>');
form.append('fileUrl', '<string>');
form.append('detectSelections', 'true');
form.append('extractionConfigId', '3c90c3cc-0d44-4b50-8888-8dd25736052a');
form.append('pages', '<string>');
form.append('forceUrl', 'false');
form.append('figureProcessing', '{
"description": false,
"showImages": false
}');
form.append('extensions', '{
"footnoteReferences": false,
"document_metadata": false,
"chunking": {
"chunkTypes": [],
"chunkSize": 2
},
"altOutputs": {
"wlbb": false,
"returnHtml": false,
"returnXml": false
}
}');
form.append('spreadsheet', '{
"includeHiddenRows": false,
"includeHiddenCols": false,
"includeHiddenSheets": false,
"useRawValues": false,
"onlyDataRows": false,
"onlyDataCols": false,
"cellData": true
}');
form.append('storage', '{
"enabled": true,
"folderName": "<string>",
"folderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}');
form.append('async', 'false');
form.append('structuredOutput', '{
"schema": {},
"schemaPrompt": "<string>",
"effort": false
}');
form.append('schema', '{}');
form.append('schemaPrompt', '<string>');
form.append('customPrompt', '<string>');
form.append('chunking', '<string>');
form.append('chunkSize', '2');
form.append('extractFigure', 'false');
form.append('figureDescription', 'false');
form.append('showImages', 'false');
form.append('returnHtml', 'false');
form.append('thinking', 'false');
const options = {method: 'POST', headers: {'x-api-key': '<api-key>'}};
options.body = form;
fetch('https://api.runpulse.com/extract_async', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.runpulse.com/extract_async",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileUrl\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"detectSelections\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"extractionConfigId\"\r\n\r\n3c90c3cc-0d44-4b50-8888-8dd25736052a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"pages\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"forceUrl\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"figureProcessing\"\r\n\r\n{\r\n \"description\": false,\r\n \"showImages\": false\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"extensions\"\r\n\r\n{\r\n \"footnoteReferences\": false,\r\n \"document_metadata\": false,\r\n \"chunking\": {\r\n \"chunkTypes\": [],\r\n \"chunkSize\": 2\r\n },\r\n \"altOutputs\": {\r\n \"wlbb\": false,\r\n \"returnHtml\": false,\r\n \"returnXml\": false\r\n }\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"spreadsheet\"\r\n\r\n{\r\n \"includeHiddenRows\": false,\r\n \"includeHiddenCols\": false,\r\n \"includeHiddenSheets\": false,\r\n \"useRawValues\": false,\r\n \"onlyDataRows\": false,\r\n \"onlyDataCols\": false,\r\n \"cellData\": true\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"storage\"\r\n\r\n{\r\n \"enabled\": true,\r\n \"folderName\": \"<string>\",\r\n \"folderId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"async\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"structuredOutput\"\r\n\r\n{\r\n \"schema\": {},\r\n \"schemaPrompt\": \"<string>\",\r\n \"effort\": false\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"schema\"\r\n\r\n{}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"schemaPrompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customPrompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"chunking\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"chunkSize\"\r\n\r\n2\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"extractFigure\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"figureDescription\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"showImages\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"returnHtml\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"thinking\"\r\n\r\nfalse\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.runpulse.com/extract_async"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileUrl\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"detectSelections\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"extractionConfigId\"\r\n\r\n3c90c3cc-0d44-4b50-8888-8dd25736052a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"pages\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"forceUrl\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"figureProcessing\"\r\n\r\n{\r\n \"description\": false,\r\n \"showImages\": false\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"extensions\"\r\n\r\n{\r\n \"footnoteReferences\": false,\r\n \"document_metadata\": false,\r\n \"chunking\": {\r\n \"chunkTypes\": [],\r\n \"chunkSize\": 2\r\n },\r\n \"altOutputs\": {\r\n \"wlbb\": false,\r\n \"returnHtml\": false,\r\n \"returnXml\": false\r\n }\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"spreadsheet\"\r\n\r\n{\r\n \"includeHiddenRows\": false,\r\n \"includeHiddenCols\": false,\r\n \"includeHiddenSheets\": false,\r\n \"useRawValues\": false,\r\n \"onlyDataRows\": false,\r\n \"onlyDataCols\": false,\r\n \"cellData\": true\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"storage\"\r\n\r\n{\r\n \"enabled\": true,\r\n \"folderName\": \"<string>\",\r\n \"folderId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"async\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"structuredOutput\"\r\n\r\n{\r\n \"schema\": {},\r\n \"schemaPrompt\": \"<string>\",\r\n \"effort\": false\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"schema\"\r\n\r\n{}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"schemaPrompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customPrompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"chunking\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"chunkSize\"\r\n\r\n2\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"extractFigure\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"figureDescription\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"showImages\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"returnHtml\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"thinking\"\r\n\r\nfalse\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.runpulse.com/extract_async")
.header("x-api-key", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileUrl\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"detectSelections\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"extractionConfigId\"\r\n\r\n3c90c3cc-0d44-4b50-8888-8dd25736052a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"pages\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"forceUrl\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"figureProcessing\"\r\n\r\n{\r\n \"description\": false,\r\n \"showImages\": false\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"extensions\"\r\n\r\n{\r\n \"footnoteReferences\": false,\r\n \"document_metadata\": false,\r\n \"chunking\": {\r\n \"chunkTypes\": [],\r\n \"chunkSize\": 2\r\n },\r\n \"altOutputs\": {\r\n \"wlbb\": false,\r\n \"returnHtml\": false,\r\n \"returnXml\": false\r\n }\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"spreadsheet\"\r\n\r\n{\r\n \"includeHiddenRows\": false,\r\n \"includeHiddenCols\": false,\r\n \"includeHiddenSheets\": false,\r\n \"useRawValues\": false,\r\n \"onlyDataRows\": false,\r\n \"onlyDataCols\": false,\r\n \"cellData\": true\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"storage\"\r\n\r\n{\r\n \"enabled\": true,\r\n \"folderName\": \"<string>\",\r\n \"folderId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"async\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"structuredOutput\"\r\n\r\n{\r\n \"schema\": {},\r\n \"schemaPrompt\": \"<string>\",\r\n \"effort\": false\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"schema\"\r\n\r\n{}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"schemaPrompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customPrompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"chunking\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"chunkSize\"\r\n\r\n2\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"extractFigure\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"figureDescription\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"showImages\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"returnHtml\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"thinking\"\r\n\r\nfalse\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.runpulse.com/extract_async")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"fileUrl\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"detectSelections\"\r\n\r\ntrue\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"extractionConfigId\"\r\n\r\n3c90c3cc-0d44-4b50-8888-8dd25736052a\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"pages\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"forceUrl\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"figureProcessing\"\r\n\r\n{\r\n \"description\": false,\r\n \"showImages\": false\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"extensions\"\r\n\r\n{\r\n \"footnoteReferences\": false,\r\n \"document_metadata\": false,\r\n \"chunking\": {\r\n \"chunkTypes\": [],\r\n \"chunkSize\": 2\r\n },\r\n \"altOutputs\": {\r\n \"wlbb\": false,\r\n \"returnHtml\": false,\r\n \"returnXml\": false\r\n }\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"spreadsheet\"\r\n\r\n{\r\n \"includeHiddenRows\": false,\r\n \"includeHiddenCols\": false,\r\n \"includeHiddenSheets\": false,\r\n \"useRawValues\": false,\r\n \"onlyDataRows\": false,\r\n \"onlyDataCols\": false,\r\n \"cellData\": true\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"storage\"\r\n\r\n{\r\n \"enabled\": true,\r\n \"folderName\": \"<string>\",\r\n \"folderId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"async\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"structuredOutput\"\r\n\r\n{\r\n \"schema\": {},\r\n \"schemaPrompt\": \"<string>\",\r\n \"effort\": false\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"schema\"\r\n\r\n{}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"schemaPrompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"customPrompt\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"chunking\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"chunkSize\"\r\n\r\n2\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"extractFigure\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"figureDescription\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"showImages\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"returnHtml\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"thinking\"\r\n\r\nfalse\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"job_id": "<string>",
"status": "pending",
"message": "<string>",
"queuedAt": "2023-11-07T05:31:56Z",
"credits_used": 123
}/extract with async: true instead.Overview
The asynchronous extraction endpoint accepts the same input parameters as the synchronous/extract endpoint but returns immediately with a job identifier. Use this endpoint for:
- Large documents that may take longer to process
- Batch processing workflows
- Non-blocking integrations
Migration
Replace calls to/extract_async with /extract and add async: true:
- POST /extract_async
- {"file_url": "https://example.com/doc.pdf"}
+ POST /extract
+ {"file_url": "https://example.com/doc.pdf", "async": true}
Request
Document Source
Provide the document using one of these methods:| Field | Type | Description |
|---|---|---|
file | binary | Document file to upload directly (multipart/form-data). |
file_url | string | Public or pre-signed URL that Pulse will download and extract. |
Extraction Options
| Field | Type | Default | Description |
|---|---|---|---|
model | string (enum) | default | Extraction model to use. One of default or pulse-ultra-2. pulse-ultra-2 uses Pulse’s vision-language model with built-in refinement, figure/chart extraction, and word-level bounding boxes. |
pages | string | - | Page range filter (1-indexed). Supports segments like 1-2 or mixed ranges like 1-2,5. Page 1 is the first page. |
figure_processing | object | - | Settings that control how figures in the document are processed. These affect the markdown output directly and do not produce additional output fields. See Figure Processing. |
extensions | object | - | Settings that enable additional processing or alternate output formats. Each enabled extension produces a corresponding result under response.extensions.*. See Extensions. |
spreadsheet | object | - | Settings for Excel/spreadsheet extraction. Controls hidden rows, columns, sheets, raw values, phantom-cell trimming, and whether table cell_data is included. Applies to .xlsx, .xlsm, and .xls files. See Spreadsheet Options. |
storage | object | - | Options for persisting extraction artifacts. See Storage Options. |
async | boolean | false | If true, returns immediately with a job_id for polling via GET /job/{jobId}. |
force_url | boolean | false | When true, return the complete extraction result as a URL even if it is small. Spreadsheet responses are URL-backed by default; set force_url: false to request inline spreadsheet output. URL delivery changes only the transport, not the result shape. |
structured_output | object | - | ⚠️ Deprecated — Use the /schema endpoint after extraction instead. Still works for backward compatibility. |
Figure Processing
Settings underfigure_processing control how figures (images, charts, diagrams) and embedded visuals are processed. Applies to both PDFs/images (figures detected from layout) and spreadsheets (charts and embedded images read directly from the workbook). Affects the markdown output and the bounding_boxes.Images[] array.
| Field | Type | Default | Description |
|---|---|---|---|
figure_processing.description | boolean | false | Generate descriptive captions for extracted visuals. Captions appear under bounding_boxes.Images[].description and inline in the markdown output. Applies to both detected charts and non-chart images. |
figure_processing.show_images | boolean | false | Return image URLs for extracted visuals. URLs appear under bounding_boxes.Images[].image_url and resolve to a Pulse-hosted PNG/JPEG served from GET /results/{jobId}/images/{filename}. Applies to both detected charts and non-chart images. |
show_images: true collects every embedded chart and image in the workbook and emits one entry per visual under bounding_boxes.Images, with chart-specific fields like chart_type, chart_title, and source_ranges populated. See Bounding Boxes for the full field list.Spreadsheet Options
Settings underspreadsheet control how Excel workbooks (.xlsx, .xlsm, .xls) are processed. By default, hidden rows, columns, and sheets are excluded from extraction output, cell values are rendered the way Excel displays them, and table cell metadata is included. Phantom-cell trimming is opt-in. Spreadsheet responses are returned as full-result URLs by default because workbook cell_data can make the payload large even for modest .xlsx files.
| Field | Type | Default | Description |
|---|---|---|---|
spreadsheet.include_hidden_rows | boolean | false | Include rows that are hidden in the Excel workbook. |
spreadsheet.include_hidden_cols | boolean | false | Include columns that are hidden in the Excel workbook. |
spreadsheet.include_hidden_sheets | boolean | false | Include sheets that are hidden in the Excel workbook. |
spreadsheet.use_raw_values | boolean | false | Emit the underlying numeric value for number cells instead of the Excel display-formatted text — e.g. 1201.67 rather than $1,202 when the cell uses a rounded currency format. Useful when downstream processing needs exact amounts (cent-level precision) rather than what the workbook shows visually. Percent-formatted cells and dates keep their display rendering. Does not apply to legacy .xls files. |
spreadsheet.only_data_rows | boolean | false | When true, trim trailing empty rows past the last cell carrying a value or formula. See Phantom-cell trimming below. |
spreadsheet.only_data_cols | boolean | false | When true, trim trailing empty columns past the last cell carrying a value or formula. Same rationale as only_data_rows. |
spreadsheet.cell_data | boolean | true | Include cell-level table metadata under bounding_boxes.Tables[].cell_data. Set to false to omit this metadata and reduce output size. |
includeHiddenRows, onlyDataRows, cellData) and snake_case (include_hidden_rows, only_data_rows, cell_data) formats.Phantom-cell trimming (only_data_rows / only_data_cols)
Excel files exported from claims systems, ERPs, and other automated pipelines routinely declare a “used range” that extends hundreds of thousands of rows past where the data actually ends. A typical case: a 57 MB workbook with only ~500 rows of real data, where the other ~1,000,000 rows are empty cells that exist only because they were once selected and styled. These phantom cells inflate file size by orders of magnitude and can exhaust parser memory on the extraction pipeline.
Set only_data_rows: true and only_data_cols: true to have Pulse scan each sheet once before parsing, find the largest row and column containing a value or formula, and ignore everything beyond that extent. Surviving cells keep their original A1 coordinates (e.g., a value at B7 in the source is still B7 in the output), so any citation or bounding box that references a specific cell remains stable. The trim only kicks in on large sheets (≥5 MB of XML per sheet), so small, well-formed workbooks pay no overhead either way.
Both flags default to false.
Pulse Ultra 2 Options
These options are available only whenmodel: pulse-ultra-2 is set. Passing any of them with the default model returns a 400 error listing the offending fields.
| Field | Type | Default | Description |
|---|---|---|---|
refine | boolean | false | Run a full-page OCR and formatting correction pass after extraction. Improves accuracy on dense layouts, numerical values, and table structure. Adds ~1–2s per page. Overridden by refine_options if both are provided. |
refine_options | object | - | Granular refinement targets. Takes precedence over the boolean refine flag. See below. |
refine_options.tables | boolean | false | Fix table cell values, structure, and headers against the source image. |
refine_options.text | boolean | false | Fix OCR errors, missing or extra content, and numerical accuracy (tables untouched). |
refine_options.formatting | boolean | false | Add strikethrough, italic, bold, super/subscript, and LaTeX formatting (tables untouched). |
extract_figure | boolean | false | Convert charts and data visualizations into HTML <table> blocks, wrapped in <figure-table> tags. Useful for financial decks, dashboards, and scientific charts. |
figure_description | boolean | false | Generate a 1–2 paragraph natural-language description of each picture, wrapped in <figure-description> tags. Combines well with extract_figure. |
detect_selections | boolean | true | Detect selected and unselected marks with a specialized selection-mark model. Improves accuracy on forms, checkboxes, radio buttons, handwritten checkmarks, X marks, and similar controls. Enabled by default for pulse-ultra-2; set to false to skip this pass. |
additional_prompt | string | "" | Extra context injected into the extraction prompt. Use to steer extraction toward a specific domain or attention focus. Max 4000 characters. |
custom_image_prompt | string | "" | Extra context appended to the prompt used by figure_description and extract_figure. Tunes image and chart interpretation. Max 2000 characters. |
custom_refine_prompt | string | "" | Extra context appended to the refinement prompt. Only applies when refine: true or refine_options is set. Max 2000 characters. |
Selection mark detection
Usedetect_selections: true with model: pulse-ultra-2 when a document contains forms, checkboxes, radio buttons, handwritten selection marks, or other marked-choice controls. Pulse runs a specialized detection pass for these marks so selected/unselected states are less likely to be missed or confused with nearby text, boxes, or handwriting. When available, the detected state is returned on the relevant bounding-box items as selected.
Markdown output additions
Whenextract_figure or figure_description is enabled, figures in response.markdown include additional tags:
<figure data-page="1">
<figure-table>...HTML table for the chart...</figure-table>
<figure-description>...1–2 paragraph description...</figure-description>
</figure>
refine (or refine_options) is set, markdown content is post-processed page-by-page; output is cleaner but typically grows ~1.5–3x in size for dense documents. No new tags are introduced.
Extensions
Settings underextensions enable additional processing passes or alternate output formats. Each enabled extension produces a corresponding output field under response.extensions.*. For example, enabling extensions.chunking produces response.extensions.chunking, and enabling extensions.alt_outputs.return_html produces response.extensions.alt_outputs.html.
| Field | Type | Default | Description |
|---|---|---|---|
extensions.document_metadata | boolean | false | Extract native properties and deterministic structure from the original file. Results appear under response.extensions.document_metadata. |
extensions.footnote_references | boolean | false | Link footnote markers to their corresponding footnote text. |
extensions.chunking | object | - | Chunking configuration. See below. |
extensions.chunking.chunk_types | string[] | - | List of chunking strategies: semantic, header, page, recursive. |
extensions.chunking.chunk_size | integer | - | Maximum characters per chunk. |
extensions.alt_outputs | object | - | Alternate output formats. See below. |
extensions.alt_outputs.wlbb | boolean | false | Enable word-level bounding boxes (PDF only). Results in response.extensions.alt_outputs.wlbb. |
extensions.alt_outputs.return_html | boolean | false | Include HTML representation. response.markdown is still present; HTML is at response.extensions.alt_outputs.html. |
extensions.alt_outputs.return_xml | boolean | false | Include XML representation (work in progress). |
Storage Options
Control whether extractions are saved to your extraction library:| Field | Type | Default | Description |
|---|---|---|---|
storage.enabled | boolean | true | Whether to persist extraction artifacts. Set to false for temporary extractions. |
storage.folder_name | string | - | Target folder name to save the extraction to. Creates the folder if it doesn’t exist. |
storage.folder_id | string (uuid) | - | Target folder ID to save the extraction to. Takes precedence over folder_name. |
Deprecated Fields
The following input fields are deprecated and will be removed in a future version. They are still accepted for backward compatibility.| Field | Replacement |
|---|---|
show_images | Use figure_processing.show_images |
chunking | Use extensions.chunking.chunk_types (array instead of comma-separated string) |
chunk_size | Use extensions.chunking.chunk_size |
return_html | Use extensions.alt_outputs.return_html |
structured_output | Use /schema endpoint after extraction. Pass extraction_id + schema_config. Accepts schema, schema_prompt, and effort. |
schema | Use /schema endpoint after extraction |
schema_prompt | Use /schema endpoint with schema_config.schema_prompt |
custom_prompt | No replacement |
thinking | No replacement |
warnings array directing you to the updated field names. See the latest documentation for details.Response
When you submit a document for async extraction, you’ll receive a response containing the job metadata:{
"job_id": "abc123-def456-ghi789",
"status": "pending",
"queuedAt": "2025-01-15T10:30:00Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
job_id | string | Unique identifier for the extraction job. Use this to poll for results with the Poll Job endpoint. |
status | string | Initial job status. Typically pending when first submitted. |
queuedAt | string | ISO 8601 timestamp indicating when the job was accepted. |
Retrieving Results
After submitting an async extraction, poll the job status endpoint to retrieve results:GET /job/{job_id}
Example Usage
Submit Async Extraction
import time
from pulse import Pulse
client = Pulse(api_key="YOUR_API_KEY")
# Submit async extraction
submission = client.extract_async(
file_url="https://platform.runpulse.com/api/examples/637e5678-30b1-45fa-acc4-877f2d636419/pdf"
)
print(f"Job ID: {submission.job_id}")
print(f"Status: {submission.status}")
# Poll for completion
job_id = submission.job_id
while True:
job_status = client.jobs.get_job(job_id=job_id)
print(f"Status: {job_status.status}")
if job_status.status == "completed":
print("Extraction complete!")
print(f"Result: {job_status.result}")
break
elif job_status.status in ["failed", "canceled"]:
print(f"Job ended: {job_status.status}")
if job_status.error:
print(f"Error: {job_status.error}")
break
time.sleep(2)
import { PulseClient } from 'pulse-ts-sdk';
const client = new PulseClient({
apiKey: 'YOUR_API_KEY'
});
// Submit async extraction
const submission = await client.extract({
fileUrl: "https://platform.runpulse.com/api/examples/637e5678-30b1-45fa-acc4-877f2d636419/pdf",
async: true
});
console.log(`Job ID: ${submission.job_id}`);
console.log(`Status: ${submission.status}`);
// Poll for completion
const jobId = submission.job_id;
while (true) {
const jobStatus = await client.jobs.getJob({ jobId });
console.log(`Status: ${jobStatus.status}`);
if (jobStatus.status === 'completed') {
console.log('Extraction complete!');
console.log(`Result: ${JSON.stringify(jobStatus.result)}`);
break;
} else if (jobStatus.status === 'failed' || jobStatus.status === 'canceled') {
console.log(`Job ended: ${jobStatus.status}`);
if (jobStatus.error) {
console.log(`Error: ${jobStatus.error}`);
}
break;
}
await new Promise(resolve => setTimeout(resolve, 2000));
}
# Submit async extraction with file upload
curl -X POST https://api.runpulse.com/extract_async \
-H "x-api-key: YOUR_API_KEY" \
-F "file=@document.pdf"
# Submit async extraction with URL
curl -X POST https://api.runpulse.com/extract_async \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"file_url": "https://platform.runpulse.com/api/examples/637e5678-30b1-45fa-acc4-877f2d636419/pdf"}'
# Response
# {"job_id": "abc123", "status": "pending", "queuedAt": "2025-01-15T10:30:00Z"}
# Poll for results
curl https://api.runpulse.com/job/abc123 \
-H "x-api-key: YOUR_API_KEY"
With Structured Output
schema = {
"type": "object",
"properties": {
"total": {"type": "number"},
"vendor": {"type": "string"}
}
}
submission = client.extract_async(
file_url="https://platform.runpulse.com/api/examples/637e5678-30b1-45fa-acc4-877f2d636419/pdf",
structured_output={
"schema": schema,
"schema_prompt": "Extract the invoice total"
}
)
const submission = await client.extract({
fileUrl: "https://platform.runpulse.com/api/examples/637e5678-30b1-45fa-acc4-877f2d636419/pdf",
async: true,
structuredOutput: {
schema: {
type: "object",
properties: {
total: { type: "number" },
vendor: { type: "string" }
}
},
schemaPrompt: "Extract the invoice total"
}
});
curl -X POST https://api.runpulse.com/extract_async \
-H "x-api-key: YOUR_API_KEY" \
-F "file=@invoice.pdf" \
-F 'structured_output={"schema": {"type": "object", "properties": {"total": {"type": "number"}}}, "schema_prompt": "Extract the invoice total"}'
Cancel a Job
# Cancel a running job
cancellation = client.jobs.cancel_job(job_id=job_id)
print(f"Cancelled: {cancellation.message}")
# Verify cancellation
status = client.jobs.get_job(job_id=job_id)
print(f"Status: {status.status}") # Should be "canceled"
// Cancel a running job
const cancellation = await client.jobs.cancelJob({ jobId });
console.log(`Cancelled: ${cancellation.message}`);
// Verify cancellation
const status = await client.jobs.getJob({ jobId });
console.log(`Status: ${status.status}`); // Should be "canceled"
# Cancel a job
curl -X DELETE https://api.runpulse.com/job/abc123 \
-H "x-api-key: YOUR_API_KEY"
Authorizations
Body
Input schema for extraction requests. Provide either file (direct upload) or fileUrl (remote URL).
Document to upload directly. Required unless fileUrl is provided.
Public or pre-signed URL that Pulse will download and extract. Required unless file is provided.
Extraction model to use. When set to pulse-ultra-2, routes the request through Pulse Ultra 2 (self-hosted VPC model) instead of the default cloud-based service. If omitted or set to default, the default model is used.
default, pulse-ultra-2 Pulse Ultra 2 only. Enables a specialized selection-mark detection pass that improves selected/unselected state accuracy for forms, checkboxes, radio buttons, handwritten checkmarks, X marks, and similar controls. Enabled by default when model is pulse-ultra-2; set to false to skip this pass. Passing true without model: pulse-ultra-2 returns a validation error.
UUID of a saved extraction configuration (a "preset"). When provided, the server loads the saved configuration and applies its options on top of any inline parameters supplied in this request. Inline parameters always take precedence over preset values for the same field. Saved configs are managed via the platform UI or the input_extractions admin endpoints.
Page range filter supporting segments such as 1-2 or mixed ranges like 1-2,5.
^[0-9]+(-[0-9]+)?(,[0-9]+(-[0-9]+)?)*$When true, return the complete extraction result as a URL even if it is small. Spreadsheet extractions use URL delivery by default; set force_url: false to request inline spreadsheet output. URL delivery changes only the transport, not the result shape.
Settings that control how figures and embedded visuals are processed. Applies to both PDFs/images (where figures are detected from layout) and spreadsheets (where charts and embedded images are read directly from the workbook). These options affect the markdown output and the bounding_boxes.Images[] array; they do not produce additional output fields elsewhere in the response.
Show child attributes
Show child attributes
Settings that enable additional processing passes or alternate output formats. Each enabled extension produces a corresponding output field under response.extensions.*.
Show child attributes
Show child attributes
Settings for Excel/spreadsheet extraction. Controls handling of hidden rows, columns, and sheets, whether numeric cells are rendered using their display format or underlying raw value, whether table cell metadata is captured, and optional trimming of empty phantom rows/columns past the last data-bearing cell. Applies to .xlsx, .xlsm, and .xls files. Accepts both camelCase and snake_case field names.
Show child attributes
Show child attributes
Options for persisting extraction artifacts. When enabled (default), artifacts are saved to storage and a database record is created.
Show child attributes
Show child attributes
If true, returns immediately with a job_id for polling via GET /job/{jobId}. Otherwise processes synchronously.
⚠️ DEPRECATED — Use the /schema endpoint after extraction instead. Pass the extraction_id from the extract response to /schema with your schema_config. This parameter still works for backward compatibility but will be removed in a future version.
Show child attributes
Show child attributes
(Deprecated) JSON schema describing structured data to extract. Use structuredOutput instead. Accepts either a JSON object or a stringified JSON representation.
(Deprecated) Natural language prompt for schema-guided extraction. Use structuredOutput.schemaPrompt instead.
(Deprecated) Custom instructions that augment the default extraction behaviour. Use figureProcessing or extensions instead.
⚠️ DEPRECATED — Use extensions.chunking.chunkTypes instead. Comma-separated list of chunking strategies to apply (for example semantic,header,page,recursive). Still accepted for backward compatibility.
⚠️ DEPRECATED — Use extensions.chunking.chunkSize instead. Override for maximum characters per chunk when chunking is enabled.
x >= 1⚠️ DEPRECATED — Toggle to enable figure extraction in results.
⚠️ DEPRECATED — Use figureProcessing.description instead. Toggle to generate descriptive captions for extracted figures.
⚠️ DEPRECATED — Use figureProcessing.showImages instead. Embed base64-encoded images inline in figure tags in the output. Increases response size.
⚠️ DEPRECATED — Use extensions.altOutputs.returnHtml instead. Whether to include HTML representation alongside markdown in the response.
(Deprecated) Enables expanded rationale output for debugging.
Response
Asynchronous extraction job accepted
Acknowledgement returned when a request is submitted for asynchronous processing. Poll GET /job/{job_id} to check status and retrieve results.
Identifier assigned to the asynchronous job.
Initial status reported by the server.
pending, processing, completed, failed, canceled Human-readable description of the accepted job.
Deprecated — Timestamp indicating when the job was accepted. Retained for backward compatibility. Use GET /job/{jobId} for timing details.
Number of credits consumed by this request. Only present when the organization has the credit billing system enabled.