{"openapi":"3.1.0","info":{"title":"FynePDF API","version":"1.0.0","description":"PDF tools for apps and agents: the same engines as fynepdf.com. Every error is RFC 9457 problem details; every response carries a Request-Id.","contact":{"name":"FynePDF","url":"https://fynepdf.com/developers","email":"support@fynepdf.com"}},"servers":[{"url":"https://api.fynepdf.com/v1"}],"externalDocs":{"url":"https://fynepdf.com/developers/docs"},"components":{"securitySchemes":{"ApiKey":{"type":"http","scheme":"bearer","bearerFormat":"fyne_live_… or fyne_test_…","description":"An API key from https://fynepdf.com/developers/dashboard."}},"schemas":{"ApiKeyInfo":{"type":"object","properties":{"object":{"type":"string","enum":["api_key"]},"id":{"type":"string"},"prefix":{"type":"string","example":"fyne_live_Ab12Cd34"},"mode":{"type":"string","enum":["live","test"]},"account":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"]},"limits":{"type":"object","properties":{"requests_per_minute":{"type":"integer"},"jobs_at_once":{"type":"integer"}},"required":["requests_per_minute","jobs_at_once"]}},"required":["object","id","prefix","mode","account","limits"]},"Problem":{"type":"object","properties":{"type":{"type":"string","example":"https://fynepdf.com/developers/docs/errors#invalid_api_key"},"title":{"type":"string","example":"Invalid API key"},"status":{"type":"integer","example":401},"detail":{"type":"string"},"code":{"type":"string","example":"invalid_api_key"},"request_id":{"type":"string","example":"req_8x2Lq0vYk3c1Tn9a"},"errors":{"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"message":{"type":"string"}},"required":["path","message"]}}},"required":["type","title","status","detail","code"],"description":"RFC 9457 problem details. Branch on `code`; show `detail` to people."},"Balance":{"type":"object","properties":{"object":{"type":"string","enum":["balance"]},"free":{"type":"object","properties":{"allowance":{"type":"integer"},"used":{"type":"integer"},"remaining":{"type":"integer"},"ai_cap":{"type":"integer"},"ai_used":{"type":"integer"},"ai_remaining":{"type":"integer"},"resets_at":{"type":"string","format":"date-time"}},"required":["allowance","used","remaining","ai_cap","ai_used","ai_remaining","resets_at"]},"paid":{"type":"integer"},"total":{"type":"integer"}},"required":["object","free","paid","total"]},"File":{"type":"object","properties":{"object":{"type":"string","enum":["file"]},"id":{"type":"string","example":"file_clx2y0k3f0000qz3c8x1y2z3a"},"filename":{"type":"string","example":"report.pdf"},"content_type":{"type":"string","example":"application/pdf"},"kind":{"type":"string","example":"pdf"},"bytes":{"type":["integer","null"]},"pages":{"type":["integer","null"]},"status":{"type":"string","enum":["pending","ready","deleted","expired"]},"source":{"type":"string","enum":["upload","url","multipart","job","library"]},"job_id":{"type":["string","null"]},"created_at":{"type":"string"},"expires_at":{"type":"string"},"download_url":{"type":["string","null"],"description":"A signed link valid for one hour; ask again for a fresh one."}},"required":["object","id","filename","content_type","kind","bytes","pages","status","source","job_id","created_at","expires_at","download_url"]},"Job":{"type":"object","properties":{"object":{"type":"string","enum":["job"]},"id":{"type":"string","example":"job_clx2y0k3f0000qz3c8x1y2z3a"},"status":{"type":"string","enum":["queued","running","succeeded","failed","canceled"],"description":"`queued` while the job waits for a free slot, `running` once its first step starts (`started_at` is set then)."},"mode":{"type":"string","enum":["live","test"]},"inputs":{"type":"array","items":{"type":"string"}},"steps":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"params":{"type":"object","additionalProperties":{}}},"required":["action","params"]}},"receipt":{"type":"object","properties":{"steps":{"type":"array","items":{"$ref":"#/components/schemas/ReceiptLine"}},"credits":{"type":"integer"},"credits_quoted":{"type":"integer"},"duration_ms":{"type":["integer","null"]}},"required":["steps","credits","credits_quoted","duration_ms"]},"outputs":{"type":"array","items":{"$ref":"#/components/schemas/File"}},"error":{"type":["object","null"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"step":{"type":"integer"},"retryable":{"type":"boolean"}},"required":["code","message"]},"metadata":{"type":"object","additionalProperties":{"type":"string"}},"webhook_url":{"type":["string","null"]},"created_at":{"type":"string"},"started_at":{"type":["string","null"]},"finished_at":{"type":["string","null"]}},"required":["object","id","status","mode","inputs","steps","receipt","outputs","error","metadata","webhook_url","created_at","started_at","finished_at"],"description":"A file and up to eight steps. A failed or canceled job is refunded in full: you pay only for jobs that succeed."},"ReceiptLine":{"type":"object","properties":{"step":{"type":"integer"},"action":{"type":"string"},"status":{"type":"string","enum":["succeeded","failed","skipped"]},"credits":{"type":"integer"},"pages_before":{"type":["integer","null"]},"pages_after":{"type":["integer","null"]},"bytes_before":{"type":["integer","null"]},"bytes_after":{"type":["integer","null"]},"duration_ms":{"type":"integer"},"target_met":{"type":"boolean"},"details":{"type":"object","additionalProperties":{},"description":"What the step found or proved (redact by text: occurrences found, and that none remain)."},"error":{"type":"string"}},"required":["step","action","status","credits","pages_before","pages_after","bytes_before","bytes_after","duration_ms"]},"JobRequest":{"type":"object","properties":{"inputs":{"type":"array","items":{"type":"string"},"maxItems":20,"default":[],"description":"File ids, in order.","example":["file_clx2y0k3f0000qz3c8x1y2z3a"]},"steps":{"type":"array","items":{"$ref":"#/components/schemas/Step"},"minItems":1,"maxItems":8},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the job to finish before answering (0 to 60). Finished jobs answer 200; others 202."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri","description":"An https URL told when the job finishes (Standard Webhooks signatures)."},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."}},"required":["steps"]},"Step":{"type":"object","properties":{"action":{"type":"string","example":"compress"},"params":{"type":"object","additionalProperties":{},"example":{"target_size_bytes":2000000}}},"required":["action"]},"Quote":{"type":"object","properties":{"object":{"type":"string","enum":["quote"]},"credits":{"type":"integer"},"estimate":{"type":"boolean","description":"True when pages are only known after converting (non-PDF inputs)."},"steps":{"type":"array","items":{"type":"object","properties":{"step":{"type":"integer"},"action":{"type":"string"},"credits":{"type":"integer"},"pages":{"type":["integer","null"]}},"required":["step","action","credits","pages"]}},"balance":{"type":"integer"}},"required":["object","credits","estimate","steps","balance"]}},"parameters":{}},"paths":{"/me":{"get":{"tags":["Account"],"summary":"The key you're calling with","description":"Which key and account a request runs as, and the limits that apply to it. Costs nothing.","security":[{"ApiKey":[]}],"responses":{"200":{"description":"The key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyInfo"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"getMe"}},"/balance":{"get":{"tags":["Account"],"summary":"Credits left","description":"The monthly free allowance (AI steps may use only part of it) and bought credits. Steps spend the free allowance first. Costs nothing.","security":[{"ApiKey":[]}],"responses":{"200":{"description":"Credits left","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balance"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"getBalance"}},"/files":{"post":{"tags":["Files"],"summary":"Add a file","description":"Three ways in:\n- `{filename, size}`: get an `upload_url`, then `PUT` the bytes to it (large files never pass through the API).\n- `{url}`: we fetch a public URL (redirects followed, private addresses refused).\n- `multipart/form-data` with a `file` field: up to 25 MB, ready at once.\nFiles are deleted after 24 hours, or sooner with `ttl_seconds` or DELETE.","security":[{"ApiKey":[]}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":255},"size":{"type":"integer","exclusiveMinimum":0},"content_type":{"type":"string","maxLength":120},"ttl_seconds":{"type":"integer","minimum":300,"maximum":86400}},"required":["filename","size"]},{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"},"filename":{"type":"string","minLength":1,"maxLength":255},"ttl_seconds":{"type":"integer","minimum":300,"maximum":86400}},"required":["url"]}]},"example":{"url":"https://example.com/report.pdf","filename":"report.pdf"}},"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"ttl_seconds":{"type":"string"}}}}}},"responses":{"201":{"description":"The file. For an upload URL: `upload_url` to PUT exactly `size` bytes to, valid 15 minutes.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/File"},{"type":"object","properties":{"upload_url":{"type":"string"},"upload_method":{"type":"string","enum":["PUT"]}}}]}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"Too large for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid request, or the URL couldn't be fetched","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"createFile"},"get":{"tags":["Files"],"summary":"List files","description":"The account's current files (not deleted or expired), newest first.","security":[{"ApiKey":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Files","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/File"}}},"required":["object","data"]}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"listFiles"}},"/files/{id}":{"get":{"tags":["Files"],"summary":"Get a file","description":"The file, with a fresh one-hour `download_url` when it's ready.","security":[{"ApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such file","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"getFile"},"delete":{"tags":["Files"],"summary":"Delete a file","description":"Deletes the bytes now, before their expiry.","security":[{"ApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The deleted file","content":{"application/json":{"schema":{"$ref":"#/components/schemas/File"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such file","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"deleteFile"}},"/files/{id}/content":{"get":{"tags":["Files"],"summary":"Download a file","description":"Redirects (302) to a fresh signed link. `curl -L` follows it.","security":[{"ApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"302":{"description":"Redirect to the bytes"},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such file","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Not uploaded yet","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"downloadFile"}},"/jobs":{"post":{"tags":["Jobs"],"summary":"Run a job","description":"Input files through up to eight steps; each step feeds the next. Send an `Idempotency-Key` header so a retry never runs twice. Set `wait` to get the finished job in the same call.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobRequest"},"example":{"inputs":["file_01jc8x4m2k9q7r3t5vwy6z"],"steps":[{"action":"compress","params":{"target_size_bytes":5000000}},{"action":"page_numbers","params":{"position":"bottom-right"}}],"wait":30,"webhook_url":"https://example.com/hooks/fynepdf","metadata":{"order_id":"A-1042"}}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"createJob"},"get":{"tags":["Jobs"],"summary":"List jobs","description":"The account's jobs, newest first.","security":[{"ApiKey":[]}],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100},"required":false,"name":"limit","in":"query"}],"responses":{"200":{"description":"Jobs","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"$ref":"#/components/schemas/Job"}}},"required":["object","data"]}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"listJobs"}},"/jobs/quote":{"post":{"tags":["Jobs"],"summary":"Price a job without running it","description":"Checks the steps against the files and returns the credits it would cost. Nothing runs, nothing is charged.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"inputs":{"type":"array","items":{"type":"string"},"maxItems":20,"default":[],"description":"File ids, in order.","example":["file_clx2y0k3f0000qz3c8x1y2z3a"]},"steps":{"type":"array","items":{"$ref":"#/components/schemas/Step"},"minItems":1,"maxItems":8}},"required":["steps"]},"example":{"inputs":["file_01jc8x4m2k9q7r3t5vwy6z"],"steps":[{"action":"compress","params":{"target_size_bytes":5000000}},{"action":"page_numbers","params":{"position":"bottom-right"}}]}}}},"responses":{"200":{"description":"The quote","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"quoteJob"}},"/jobs/{id}":{"get":{"tags":["Jobs"],"summary":"Get a job","description":"Status, the receipt (pages and sizes before and after each step), and the outputs with fresh download links. `?wait=` up to 60 s waits for it to finish.","security":[{"ApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":["integer","null"],"minimum":0,"maximum":60},"required":false,"name":"wait","in":"query"}],"responses":{"200":{"description":"The job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such job","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"getJob"}},"/jobs/{id}/cancel":{"post":{"tags":["Jobs"],"summary":"Cancel a job","description":"Stops before the next step (a running step finishes first). A canceled job is refunded in full.","security":[{"ApiKey":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"}],"responses":{"200":{"description":"The job","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"409":{"description":"Already finished","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"cancelJob"}},"/actions":{"get":{"tags":["Actions"],"summary":"What you can run","description":"Every action, with its parameters as JSON Schema and its credit price. Costs nothing.","security":[{"ApiKey":[]}],"responses":{"200":{"description":"Actions","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"type":"object","additionalProperties":{}}}},"required":["object","data"]}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"listActions"}},"/pdf/compress":{"post":{"tags":["Shortcuts"],"summary":"Compress PDF","description":"Make a PDF smaller, at a level or under a target size. The target is checked on the final file; the receipt says whether it was met.\n\nA one-step job (`compress`): 2 credits per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."},"level":{"type":"string","enum":["low","medium","high"]},"target_size_bytes":{"type":"integer","exclusiveMinimum":0}}},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","target_size_bytes":5000000}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfCompress"}},"/pdf/merge":{"post":{"tags":["Shortcuts"],"summary":"Merge PDFs","description":"Join PDFs into one, in the order given. Each file gets a bookmark with its name.\n\nA one-step job (`merge`): 1 credit per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."}}},"example":{"file_ids":["file_01jc8x4m2k9q7r3t5vwy6z","file_01jc8x5n7p2s4u6w8y0a1b"]}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfMerge"}},"/pdf/split":{"post":{"tags":["Shortcuts"],"summary":"Split PDF","description":"Split a PDF into parts, by page ranges or by a largest part size. Returns a ZIP, so it must be the last step.\n\nA one-step job (`split`): 1 credit per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."},"ranges":{"type":"array","items":{"type":"string","pattern":"^\\d+(-\\d+)?$"},"minItems":1,"maxItems":100},"max_part_bytes":{"type":"integer","exclusiveMinimum":0}}},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","ranges":["1-3","4-10"]}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfSplit"}},"/pdf/rotate":{"post":{"tags":["Shortcuts"],"summary":"Rotate pages","description":"Turn all pages, one page, or a range, by 90, 180 or 270 degrees clockwise.\n\nA one-step job (`rotate`): 1 credit per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."},"angle":{"anyOf":[{"type":"number","enum":[90]},{"type":"number","enum":[180]},{"type":"number","enum":[270]}]},"pages":{"type":"string","pattern":"^(all|\\d+|\\d+-\\d+)$"}},"required":["angle"]},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","angle":90,"pages":"all"}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfRotate"}},"/pdf/delete-pages":{"post":{"tags":["Shortcuts"],"summary":"Delete pages","description":"Remove the listed pages (1-based).\n\nA one-step job (`delete_pages`): 1 credit per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."},"pages":{"type":"array","items":{"type":"integer","exclusiveMinimum":0},"minItems":1,"maxItems":5000}},"required":["pages"]},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","pages":[2,5]}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfDeletePages"}},"/pdf/extract-pages":{"post":{"tags":["Shortcuts"],"summary":"Extract pages","description":"Keep only the listed pages (1-based), as one PDF.\n\nA one-step job (`extract_pages`): 1 credit per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."},"pages":{"type":"array","items":{"type":"integer","exclusiveMinimum":0},"minItems":1,"maxItems":5000}},"required":["pages"]},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","pages":[1,2,3]}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfExtractPages"}},"/pdf/reorder-pages":{"post":{"tags":["Shortcuts"],"summary":"Reorder pages","description":"Put pages in a new order: [3, 1, 2] makes page 3 first. Pages left out are dropped.\n\nA one-step job (`reorder_pages`): 1 credit per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."},"order":{"type":"array","items":{"type":"integer","exclusiveMinimum":0},"minItems":1,"maxItems":5000}},"required":["order"]},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","order":[3,1,2]}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfReorderPages"}},"/pdf/page-numbers":{"post":{"tags":["Shortcuts"],"summary":"Add page numbers","description":"Number the pages. format uses %d twice: \"Page %d of %d\".\n\nA one-step job (`page_numbers`): 1 credit per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."},"format":{"type":"string","maxLength":60},"position":{"type":"string","enum":["top-left","top-center","top-right","bottom-left","bottom-center","bottom-right"]},"size":{"type":"number","minimum":4,"maximum":72},"start_number":{"type":"integer","minimum":1},"skip_cover_page":{"type":"boolean"},"font":{"type":"string","enum":["Helvetica","Times-Roman","Courier"]},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"opacity":{"type":"number","minimum":0,"maximum":1}}},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","format":"Page %d of %d","position":"bottom-center"}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfPageNumbers"}},"/pdf/watermark":{"post":{"tags":["Shortcuts"],"summary":"Add a text watermark","description":"Stamp text across every page.\n\nA one-step job (`watermark`): 1 credit per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."},"text":{"type":"string","minLength":1,"maxLength":200},"size":{"type":"number","minimum":6,"maximum":300},"opacity":{"type":"number","minimum":0,"maximum":1},"rotation":{"type":"number","minimum":-360,"maximum":360},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}},"required":["text"]},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","text":"CONFIDENTIAL","opacity":0.2,"rotation":45}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfWatermark"}},"/pdf/grayscale":{"post":{"tags":["Shortcuts"],"summary":"Convert to gray","description":"Turn every color in the PDF to shades of gray.\n\nA one-step job (`grayscale`): 1 credit per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."}}},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z"}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfGrayscale"}},"/pdf/protect":{"post":{"tags":["Shortcuts"],"summary":"Add a password","description":"Lock the PDF with a password needed to open it.\n\nA one-step job (`protect`): 1 credit per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."},"password":{"type":"string","minLength":1,"maxLength":128}},"required":["password"]},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","password":"correct-horse-battery"}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfProtect"}},"/pdf/unlock":{"post":{"tags":["Shortcuts"],"summary":"Remove a password","description":"Open a locked PDF with its password and save it without one.\n\nA one-step job (`unlock`): 1 credit per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."},"password":{"type":"string","minLength":1,"maxLength":128}},"required":["password"]},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","password":"the-current-password"}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfUnlock"}},"/pdf/flatten":{"post":{"tags":["Shortcuts"],"summary":"Flatten forms and annotations","description":"Burn form fields and annotations into the page so they can't be changed.\n\nA one-step job (`flatten`): 1 credit per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."}}},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z"}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfFlatten"}},"/pdf/repair":{"post":{"tags":["Shortcuts"],"summary":"Repair PDF","description":"Rebuild a damaged PDF's structure so it opens again.\n\nA one-step job (`repair`): 1 credit per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."}}},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z"}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfRepair"}},"/pdf/crop":{"post":{"tags":["Shortcuts"],"summary":"Crop pages","description":"Keep a rectangle of every page: x and y of its top-left corner, then width and height, in PDF points.\n\nA one-step job (`crop`): 1 credit per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."},"x":{"type":"number","minimum":0},"y":{"type":"number","minimum":0},"width":{"type":"number","exclusiveMinimum":0},"height":{"type":"number","exclusiveMinimum":0}},"required":["x","y","width","height"]},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","x":36,"y":36,"width":540,"height":720}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfCrop"}},"/pdf/n-up":{"post":{"tags":["Shortcuts"],"summary":"Pages per sheet","description":"Put 2, 4, 6, 8, 9 or 16 pages on each sheet, or lay pages out as a booklet.\n\nA one-step job (`n_up`): 1 credit per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."},"n":{"type":"integer"},"booklet":{"type":"boolean"}},"required":["n"]},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","n":2}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfNUp"}},"/pdf/to-pdfa":{"post":{"tags":["Shortcuts"],"summary":"Convert to PDF/A","description":"Make an archival PDF/A file (level 1b, 2b or 3b). 2b by default.\n\nA one-step job (`to_pdfa`): 2 credits per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."},"version":{"type":"string","enum":["1","2","3"]}}},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","version":"2"}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfToPdfa"}},"/pdf/ocr":{"post":{"tags":["Shortcuts"],"summary":"OCR: make scans searchable","description":"Add a text layer to scanned pages so they can be searched and copied.\n\nA one-step job (`ocr`): 1 credit per page. Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."}}},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z"}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfOcr"}},"/pdf/pdf-to-word":{"post":{"tags":["Shortcuts"],"summary":"PDF to Word","description":"An editable .docx that keeps the layout. Ends the job.\n\nA one-step job (`pdf_to_word`): 3 credits per 50 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."}}},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z"}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfPdfToWord"}},"/pdf/pdf-to-markdown":{"post":{"tags":["Shortcuts"],"summary":"PDF to Markdown","description":"The text as Markdown, for pipelines and models. Ends the job.\n\nA one-step job (`pdf_to_markdown`): 2 credits per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."}}},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z"}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfPdfToMarkdown"}},"/pdf/pdf-to-images":{"post":{"tags":["Shortcuts"],"summary":"PDF to images","description":"Every page as a PNG or JPEG, in a ZIP. Ends the job.\n\nA one-step job (`pdf_to_images`): 2 credits per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."},"format":{"type":"string","enum":["png","jpg"]},"dpi":{"type":"integer","minimum":36,"maximum":300}}},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","format":"png","dpi":150}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfPdfToImages"}},"/pdf/pdf-to-epub":{"post":{"tags":["Shortcuts"],"summary":"PDF to EPUB","description":"A reflowable e-book. Ends the job.\n\nA one-step job (`pdf_to_epub`): 2 credits per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."}}},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z"}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfPdfToEpub"}},"/pdf/office-to-pdf":{"post":{"tags":["Shortcuts"],"summary":"Word, Excel or PowerPoint to PDF","description":"Convert .docx, .doc, .odt, .rtf, .xlsx, .xls, .ods, .pptx, .ppt or .odp to PDF. First step only.\n\nA one-step job (`office_to_pdf`): 3 credits per 50 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."}}},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z"}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfOfficeToPdf"}},"/pdf/image-to-pdf":{"post":{"tags":["Shortcuts"],"summary":"Images to PDF","description":"One page per image, in the order given (JPEG, PNG, WebP, HEIC, GIF, BMP, TIFF). First step only.\n\nA one-step job (`image_to_pdf`): 2 credits per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."},"page_size":{"type":"string","enum":["fit","A4","US Letter"]},"orientation":{"type":"string","enum":["auto","portrait","landscape"]},"margin":{"type":"number","minimum":0,"maximum":144}}},"example":{"file_ids":["file_01jc8x4m2k9q7r3t5vwy6z","file_01jc8x5n7p2s4u6w8y0a1b"],"page_size":"A4","orientation":"auto"}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfImageToPdf"}},"/pdf/epub-to-pdf":{"post":{"tags":["Shortcuts"],"summary":"EPUB to PDF","description":"Lay an e-book out as a PDF. First step only.\n\nA one-step job (`epub_to_pdf`): 2 credits per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."}}},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z"}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfEpubToPdf"}},"/pdf/html-to-pdf":{"post":{"tags":["Shortcuts"],"summary":"Web page or HTML to PDF","description":"Render a public web page, or HTML you send, to PDF. Takes no input file, so it is the first step of a job with no inputs.\n\nA one-step job (`html_to_pdf`): 3 credits per 50 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."},"url":{"type":"string","maxLength":2000,"format":"uri"},"html":{"type":"string","minLength":1,"maxLength":2000000},"layout":{"type":"string","enum":["desktop","tablet","mobile"]},"margin":{"type":"string","enum":["no","small","big"]}}},"example":{"url":"https://example.com","layout":"desktop"}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfHtmlToPdf"}},"/pdf/create-pdf":{"post":{"tags":["Shortcuts"],"summary":"Create a PDF from Markdown, HTML or data","description":"Write the content, get a well-set PDF: Markdown or HTML, a template (plain, report, invoice, letter, resume) in a quiet or classic style, page size, margins, header, footer and page numbers. Or send an invoice's, resume's or letter's fields as data and we lay it out; an invoice is added up and checked. Takes no input file.\n\nA one-step job (`create_pdf`): 2 credits per 20 pages made (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."},"markdown":{"type":"string","minLength":1,"maxLength":1000000},"html":{"type":"string","minLength":1,"maxLength":2000000},"data":{"anyOf":[{"type":"object","properties":{"heading":{"type":"string","maxLength":60,"description":"Printed at the top. Default \"Invoice\"; e.g. \"Tax invoice\", \"Quote\"."},"invoice_number":{"type":"string","maxLength":100},"issue_date":{"type":"string","maxLength":60,"description":"Printed as given."},"due_date":{"type":"string","maxLength":60},"currency":{"type":"string","maxLength":12,"description":"An ISO code (\"USD\", \"NPR\") for proper formatting, or a symbol (\"Rs.\")."},"locale":{"type":"string","maxLength":20,"description":"Number format, e.g. \"en-IN\" for 1,00,000.00. Default \"en-US\"."},"vendor":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"address":{"type":"string","maxLength":1000,"description":"Lines separated by newlines."},"tax_id":{"type":"string","maxLength":100},"email":{"type":"string","maxLength":200},"phone":{"type":"string","maxLength":100},"logo_url":{"type":"string","maxLength":2000,"format":"uri","description":"https image, top left."}}},"customer":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"address":{"type":"string","maxLength":1000,"description":"Lines separated by newlines."},"tax_id":{"type":"string","maxLength":100},"email":{"type":"string","maxLength":200},"phone":{"type":"string","maxLength":100}}},"line_items":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string","maxLength":1000},"quantity":{"anyOf":[{"type":"number"},{"type":"string","maxLength":40,"pattern":"\\d"}],"description":"A number, or text as printed (\"1,250.00\")."},"unit_price":{"anyOf":[{"type":"number"},{"type":"string","maxLength":40,"pattern":"\\d"}],"description":"A number, or text as printed (\"1,250.00\")."},"amount":{"anyOf":[{"type":"number"},{"type":"string","maxLength":40,"pattern":"\\d"}],"description":"Left out: quantity × unit_price."}},"required":["description"]},"minItems":1,"maxItems":500},"subtotal":{"anyOf":[{"type":"number"},{"type":"string","maxLength":40,"pattern":"\\d"}],"description":"Left out: the lines added up."},"discount":{"anyOf":[{"type":"number"},{"type":"string","maxLength":40,"pattern":"\\d"}],"description":"Taken off the subtotal."},"tax_rate":{"type":"number","minimum":0,"maximum":100,"description":"Percent, e.g. 13 for 13%."},"tax_label":{"type":"string","maxLength":40,"description":"Default \"Tax\"; e.g. \"VAT 13%\"."},"tax":{"anyOf":[{"type":"number"},{"type":"string","maxLength":40,"pattern":"\\d"}],"description":"Left out: tax_rate of the subtotal after discount."},"shipping":{"anyOf":[{"type":"number"},{"type":"string","maxLength":40,"pattern":"\\d"}],"description":"A number, or text as printed (\"1,250.00\")."},"total":{"anyOf":[{"type":"number"},{"type":"string","maxLength":40,"pattern":"\\d"}],"description":"Left out: subtotal − discount + tax + shipping."},"amount_paid":{"anyOf":[{"type":"number"},{"type":"string","maxLength":40,"pattern":"\\d"}],"description":"Prints a balance due."},"payment_details":{"type":"string","maxLength":2000,"description":"Bank or payment instructions."},"notes":{"type":"string","maxLength":4000}},"required":["line_items"]},{"type":"object","properties":{"name":{"type":"string","maxLength":120},"headline":{"type":"string","maxLength":200},"contact":{"type":"array","items":{"type":"string","maxLength":200},"maxItems":8,"description":"Email, phone, city, links: one line, in order."},"summary":{"type":"string","maxLength":3000},"experience":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","maxLength":200},"subtitle":{"type":"string","maxLength":200,"description":"Organization, school, issuer."},"location":{"type":"string","maxLength":120},"start":{"type":"string","maxLength":40},"end":{"type":"string","maxLength":40,"description":"\"Present\" for a current one."},"text":{"type":"string","maxLength":2000},"bullets":{"type":"array","items":{"type":"string","maxLength":600},"maxItems":20}},"required":["title"]},"maxItems":40},"education":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","maxLength":200},"subtitle":{"type":"string","maxLength":200,"description":"Organization, school, issuer."},"location":{"type":"string","maxLength":120},"start":{"type":"string","maxLength":40},"end":{"type":"string","maxLength":40,"description":"\"Present\" for a current one."},"text":{"type":"string","maxLength":2000},"bullets":{"type":"array","items":{"type":"string","maxLength":600},"maxItems":20}},"required":["title"]},"maxItems":20},"skills":{"anyOf":[{"type":"array","items":{"type":"string","maxLength":80},"maxItems":80},{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","maxLength":80},"items":{"type":"array","items":{"type":"string","maxLength":80},"maxItems":40}},"required":["label","items"]},"maxItems":20}],"description":"A list, or groups: [{ \"label\": \"Languages\", \"items\": [\"Nepali\", \"English\"] }]."},"sections":{"type":"array","items":{"type":"object","properties":{"heading":{"type":"string","maxLength":80},"entries":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","maxLength":200},"subtitle":{"type":"string","maxLength":200,"description":"Organization, school, issuer."},"location":{"type":"string","maxLength":120},"start":{"type":"string","maxLength":40},"end":{"type":"string","maxLength":40,"description":"\"Present\" for a current one."},"text":{"type":"string","maxLength":2000},"bullets":{"type":"array","items":{"type":"string","maxLength":600},"maxItems":20}},"required":["title"]},"maxItems":40}},"required":["heading","entries"]},"maxItems":10,"description":"More sections: projects, certifications, awards."}},"required":["name"]},{"type":"object","properties":{"sender":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"address":{"type":"string","maxLength":1000,"description":"Lines separated by newlines."},"tax_id":{"type":"string","maxLength":100},"email":{"type":"string","maxLength":200},"phone":{"type":"string","maxLength":100}}},"recipient":{"type":"object","properties":{"name":{"type":"string","maxLength":200},"address":{"type":"string","maxLength":1000,"description":"Lines separated by newlines."},"tax_id":{"type":"string","maxLength":100},"email":{"type":"string","maxLength":200},"phone":{"type":"string","maxLength":100}}},"date":{"type":"string","maxLength":60},"reference":{"type":"string","maxLength":120},"subject":{"type":"string","maxLength":300},"greeting":{"type":"string","maxLength":200,"description":"\"Dear Ms Rai,\""},"body":{"type":"string","minLength":1,"maxLength":100000,"description":"Markdown; a blank line starts a paragraph."},"closing":{"type":"string","maxLength":100,"description":"\"Yours sincerely,\""},"signature_name":{"type":"string","maxLength":120},"signature_title":{"type":"string","maxLength":200}},"required":["body"]}],"description":"Instead of markdown/html: the fields of an invoice, resume or letter (set template to match). We lay it out; for an invoice we also add up the lines, tax and total and report anything that doesn't add up."},"template":{"type":"string","enum":["plain","report","invoice","letter","resume"]},"style":{"type":"string","enum":["quiet","classic"]},"title":{"type":"string","maxLength":200},"page_size":{"type":"string","enum":["A4","Letter"]},"margin":{"type":"string","enum":["none","small","normal","wide"]},"header":{"type":"string","maxLength":200},"footer":{"type":"string","maxLength":200},"page_numbers":{"type":"boolean"}}},"example":{"template":"invoice","data":{"invoice_number":"INV-104","currency":"USD","customer":{"name":"Acme Ltd"},"line_items":[{"description":"Consulting","quantity":3,"unit_price":120}],"tax_rate":10}}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfCreatePdf"}},"/pdf/redact":{"post":{"tags":["Shortcuts"],"summary":"Redact","description":"Remove content for real, not just cover it: rectangles you give (areas), or every occurrence of text you name (text). Text redaction is checked on the result: if any of it can still be found, the step fails and nothing is returned.\n\nA one-step job (`redact`): 1 credit per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."},"areas":{"type":"array","items":{"type":"object","properties":{"page":{"type":"integer","exclusiveMinimum":0},"x":{"type":"number","minimum":0},"y":{"type":"number","minimum":0},"width":{"type":"number","exclusiveMinimum":0},"height":{"type":"number","exclusiveMinimum":0}},"required":["page","x","y","width","height"]},"maxItems":5000},"text":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200},"minItems":1,"maxItems":500},"match_case":{"type":"boolean"},"remove_metadata":{"type":"boolean"}}},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","text":["Jane Doe","555-0142"]}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfRedact"}},"/pdf/sign":{"post":{"tags":["Shortcuts"],"summary":"Sign","description":"Stamp a signature image (PNG or JPEG, uploaded as a file) on a page: at a named spot, or at x and y in points from the top-left corner. Width in points; the height follows the image.\n\nA one-step job (`sign`): 1 credit per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."},"signature_file_id":{"type":"string","pattern":"^file_"},"page":{"anyOf":[{"type":"integer","exclusiveMinimum":0},{"type":"string","enum":["first","last","all"]}]},"position":{"type":"string","enum":["bottom-right","bottom-center","bottom-left","top-right","top-left"]},"x":{"type":"number","minimum":0},"y":{"type":"number","minimum":0},"width":{"type":"number","minimum":20,"maximum":600}},"required":["signature_file_id"]},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","signature_file_id":"file_01jc8x6r9t1v3x5z7b9c2d","page":"last","position":"bottom-right"}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfSign"}},"/pdf/metadata":{"post":{"tags":["Shortcuts"],"summary":"Edit or remove document properties","description":"Set the title, author, subject and keywords, or remove every property.\n\nA one-step job (`metadata`): 1 credit per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."},"remove":{"type":"boolean"},"title":{"type":"string","maxLength":1000},"author":{"type":"string","maxLength":1000},"subject":{"type":"string","maxLength":1000},"keywords":{"type":"string","maxLength":1000}}},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","title":"Q3 report","author":"Finance team"}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfMetadata"}},"/pdf/bookmarks":{"post":{"tags":["Shortcuts"],"summary":"Set bookmarks","description":"Replace the bookmarks (outline) with your own: a title and a page each, nested by level (0 = top).\n\nA one-step job (`bookmarks`): 1 credit per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."},"items":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":1000},"page":{"type":"integer","exclusiveMinimum":0},"level":{"type":"integer","minimum":0,"maximum":10}},"required":["title","page"]},"maxItems":2000}},"required":["items"]},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","items":[{"title":"Summary","page":1},{"title":"Figures","page":4,"level":1}]}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfBookmarks"}},"/pdf/pdf-to-excel":{"post":{"tags":["Shortcuts"],"summary":"PDF to Excel","description":"Tables to a spreadsheet. mode tables: detected from the page, no AI. mode ai: a model reads the tables (scans too). mode statement: bank statements as one checked sheet, totals compared with the statement's own. Ends the job.\n\nA one-step job (`pdf_to_excel`): 3 credits per 50 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."},"mode":{"type":"string","enum":["tables","ai","statement"]},"format":{"type":"string","enum":["xlsx","csv"]},"instructions":{"type":"string","maxLength":500}}},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","mode":"tables","format":"xlsx"}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfPdfToExcel"}},"/pdf/extract-images":{"post":{"tags":["Shortcuts"],"summary":"Extract images","description":"Every image in the PDF, at its own resolution, in a ZIP. Ends the job.\n\nA one-step job (`extract_images`): 2 credits per 100 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."}}},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z"}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfExtractImages"}},"/pdf/pdf-to-latex":{"post":{"tags":["Shortcuts"],"summary":"PDF to LaTeX","description":"A .tex file (zipped with an images folder when the PDF has pictures). Ends the job.\n\nA one-step job (`pdf_to_latex`): 3 credits per 50 pages (started). Waits up to 30 s for the result by default.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","description":"The input file."},"file_ids":{"type":"array","items":{"type":"string"},"maxItems":20,"description":"Input files, for actions that take several (merge, image_to_pdf)."},"wait":{"type":"integer","minimum":0,"maximum":60,"description":"Seconds to wait for the result (default 30)."},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."},"format":{"type":"string","enum":["latex","tikz"]}}},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","format":"latex"}}}},"responses":{"200":{"description":"The job finished within `wait`","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"202":{"description":"The job is queued or running: poll GET /v1/jobs/{id} or take the webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits for the quote","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"An input file doesn't exist","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid steps or parameters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"pdfPdfToLatex"}},"/ai/ask":{"post":{"tags":["AI"],"summary":"Ask a PDF a question","description":"An answer from the document only, with page citations. Every quote is checked against the page text; `verified: false` marks one that couldn't be found. Price: 2 credits for up to 10 pages read, +1 per further 10.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string"},"question":{"type":"string","minLength":1,"maxLength":2000}},"required":["file_id","question"]},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","question":"What is the notice period in this contract?"}}}},"responses":{"200":{"description":"The answer","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["answer"]},"answer":{"type":"string"},"found":{"type":"boolean"},"citations":{"type":"array","items":{"type":"object","properties":{"page":{"type":"integer"},"quote":{"type":"string"},"verified":{"type":["boolean","null"],"description":"True when the quote was found on that page; null for scans."}},"required":["page","quote","verified"]}},"pages_read":{"type":"array","items":{"type":"integer"}},"credits":{"type":"integer"},"test":{"type":"boolean"}},"required":["object","answer","found","citations","pages_read","credits"]}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such file","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"More pages than this key's AI page limit","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid request, or the document can't answer it","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"The model didn't answer; nothing was charged","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Free AI paused for the month","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"askPdf"}},"/ai/summarize":{"post":{"tags":["AI"],"summary":"Summarize a PDF","description":"A plain summary and key points, each with the pages it comes from. Priced like ask.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string"},"length":{"type":"string","enum":["short","medium","long"]},"focus":{"type":"string","maxLength":500}},"required":["file_id"]},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","length":"short","focus":"risks and deadlines"}}}},"responses":{"200":{"description":"The summary","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["summary"]},"summary":{"type":"string"},"key_points":{"type":"array","items":{"type":"object","properties":{"text":{"type":"string"},"pages":{"type":"array","items":{"type":"integer"}}},"required":["text","pages"]}},"pages_read":{"type":"array","items":{"type":"integer"}},"credits":{"type":"integer"},"test":{"type":"boolean"}},"required":["object","summary","key_points","pages_read","credits"]}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such file","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"More pages than this key's AI page limit","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid request, or the document can't answer it","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"The model didn't answer; nothing was charged","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Free AI paused for the month","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"summarizePdf"}},"/ai/extract":{"post":{"tags":["AI"],"summary":"Extract data from a PDF","description":"Structured data, checked in code where it can be:\n- `invoice`: numbers, dates, parties, lines and totals; lines, subtotal, tax and total are added up and compared.\n- `statement`: a bank statement's transactions; totals and balances compared with the statement's own figures.\n- `tables`: every table, cell by cell, with its page.\n- `schema`: your own JSON Schema (an object, up to 20 KB).\n`unverified` lists values that couldn't be found in the document's text. Price: 2 credits per page read.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string"},"type":{"type":"string","enum":["invoice","statement","tables","schema"]},"schema":{"type":"object","additionalProperties":{},"description":"For type schema: a JSON Schema object."},"instructions":{"type":"string","maxLength":1000}},"required":["file_id","type"]},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","type":"invoice"}}}},"responses":{"200":{"description":"The data and its checks","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["extraction"]},"type":{"type":"string"},"data":{},"checks":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"ok":{"type":"boolean"},"detail":{"type":"string"}},"required":["name","ok","detail"]}},"unverified":{"type":"array","items":{"type":"string"}},"pages_read":{"type":"array","items":{"type":"integer"}},"credits":{"type":"integer"},"test":{"type":"boolean"}},"required":["object","type","checks","unverified","pages_read","credits"]}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such file","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"More pages than this key's AI page limit","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid request, or the document can't answer it","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"The model didn't answer; nothing was charged","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Free AI paused for the month","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"extractData"}},"/ai/redact-find":{"post":{"tags":["AI"],"summary":"Find what to redact","description":"Say what to hide (\"names, emails and account numbers\"); code searches the text and the model only plans the search and spots names. Returns every match by page, and a ready `redact` step that removes them (and proves it). Price: 2 credits + 1 per 2 pages.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string"},"request":{"type":"string","minLength":1,"maxLength":1000}},"required":["file_id","request"]},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","request":"every person's name and phone number"}}}},"responses":{"200":{"description":"Matches","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["redaction_matches"]},"matches":{"type":"array","items":{"type":"object","properties":{"page":{"type":"integer"},"text":{"type":"string"},"reason":{"type":["string","null"]}},"required":["page","text","reason"]}},"next_step":{"type":["object","null"],"properties":{"action":{"type":"string","enum":["redact"]},"params":{"type":"object","properties":{"text":{"type":"array","items":{"type":"string"}}},"required":["text"]}},"required":["action","params"]},"credits":{"type":"integer"},"test":{"type":"boolean"}},"required":["object","matches","next_step","credits"]}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such file","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"More pages than this key's AI page limit","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid request, or the document can't answer it","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"The model didn't answer; nothing was charged","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Free AI paused for the month","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"findRedactions"}},"/ai/edit":{"post":{"tags":["AI"],"summary":"Edit a PDF by instruction","description":"\"Remove the blank pages, number the rest and make it PDF/A\": the model plans steps from the action catalog; code checks the plan exactly like a job. `run: true` starts it as a job (its steps are priced as usual). Planning is priced like ask; a plan that can't run costs nothing.","security":[{"ApiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string"},"instruction":{"type":"string","minLength":1,"maxLength":2000},"run":{"type":"boolean"},"wait":{"type":"integer","minimum":0,"maximum":60},"webhook_url":{"type":"string","maxLength":2000,"format":"uri"},"metadata":{"type":"object","additionalProperties":{"type":"string","maxLength":500},"description":"Your own keys and values, returned on the job and in webhooks."}},"required":["file_id","instruction"]},"example":{"file_id":"file_01jc8x4m2k9q7r3t5vwy6z","instruction":"Remove the blank pages and add page numbers at the bottom","run":true}}}},"responses":{"200":{"description":"The plan, and the job if it ran","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"type":"string","enum":["edit_plan"]},"explanation":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"params":{"type":"object","additionalProperties":{}}},"required":["action","params"]}},"credits":{"type":"integer"},"job":{"allOf":[{"$ref":"#/components/schemas/Job"},{"type":["object","null"]}]},"test":{"type":"boolean"}},"required":["object","explanation","steps","credits","job"]}}}},"401":{"description":"Missing, invalid, revoked or expired API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"402":{"description":"Not enough credits","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"404":{"description":"No such file","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"413":{"description":"More pages than this key's AI page limit","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"422":{"description":"Invalid request, or the document can't answer it","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"429":{"description":"Rate limit reached for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"502":{"description":"The model didn't answer; nothing was charged","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"503":{"description":"Free AI paused for the month","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"operationId":"editPdf"}}},"webhooks":{},"tags":[{"name":"Account","description":"The key you're calling with, and the credits left on its account."},{"name":"Files","description":"Every job works on files you add first: by upload URL, by public URL, or in the request body. Files and results are deleted after 24 hours."},{"name":"Jobs","description":"A job runs one or more steps on your files and returns a receipt: what each step did and what it cost. Wait for it in the request, poll it, or get a webhook."},{"name":"Actions","description":"The catalog of steps a job can run, with their parameters and prices."},{"name":"Shortcuts","description":"One action as one call: POST /v1/pdf/<action> with the file and the action's parameters. The same as a one-step job."},{"name":"AI","description":"Questions, summaries, data extraction, redaction finding and edits by instruction. Answers cite their pages; extracted invoices are checked by arithmetic."}]}