@llamaindex/llama-cloud 1.8.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/README.md +10 -8
  3. package/client.d.mts +4 -6
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +4 -6
  6. package/client.d.ts.map +1 -1
  7. package/client.js +7 -6
  8. package/client.js.map +1 -1
  9. package/client.mjs +7 -6
  10. package/client.mjs.map +1 -1
  11. package/core/pagination.d.mts +0 -23
  12. package/core/pagination.d.mts.map +1 -1
  13. package/core/pagination.d.ts +0 -23
  14. package/core/pagination.d.ts.map +1 -1
  15. package/core/pagination.js +1 -32
  16. package/core/pagination.js.map +1 -1
  17. package/core/pagination.mjs +0 -30
  18. package/core/pagination.mjs.map +1 -1
  19. package/package.json +12 -1
  20. package/resources/beta/batch/batch.d.mts +55 -30
  21. package/resources/beta/batch/batch.d.mts.map +1 -1
  22. package/resources/beta/batch/batch.d.ts +55 -30
  23. package/resources/beta/batch/batch.d.ts.map +1 -1
  24. package/resources/beta/batch/batch.js +14 -11
  25. package/resources/beta/batch/batch.js.map +1 -1
  26. package/resources/beta/batch/batch.mjs +14 -11
  27. package/resources/beta/batch/batch.mjs.map +1 -1
  28. package/resources/beta/batch/job-items.d.mts +36 -13
  29. package/resources/beta/batch/job-items.d.mts.map +1 -1
  30. package/resources/beta/batch/job-items.d.ts +36 -13
  31. package/resources/beta/batch/job-items.d.ts.map +1 -1
  32. package/resources/beta/batch/job-items.js +6 -8
  33. package/resources/beta/batch/job-items.js.map +1 -1
  34. package/resources/beta/batch/job-items.mjs +6 -8
  35. package/resources/beta/batch/job-items.mjs.map +1 -1
  36. package/resources/beta/parse-configurations.d.mts +7 -9
  37. package/resources/beta/parse-configurations.d.mts.map +1 -1
  38. package/resources/beta/parse-configurations.d.ts +7 -9
  39. package/resources/beta/parse-configurations.d.ts.map +1 -1
  40. package/resources/beta/parse-configurations.js +7 -9
  41. package/resources/beta/parse-configurations.js.map +1 -1
  42. package/resources/beta/parse-configurations.mjs +7 -9
  43. package/resources/beta/parse-configurations.mjs.map +1 -1
  44. package/resources/beta/sheets.d.mts +16 -0
  45. package/resources/beta/sheets.d.mts.map +1 -1
  46. package/resources/beta/sheets.d.ts +16 -0
  47. package/resources/beta/sheets.d.ts.map +1 -1
  48. package/resources/beta/split.d.mts +60 -16
  49. package/resources/beta/split.d.mts.map +1 -1
  50. package/resources/beta/split.d.ts +60 -16
  51. package/resources/beta/split.d.ts.map +1 -1
  52. package/resources/beta/split.js.map +1 -1
  53. package/resources/beta/split.mjs.map +1 -1
  54. package/resources/classifier/jobs.d.mts +12 -3
  55. package/resources/classifier/jobs.d.mts.map +1 -1
  56. package/resources/classifier/jobs.d.ts +12 -3
  57. package/resources/classifier/jobs.d.ts.map +1 -1
  58. package/resources/classify.d.mts +93 -38
  59. package/resources/classify.d.mts.map +1 -1
  60. package/resources/classify.d.ts +93 -38
  61. package/resources/classify.d.ts.map +1 -1
  62. package/resources/classify.js +19 -2
  63. package/resources/classify.js.map +1 -1
  64. package/resources/classify.mjs +19 -2
  65. package/resources/classify.mjs.map +1 -1
  66. package/resources/extract.d.mts +1593 -0
  67. package/resources/extract.d.mts.map +1 -0
  68. package/resources/extract.d.ts +1593 -0
  69. package/resources/extract.d.ts.map +1 -0
  70. package/resources/extract.js +215 -0
  71. package/resources/extract.js.map +1 -0
  72. package/resources/extract.mjs +211 -0
  73. package/resources/extract.mjs.map +1 -0
  74. package/resources/files.d.mts +53 -39
  75. package/resources/files.d.mts.map +1 -1
  76. package/resources/files.d.ts +53 -39
  77. package/resources/files.d.ts.map +1 -1
  78. package/resources/files.js +11 -10
  79. package/resources/files.js.map +1 -1
  80. package/resources/files.mjs +11 -10
  81. package/resources/files.mjs.map +1 -1
  82. package/resources/index.d.mts +1 -1
  83. package/resources/index.d.mts.map +1 -1
  84. package/resources/index.d.ts +1 -1
  85. package/resources/index.d.ts.map +1 -1
  86. package/resources/index.js +3 -3
  87. package/resources/index.js.map +1 -1
  88. package/resources/index.mjs +1 -1
  89. package/resources/index.mjs.map +1 -1
  90. package/resources/parsing.d.mts +292 -138
  91. package/resources/parsing.d.mts.map +1 -1
  92. package/resources/parsing.d.ts +292 -138
  93. package/resources/parsing.d.ts.map +1 -1
  94. package/resources/parsing.js +30 -4
  95. package/resources/parsing.js.map +1 -1
  96. package/resources/parsing.mjs +30 -4
  97. package/resources/parsing.mjs.map +1 -1
  98. package/resources/pipelines/pipelines.d.mts +59 -13
  99. package/resources/pipelines/pipelines.d.mts.map +1 -1
  100. package/resources/pipelines/pipelines.d.ts +59 -13
  101. package/resources/pipelines/pipelines.d.ts.map +1 -1
  102. package/resources/pipelines/pipelines.js +24 -9
  103. package/resources/pipelines/pipelines.js.map +1 -1
  104. package/resources/pipelines/pipelines.mjs +24 -9
  105. package/resources/pipelines/pipelines.mjs.map +1 -1
  106. package/resources/pipelines/sync.d.mts +5 -3
  107. package/resources/pipelines/sync.d.mts.map +1 -1
  108. package/resources/pipelines/sync.d.ts +5 -3
  109. package/resources/pipelines/sync.d.ts.map +1 -1
  110. package/resources/pipelines/sync.js +5 -3
  111. package/resources/pipelines/sync.js.map +1 -1
  112. package/resources/pipelines/sync.mjs +5 -3
  113. package/resources/pipelines/sync.mjs.map +1 -1
  114. package/src/client.ts +50 -15
  115. package/src/core/pagination.ts +0 -71
  116. package/src/resources/beta/batch/batch.ts +75 -30
  117. package/src/resources/beta/batch/job-items.ts +56 -13
  118. package/src/resources/beta/parse-configurations.ts +7 -9
  119. package/src/resources/beta/sheets.ts +20 -0
  120. package/src/resources/beta/split.ts +70 -17
  121. package/src/resources/classifier/jobs.ts +12 -3
  122. package/src/resources/classify.ts +101 -38
  123. package/src/resources/extract.ts +2055 -0
  124. package/src/resources/files.ts +53 -39
  125. package/src/resources/index.ts +22 -1
  126. package/src/resources/parsing.ts +327 -136
  127. package/src/resources/pipelines/pipelines.ts +80 -14
  128. package/src/resources/pipelines/sync.ts +5 -3
  129. package/src/version.ts +1 -1
  130. package/version.d.mts +1 -1
  131. package/version.d.ts +1 -1
  132. package/version.js +1 -1
  133. package/version.mjs +1 -1
  134. package/resources/extraction/extraction-agents/extraction-agents.d.mts +0 -126
  135. package/resources/extraction/extraction-agents/extraction-agents.d.mts.map +0 -1
  136. package/resources/extraction/extraction-agents/extraction-agents.d.ts +0 -126
  137. package/resources/extraction/extraction-agents/extraction-agents.d.ts.map +0 -1
  138. package/resources/extraction/extraction-agents/extraction-agents.js +0 -56
  139. package/resources/extraction/extraction-agents/extraction-agents.js.map +0 -1
  140. package/resources/extraction/extraction-agents/extraction-agents.mjs +0 -51
  141. package/resources/extraction/extraction-agents/extraction-agents.mjs.map +0 -1
  142. package/resources/extraction/extraction-agents/index.d.mts +0 -3
  143. package/resources/extraction/extraction-agents/index.d.mts.map +0 -1
  144. package/resources/extraction/extraction-agents/index.d.ts +0 -3
  145. package/resources/extraction/extraction-agents/index.d.ts.map +0 -1
  146. package/resources/extraction/extraction-agents/index.js +0 -9
  147. package/resources/extraction/extraction-agents/index.js.map +0 -1
  148. package/resources/extraction/extraction-agents/index.mjs +0 -4
  149. package/resources/extraction/extraction-agents/index.mjs.map +0 -1
  150. package/resources/extraction/extraction-agents/schema.d.mts +0 -75
  151. package/resources/extraction/extraction-agents/schema.d.mts.map +0 -1
  152. package/resources/extraction/extraction-agents/schema.d.ts +0 -75
  153. package/resources/extraction/extraction-agents/schema.d.ts.map +0 -1
  154. package/resources/extraction/extraction-agents/schema.js +0 -28
  155. package/resources/extraction/extraction-agents/schema.js.map +0 -1
  156. package/resources/extraction/extraction-agents/schema.mjs +0 -24
  157. package/resources/extraction/extraction-agents/schema.mjs.map +0 -1
  158. package/resources/extraction/extraction-agents.d.mts +0 -2
  159. package/resources/extraction/extraction-agents.d.mts.map +0 -1
  160. package/resources/extraction/extraction-agents.d.ts +0 -2
  161. package/resources/extraction/extraction-agents.d.ts.map +0 -1
  162. package/resources/extraction/extraction-agents.js +0 -6
  163. package/resources/extraction/extraction-agents.js.map +0 -1
  164. package/resources/extraction/extraction-agents.mjs +0 -3
  165. package/resources/extraction/extraction-agents.mjs.map +0 -1
  166. package/resources/extraction/extraction.d.mts +0 -118
  167. package/resources/extraction/extraction.d.mts.map +0 -1
  168. package/resources/extraction/extraction.d.ts +0 -118
  169. package/resources/extraction/extraction.d.ts.map +0 -1
  170. package/resources/extraction/extraction.js +0 -91
  171. package/resources/extraction/extraction.js.map +0 -1
  172. package/resources/extraction/extraction.mjs +0 -86
  173. package/resources/extraction/extraction.mjs.map +0 -1
  174. package/resources/extraction/index.d.mts +0 -5
  175. package/resources/extraction/index.d.mts.map +0 -1
  176. package/resources/extraction/index.d.ts +0 -5
  177. package/resources/extraction/index.d.ts.map +0 -1
  178. package/resources/extraction/index.js +0 -13
  179. package/resources/extraction/index.js.map +0 -1
  180. package/resources/extraction/index.mjs +0 -6
  181. package/resources/extraction/index.mjs.map +0 -1
  182. package/resources/extraction/jobs.d.mts +0 -280
  183. package/resources/extraction/jobs.d.mts.map +0 -1
  184. package/resources/extraction/jobs.d.ts +0 -280
  185. package/resources/extraction/jobs.d.ts.map +0 -1
  186. package/resources/extraction/jobs.js +0 -179
  187. package/resources/extraction/jobs.js.map +0 -1
  188. package/resources/extraction/jobs.mjs +0 -175
  189. package/resources/extraction/jobs.mjs.map +0 -1
  190. package/resources/extraction/runs.d.mts +0 -198
  191. package/resources/extraction/runs.d.mts.map +0 -1
  192. package/resources/extraction/runs.d.ts +0 -198
  193. package/resources/extraction/runs.d.ts.map +0 -1
  194. package/resources/extraction/runs.js +0 -42
  195. package/resources/extraction/runs.js.map +0 -1
  196. package/resources/extraction/runs.mjs +0 -38
  197. package/resources/extraction/runs.mjs.map +0 -1
  198. package/resources/extraction.d.mts +0 -2
  199. package/resources/extraction.d.mts.map +0 -1
  200. package/resources/extraction.d.ts +0 -2
  201. package/resources/extraction.d.ts.map +0 -1
  202. package/resources/extraction.js +0 -6
  203. package/resources/extraction.js.map +0 -1
  204. package/resources/extraction.mjs +0 -3
  205. package/resources/extraction.mjs.map +0 -1
  206. package/src/resources/extraction/extraction-agents/extraction-agents.ts +0 -196
  207. package/src/resources/extraction/extraction-agents/index.ts +0 -18
  208. package/src/resources/extraction/extraction-agents/schema.ts +0 -100
  209. package/src/resources/extraction/extraction-agents.ts +0 -3
  210. package/src/resources/extraction/extraction.ts +0 -224
  211. package/src/resources/extraction/index.ts +0 -34
  212. package/src/resources/extraction/jobs.ts +0 -414
  213. package/src/resources/extraction/runs.ts +0 -315
  214. package/src/resources/extraction.ts +0 -3
@@ -0,0 +1,1593 @@
1
+ import { APIResource } from "../core/resource.js";
2
+ import * as ExtractAPI from "./extract.js";
3
+ import * as ParsingAPI from "./parsing.js";
4
+ import * as SplitAPI from "./beta/split.js";
5
+ import { APIPromise } from "../core/api-promise.js";
6
+ import { PagePromise, PaginatedCursor, type PaginatedCursorParams } from "../core/pagination.js";
7
+ import { RequestOptions } from "../internal/request-options.js";
8
+ import { PollingOptions } from "../core/polling.js";
9
+ export declare class Extract extends APIResource {
10
+ /**
11
+ * Create an extraction job.
12
+ *
13
+ * Extracts structured data from a document using either a saved configuration or
14
+ * an inline JSON Schema.
15
+ *
16
+ * ## Input
17
+ *
18
+ * Provide exactly one of:
19
+ *
20
+ * - `configuration_id` — reference a saved extraction config
21
+ * - `configuration` — inline configuration with a `data_schema`
22
+ *
23
+ * ## Document input
24
+ *
25
+ * Set `file_input` to a file ID (`dfl-...`) or a completed parse job ID
26
+ * (`pjb-...`).
27
+ *
28
+ * The job runs asynchronously. Poll `GET /extract/{job_id}` or register a webhook
29
+ * to monitor completion.
30
+ *
31
+ * @example
32
+ * ```ts
33
+ * const extractV2Job = await client.extract.create({
34
+ * file_input: 'dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee',
35
+ * });
36
+ * ```
37
+ */
38
+ create(params: ExtractCreateParams, options?: RequestOptions): APIPromise<ExtractV2Job>;
39
+ /**
40
+ * List extraction jobs with optional filtering and pagination.
41
+ *
42
+ * Filter by `configuration_id`, `status`, `file_input`, or creation date range.
43
+ * Results are returned newest-first. Use `expand=configuration` to include the
44
+ * full configuration used, and `expand=extract_metadata` for per-field metadata.
45
+ *
46
+ * @example
47
+ * ```ts
48
+ * // Automatically fetches more pages as needed.
49
+ * for await (const extractV2Job of client.extract.list()) {
50
+ * // ...
51
+ * }
52
+ * ```
53
+ */
54
+ list(query?: ExtractListParams | null | undefined, options?: RequestOptions): PagePromise<ExtractV2JobsPaginatedCursor, ExtractV2Job>;
55
+ /**
56
+ * Delete an extraction job and its results.
57
+ *
58
+ * @example
59
+ * ```ts
60
+ * const extract = await client.extract.delete('job_id');
61
+ * ```
62
+ */
63
+ delete(jobID: string, params?: ExtractDeleteParams | null | undefined, options?: RequestOptions): APIPromise<unknown>;
64
+ /**
65
+ * Generate a JSON schema and return a product configuration request.
66
+ *
67
+ * @example
68
+ * ```ts
69
+ * const response = await client.extract.generateSchema();
70
+ * ```
71
+ */
72
+ generateSchema(params: ExtractGenerateSchemaParams, options?: RequestOptions): APIPromise<ExtractGenerateSchemaResponse>;
73
+ /**
74
+ * Get a single extraction job by ID.
75
+ *
76
+ * Returns the job status and results when complete. Use `expand=configuration` to
77
+ * include the full configuration used, and `expand=extract_metadata` for per-field
78
+ * metadata.
79
+ *
80
+ * @example
81
+ * ```ts
82
+ * const extractV2Job = await client.extract.get('job_id');
83
+ * ```
84
+ */
85
+ get(jobID: string, query?: ExtractGetParams | null | undefined, options?: RequestOptions): APIPromise<ExtractV2Job>;
86
+ /**
87
+ * Validate a JSON schema for extraction.
88
+ *
89
+ * @example
90
+ * ```ts
91
+ * const extractV2SchemaValidateResponse =
92
+ * await client.extract.validateSchema({
93
+ * data_schema: { foo: { foo: 'bar' } },
94
+ * });
95
+ * ```
96
+ */
97
+ validateSchema(body: ExtractValidateSchemaParams, options?: RequestOptions): APIPromise<ExtractV2SchemaValidateResponse>;
98
+ /**
99
+ * Wait for an extraction job to complete by polling until it reaches a terminal state.
100
+ *
101
+ * @param jobID - The ID of the extraction job to wait for
102
+ * @param query - Optional query parameters (organization_id, project_id)
103
+ * @param options - Polling configuration and request options
104
+ * @returns The completed extraction job
105
+ * @throws {PollingTimeoutError} If the job doesn't complete within the timeout period
106
+ * @throws {PollingError} If the job fails or is cancelled
107
+ *
108
+ * @example
109
+ * ```typescript
110
+ * const job = await client.extract.create({
111
+ * document_input_value: 'dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee',
112
+ * });
113
+ *
114
+ * const completed = await client.extract.waitForCompletion(job.id, undefined, { verbose: true });
115
+ * console.log(completed.extract_result);
116
+ * ```
117
+ */
118
+ waitForCompletion(jobID: string, query?: ExtractGetParams, options?: PollingOptions & RequestOptions): Promise<ExtractV2Job>;
119
+ /**
120
+ * Create an extraction job, wait for it to complete, and return the result.
121
+ *
122
+ * This is a convenience method that combines create() and waitForCompletion()
123
+ * into a single call for the most common end-to-end workflow.
124
+ *
125
+ * @param params - Extract job creation parameters
126
+ * @param options - Polling configuration and request options
127
+ * @returns The completed extraction job with extract_result populated
128
+ * @throws {PollingTimeoutError} If the job doesn't complete within the timeout period
129
+ * @throws {PollingError} If the job fails or is cancelled
130
+ *
131
+ * @example
132
+ * ```typescript
133
+ * import { LlamaCloud } from 'llama-cloud';
134
+ *
135
+ * const client = new LlamaCloud({ apiKey: '...' });
136
+ *
137
+ * const result = await client.extract.run({
138
+ * document_input_value: 'dfl-aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee',
139
+ * configuration: {
140
+ * data_schema: { name: { type: 'string' }, age: { type: 'number' } },
141
+ * },
142
+ * }, { verbose: true });
143
+ *
144
+ * console.log(result.extract_result);
145
+ * ```
146
+ */
147
+ run(params: ExtractCreateParams, options?: PollingOptions & RequestOptions): Promise<ExtractV2Job>;
148
+ }
149
+ export type ExtractV2JobsPaginatedCursor = PaginatedCursor<ExtractV2Job>;
150
+ /**
151
+ * Extract configuration combining parse and extract settings.
152
+ */
153
+ export interface ExtractConfiguration {
154
+ /**
155
+ * JSON Schema defining the fields to extract. Validate with the /schema/validate
156
+ * endpoint first.
157
+ */
158
+ data_schema: {
159
+ [key: string]: {
160
+ [key: string]: unknown;
161
+ } | Array<unknown> | string | number | boolean | null;
162
+ };
163
+ /**
164
+ * Include citations in results
165
+ */
166
+ cite_sources?: boolean;
167
+ /**
168
+ * Include confidence scores in results
169
+ */
170
+ confidence_scores?: boolean;
171
+ /**
172
+ * Extract algorithm version. Use 'latest' or a date string.
173
+ */
174
+ extract_version?: string;
175
+ /**
176
+ * Granularity of extraction: per_doc returns one object per document, per_page
177
+ * returns one object per page, per_table_row returns one object per table row
178
+ */
179
+ extraction_target?: 'per_doc' | 'per_page' | 'per_table_row';
180
+ /**
181
+ * ISO 639-1 language code for the document
182
+ */
183
+ lang?: string;
184
+ /**
185
+ * Maximum number of pages to process. Omit for no limit.
186
+ */
187
+ max_pages?: number | null;
188
+ /**
189
+ * Saved parse configuration ID to control how the document is parsed before
190
+ * extraction
191
+ */
192
+ parse_config_id?: string | null;
193
+ /**
194
+ * Parse tier to use before extraction (fast, cost_effective, or agentic)
195
+ */
196
+ parse_tier?: string | null;
197
+ /**
198
+ * Custom system prompt to guide extraction behavior
199
+ */
200
+ system_prompt?: string | null;
201
+ /**
202
+ * Comma-separated page numbers or ranges to process (1-based). Omit to process all
203
+ * pages.
204
+ */
205
+ target_pages?: string | null;
206
+ /**
207
+ * Extract tier: cost_effective (5 credits/page) or agentic (15 credits/page)
208
+ */
209
+ tier?: 'cost_effective' | 'agentic';
210
+ }
211
+ /**
212
+ * Extraction metadata.
213
+ */
214
+ export interface ExtractJobMetadata {
215
+ /**
216
+ * Metadata for extracted fields including document, page, and row level info.
217
+ */
218
+ field_metadata?: ExtractedFieldMetadata | null;
219
+ /**
220
+ * Reference to the ParseJob ID used for parsing
221
+ */
222
+ parse_job_id?: string | null;
223
+ /**
224
+ * Parse tier used for parsing the document
225
+ */
226
+ parse_tier?: string | null;
227
+ }
228
+ /**
229
+ * Extraction usage metrics.
230
+ */
231
+ export interface ExtractJobUsage {
232
+ /**
233
+ * Number of document tokens
234
+ */
235
+ num_document_tokens?: number | null;
236
+ /**
237
+ * Number of output tokens
238
+ */
239
+ num_output_tokens?: number | null;
240
+ /**
241
+ * Number of pages extracted
242
+ */
243
+ num_pages_extracted?: number | null;
244
+ }
245
+ /**
246
+ * An extraction job.
247
+ */
248
+ export interface ExtractV2Job {
249
+ /**
250
+ * Unique job identifier (job_id)
251
+ */
252
+ id: string;
253
+ /**
254
+ * Creation timestamp
255
+ */
256
+ created_at: string;
257
+ /**
258
+ * File ID or parse job ID that was extracted
259
+ */
260
+ file_input: string;
261
+ /**
262
+ * Project this job belongs to
263
+ */
264
+ project_id: string;
265
+ /**
266
+ * Current job status.
267
+ *
268
+ * - `PENDING` — queued, not yet started
269
+ * - `RUNNING` — actively processing
270
+ * - `COMPLETED` — finished successfully
271
+ * - `FAILED` — terminated with an error
272
+ * - `CANCELLED` — cancelled by user
273
+ */
274
+ status: string;
275
+ /**
276
+ * Last update timestamp
277
+ */
278
+ updated_at: string;
279
+ /**
280
+ * Extract configuration combining parse and extract settings.
281
+ */
282
+ configuration?: ExtractConfiguration | null;
283
+ /**
284
+ * Saved extract configuration ID used for this job, if any
285
+ */
286
+ configuration_id?: string | null;
287
+ /**
288
+ * Error details when status is FAILED
289
+ */
290
+ error_message?: string | null;
291
+ /**
292
+ * Extraction metadata.
293
+ */
294
+ extract_metadata?: ExtractJobMetadata | null;
295
+ /**
296
+ * Extracted data conforming to the data_schema. Returns a single object for
297
+ * per_doc, or an array for per_page / per_table_row.
298
+ */
299
+ extract_result?: {
300
+ [key: string]: {
301
+ [key: string]: unknown;
302
+ } | Array<unknown> | string | number | boolean | null;
303
+ } | Array<{
304
+ [key: string]: {
305
+ [key: string]: unknown;
306
+ } | Array<unknown> | string | number | boolean | null;
307
+ }> | null;
308
+ /**
309
+ * Job-level metadata.
310
+ */
311
+ metadata?: ExtractV2Job.Metadata | null;
312
+ }
313
+ export declare namespace ExtractV2Job {
314
+ /**
315
+ * Job-level metadata.
316
+ */
317
+ interface Metadata {
318
+ /**
319
+ * Extraction usage metrics.
320
+ */
321
+ usage?: ExtractAPI.ExtractJobUsage | null;
322
+ [k: string]: unknown;
323
+ }
324
+ }
325
+ /**
326
+ * Request to create an extraction job. Provide configuration_id or inline
327
+ * configuration.
328
+ */
329
+ export interface ExtractV2JobCreate {
330
+ /**
331
+ * File ID or parse job ID to extract from
332
+ */
333
+ file_input: string;
334
+ /**
335
+ * Extract configuration combining parse and extract settings.
336
+ */
337
+ configuration?: ExtractConfiguration | null;
338
+ /**
339
+ * Saved configuration ID
340
+ */
341
+ configuration_id?: string | null;
342
+ /**
343
+ * Outbound webhook endpoints to notify on job status changes
344
+ */
345
+ webhook_configurations?: Array<ExtractV2JobCreate.WebhookConfiguration> | null;
346
+ }
347
+ export declare namespace ExtractV2JobCreate {
348
+ /**
349
+ * Configuration for a single outbound webhook endpoint.
350
+ */
351
+ interface WebhookConfiguration {
352
+ /**
353
+ * Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all
354
+ * events are delivered.
355
+ */
356
+ webhook_events?: Array<'extract.pending' | 'extract.success' | 'extract.error' | 'extract.partial_success' | 'extract.cancelled' | 'parse.pending' | 'parse.running' | 'parse.success' | 'parse.error' | 'parse.partial_success' | 'parse.cancelled' | 'classify.pending' | 'classify.success' | 'classify.error' | 'classify.partial_success' | 'classify.cancelled' | 'unmapped_event'> | null;
357
+ /**
358
+ * Custom HTTP headers sent with each webhook request (e.g. auth tokens)
359
+ */
360
+ webhook_headers?: {
361
+ [key: string]: string;
362
+ } | null;
363
+ /**
364
+ * Response format sent to the webhook: 'string' (default) or 'json'
365
+ */
366
+ webhook_output_format?: string | null;
367
+ /**
368
+ * URL to receive webhook POST notifications
369
+ */
370
+ webhook_url?: string | null;
371
+ }
372
+ }
373
+ /**
374
+ * Paginated list of extraction jobs.
375
+ */
376
+ export interface ExtractV2JobQueryResponse {
377
+ /**
378
+ * The list of items.
379
+ */
380
+ items: Array<ExtractV2Job>;
381
+ /**
382
+ * A token, which can be sent as page_token to retrieve the next page. If this
383
+ * field is omitted, there are no subsequent pages.
384
+ */
385
+ next_page_token?: string | null;
386
+ /**
387
+ * The total number of items available. This is only populated when specifically
388
+ * requested. The value may be an estimate and can be used for display purposes
389
+ * only.
390
+ */
391
+ total_size?: number | null;
392
+ }
393
+ /**
394
+ * Request schema for generating an extraction schema.
395
+ */
396
+ export interface ExtractV2SchemaGenerateRequest {
397
+ /**
398
+ * Optional schema to validate, refine, or extend
399
+ */
400
+ data_schema?: {
401
+ [key: string]: {
402
+ [key: string]: unknown;
403
+ } | Array<unknown> | string | number | boolean | null;
404
+ } | null;
405
+ /**
406
+ * Optional file ID to analyze for schema generation
407
+ */
408
+ file_id?: string | null;
409
+ /**
410
+ * Name for the generated configuration (auto-generated if omitted)
411
+ */
412
+ name?: string | null;
413
+ /**
414
+ * Natural language description of the data structure to extract
415
+ */
416
+ prompt?: string | null;
417
+ }
418
+ /**
419
+ * Request schema for validating an extraction schema.
420
+ */
421
+ export interface ExtractV2SchemaValidateRequest {
422
+ /**
423
+ * JSON Schema to validate for use with extract jobs
424
+ */
425
+ data_schema: {
426
+ [key: string]: {
427
+ [key: string]: unknown;
428
+ } | Array<unknown> | string | number | boolean | null;
429
+ };
430
+ }
431
+ /**
432
+ * Response schema for schema validation.
433
+ */
434
+ export interface ExtractV2SchemaValidateResponse {
435
+ /**
436
+ * Validated JSON Schema, ready for use in extract jobs
437
+ */
438
+ data_schema: {
439
+ [key: string]: {
440
+ [key: string]: unknown;
441
+ } | Array<unknown> | string | number | boolean | null;
442
+ };
443
+ }
444
+ /**
445
+ * Metadata for extracted fields including document, page, and row level info.
446
+ */
447
+ export interface ExtractedFieldMetadata {
448
+ /**
449
+ * Per-field metadata keyed by field name from your schema. Scalar fields (e.g.
450
+ * `vendor`) map to a FieldMetadataEntry with citation and confidence. Array fields
451
+ * (e.g. `items`) map to a list where each element contains per-sub-field
452
+ * FieldMetadataEntry objects, indexed by array position. Nested objects contain
453
+ * sub-field entries recursively.
454
+ */
455
+ document_metadata?: {
456
+ [key: string]: {
457
+ [key: string]: unknown;
458
+ } | Array<unknown> | string | number | boolean | null;
459
+ } | null;
460
+ /**
461
+ * Per-page metadata when extraction_target is per_page
462
+ */
463
+ page_metadata?: Array<{
464
+ [key: string]: {
465
+ [key: string]: unknown;
466
+ } | Array<unknown> | string | number | boolean | null;
467
+ }> | null;
468
+ /**
469
+ * Per-row metadata when extraction_target is per_table_row
470
+ */
471
+ row_metadata?: Array<{
472
+ [key: string]: {
473
+ [key: string]: unknown;
474
+ } | Array<unknown> | string | number | boolean | null;
475
+ }> | null;
476
+ }
477
+ export type ExtractDeleteResponse = unknown;
478
+ /**
479
+ * Request body for creating a product configuration.
480
+ */
481
+ export interface ExtractGenerateSchemaResponse {
482
+ /**
483
+ * Human-readable name for this configuration.
484
+ */
485
+ name: string;
486
+ /**
487
+ * Product-specific configuration parameters.
488
+ */
489
+ parameters: ExtractGenerateSchemaResponse.SplitV1Parameters | ExtractGenerateSchemaResponse.ExtractV2Parameters | ExtractGenerateSchemaResponse.ClassifyV2Parameters | ExtractGenerateSchemaResponse.ParseV2Parameters | ExtractGenerateSchemaResponse.UntypedParameters;
490
+ }
491
+ export declare namespace ExtractGenerateSchemaResponse {
492
+ /**
493
+ * Typed parameters for a _split v1_ product configuration.
494
+ */
495
+ interface SplitV1Parameters {
496
+ /**
497
+ * Categories to split documents into.
498
+ */
499
+ categories: Array<SplitAPI.SplitCategory>;
500
+ /**
501
+ * Product type.
502
+ */
503
+ product_type: 'split_v1';
504
+ /**
505
+ * Strategy for splitting documents.
506
+ */
507
+ splitting_strategy?: SplitV1Parameters.SplittingStrategy;
508
+ }
509
+ namespace SplitV1Parameters {
510
+ /**
511
+ * Strategy for splitting documents.
512
+ */
513
+ interface SplittingStrategy {
514
+ /**
515
+ * Controls handling of pages that don't match any category. 'include': pages can
516
+ * be grouped as 'uncategorized' and included in results. 'forbid': all pages must
517
+ * be assigned to a defined category. 'omit': pages can be classified as
518
+ * 'uncategorized' but are excluded from results.
519
+ */
520
+ allow_uncategorized?: 'include' | 'forbid' | 'omit';
521
+ }
522
+ }
523
+ /**
524
+ * Typed parameters for an _extract v2_ product configuration.
525
+ */
526
+ interface ExtractV2Parameters {
527
+ /**
528
+ * JSON Schema defining the fields to extract. Validate with the /schema/validate
529
+ * endpoint first.
530
+ */
531
+ data_schema: {
532
+ [key: string]: {
533
+ [key: string]: unknown;
534
+ } | Array<unknown> | string | number | boolean | null;
535
+ };
536
+ /**
537
+ * Product type.
538
+ */
539
+ product_type: 'extract_v2';
540
+ /**
541
+ * Include citations in results
542
+ */
543
+ cite_sources?: boolean;
544
+ /**
545
+ * Include confidence scores in results
546
+ */
547
+ confidence_scores?: boolean;
548
+ /**
549
+ * Extract algorithm version. Use 'latest' or a date string.
550
+ */
551
+ extract_version?: string;
552
+ /**
553
+ * Granularity of extraction: per_doc returns one object per document, per_page
554
+ * returns one object per page, per_table_row returns one object per table row
555
+ */
556
+ extraction_target?: 'per_doc' | 'per_page' | 'per_table_row';
557
+ /**
558
+ * ISO 639-1 language code for the document
559
+ */
560
+ lang?: string;
561
+ /**
562
+ * Maximum number of pages to process. Omit for no limit.
563
+ */
564
+ max_pages?: number | null;
565
+ /**
566
+ * Saved parse configuration ID to control how the document is parsed before
567
+ * extraction
568
+ */
569
+ parse_config_id?: string | null;
570
+ /**
571
+ * Parse tier to use before extraction (fast, cost_effective, or agentic)
572
+ */
573
+ parse_tier?: string | null;
574
+ /**
575
+ * Custom system prompt to guide extraction behavior
576
+ */
577
+ system_prompt?: string | null;
578
+ /**
579
+ * Comma-separated page numbers or ranges to process (1-based). Omit to process all
580
+ * pages.
581
+ */
582
+ target_pages?: string | null;
583
+ /**
584
+ * Extract tier: cost_effective (5 credits/page) or agentic (15 credits/page)
585
+ */
586
+ tier?: 'cost_effective' | 'agentic';
587
+ }
588
+ /**
589
+ * Typed parameters for a _classify v2_ product configuration.
590
+ */
591
+ interface ClassifyV2Parameters {
592
+ /**
593
+ * Product type.
594
+ */
595
+ product_type: 'classify_v2';
596
+ /**
597
+ * Classify rules to evaluate against the document (at least one required)
598
+ */
599
+ rules: Array<ClassifyV2Parameters.Rule>;
600
+ /**
601
+ * Classify execution mode
602
+ */
603
+ mode?: 'FAST';
604
+ /**
605
+ * Parsing configuration for classify jobs.
606
+ */
607
+ parsing_configuration?: ClassifyV2Parameters.ParsingConfiguration | null;
608
+ }
609
+ namespace ClassifyV2Parameters {
610
+ /**
611
+ * A rule for classifying documents.
612
+ */
613
+ interface Rule {
614
+ /**
615
+ * Natural language criteria for matching this rule
616
+ */
617
+ description: string;
618
+ /**
619
+ * Document type to assign when rule matches
620
+ */
621
+ type: string;
622
+ }
623
+ /**
624
+ * Parsing configuration for classify jobs.
625
+ */
626
+ interface ParsingConfiguration {
627
+ /**
628
+ * ISO 639-1 language code for the document
629
+ */
630
+ lang?: string;
631
+ /**
632
+ * Maximum number of pages to process. Omit for no limit.
633
+ */
634
+ max_pages?: number | null;
635
+ /**
636
+ * Comma-separated page numbers or ranges to process (1-based). Omit to process all
637
+ * pages.
638
+ */
639
+ target_pages?: string | null;
640
+ }
641
+ }
642
+ /**
643
+ * Configuration for LlamaParse v2 document parsing.
644
+ *
645
+ * Includes tier selection, processing options, output formatting, page targeting,
646
+ * and webhook delivery. Refer to the LlamaParse documentation for details on each
647
+ * field.
648
+ */
649
+ interface ParseV2Parameters {
650
+ /**
651
+ * Product type.
652
+ */
653
+ product_type: 'parse_v2';
654
+ /**
655
+ * Parsing tier: 'fast' (rule-based, cheapest), 'cost_effective' (balanced),
656
+ * 'agentic' (AI-powered with custom prompts), or 'agentic_plus' (premium AI with
657
+ * highest accuracy)
658
+ */
659
+ tier: 'fast' | 'cost_effective' | 'agentic' | 'agentic_plus';
660
+ /**
661
+ * Tier version. Use 'latest' for the current stable version, or specify a specific
662
+ * version (e.g., '1.0', '2.0') for reproducible results
663
+ */
664
+ version: '2025-12-11' | '2025-12-18' | '2025-12-31' | '2026-01-08' | '2026-01-09' | '2026-01-16' | '2026-01-21' | '2026-01-22' | '2026-01-24' | '2026-01-29' | '2026-01-30' | '2026-02-03' | '2026-02-18' | '2026-02-20' | '2026-02-24' | '2026-02-26' | '2026-03-02' | '2026-03-03' | '2026-03-04' | '2026-03-05' | '2026-03-09' | '2026-03-10' | '2026-03-11' | '2026-03-12' | '2026-03-17' | '2026-03-19' | '2026-03-20' | '2026-03-22' | '2026-03-23' | '2026-03-24' | '2026-03-25' | '2026-03-26' | '2026-03-27' | '2026-03-30' | '2026-03-31' | 'latest' | (string & {});
665
+ /**
666
+ * Options for AI-powered parsing tiers (cost_effective, agentic, agentic_plus).
667
+ *
668
+ * These options customize how the AI processes and interprets document content.
669
+ * Only applicable when using non-fast tiers.
670
+ */
671
+ agentic_options?: ParseV2Parameters.AgenticOptions | null;
672
+ /**
673
+ * Identifier for the client/application making the request. Used for analytics and
674
+ * debugging. Example: 'my-app-v2'
675
+ */
676
+ client_name?: string | null;
677
+ /**
678
+ * Crop boundaries to process only a portion of each page. Values are ratios 0-1
679
+ * from page edges
680
+ */
681
+ crop_box?: ParseV2Parameters.CropBox;
682
+ /**
683
+ * Bypass result caching and force re-parsing. Use when document content may have
684
+ * changed or you need fresh results
685
+ */
686
+ disable_cache?: boolean | null;
687
+ /**
688
+ * Options for fast tier parsing (rule-based, no AI).
689
+ *
690
+ * Fast tier uses deterministic algorithms for text extraction without AI
691
+ * enhancement. It's the fastest and most cost-effective option, best suited for
692
+ * simple documents with standard layouts. Currently has no configurable options
693
+ * but reserved for future expansion.
694
+ */
695
+ fast_options?: unknown | null;
696
+ /**
697
+ * Format-specific options (HTML, PDF, spreadsheet, presentation). Applied based on
698
+ * detected input file type
699
+ */
700
+ input_options?: ParseV2Parameters.InputOptions;
701
+ /**
702
+ * Output formatting options for markdown, text, and extracted images
703
+ */
704
+ output_options?: ParseV2Parameters.OutputOptions;
705
+ /**
706
+ * Page selection: limit total pages or specify exact pages to process
707
+ */
708
+ page_ranges?: ParseV2Parameters.PageRanges;
709
+ /**
710
+ * Job execution controls including timeouts and failure thresholds
711
+ */
712
+ processing_control?: ParseV2Parameters.ProcessingControl;
713
+ /**
714
+ * Document processing options including OCR, table extraction, and chart parsing
715
+ */
716
+ processing_options?: ParseV2Parameters.ProcessingOptions;
717
+ /**
718
+ * Webhook endpoints for job status notifications. Multiple webhooks can be
719
+ * configured for different events or services
720
+ */
721
+ webhook_configurations?: Array<ParseV2Parameters.WebhookConfiguration>;
722
+ }
723
+ namespace ParseV2Parameters {
724
+ /**
725
+ * Options for AI-powered parsing tiers (cost_effective, agentic, agentic_plus).
726
+ *
727
+ * These options customize how the AI processes and interprets document content.
728
+ * Only applicable when using non-fast tiers.
729
+ */
730
+ interface AgenticOptions {
731
+ /**
732
+ * Custom instructions for the AI parser. Use to guide extraction behavior, specify
733
+ * output formatting, or provide domain-specific context. Example: 'Extract
734
+ * financial tables with currency symbols. Format dates as YYYY-MM-DD.'
735
+ */
736
+ custom_prompt?: string | null;
737
+ }
738
+ /**
739
+ * Crop boundaries to process only a portion of each page. Values are ratios 0-1
740
+ * from page edges
741
+ */
742
+ interface CropBox {
743
+ /**
744
+ * Bottom boundary as ratio (0-1). 0=top edge, 1=bottom edge. Content below this
745
+ * line is excluded
746
+ */
747
+ bottom?: number | null;
748
+ /**
749
+ * Left boundary as ratio (0-1). 0=left edge, 1=right edge. Content left of this
750
+ * line is excluded
751
+ */
752
+ left?: number | null;
753
+ /**
754
+ * Right boundary as ratio (0-1). 0=left edge, 1=right edge. Content right of this
755
+ * line is excluded
756
+ */
757
+ right?: number | null;
758
+ /**
759
+ * Top boundary as ratio (0-1). 0=top edge, 1=bottom edge. Content above this line
760
+ * is excluded
761
+ */
762
+ top?: number | null;
763
+ }
764
+ /**
765
+ * Format-specific options (HTML, PDF, spreadsheet, presentation). Applied based on
766
+ * detected input file type
767
+ */
768
+ interface InputOptions {
769
+ /**
770
+ * HTML/web page parsing options (applies to .html, .htm files)
771
+ */
772
+ html?: InputOptions.HTML;
773
+ /**
774
+ * PDF-specific parsing options (applies to .pdf files)
775
+ */
776
+ pdf?: unknown;
777
+ /**
778
+ * Presentation parsing options (applies to .pptx, .ppt, .odp, .key files)
779
+ */
780
+ presentation?: InputOptions.Presentation;
781
+ /**
782
+ * Spreadsheet parsing options (applies to .xlsx, .xls, .csv, .ods files)
783
+ */
784
+ spreadsheet?: InputOptions.Spreadsheet;
785
+ }
786
+ namespace InputOptions {
787
+ /**
788
+ * HTML/web page parsing options (applies to .html, .htm files)
789
+ */
790
+ interface HTML {
791
+ /**
792
+ * Force all HTML elements to be visible by overriding CSS display/visibility
793
+ * properties. Useful for parsing pages with hidden content or collapsed sections
794
+ */
795
+ make_all_elements_visible?: boolean | null;
796
+ /**
797
+ * Remove fixed-position elements (headers, footers, floating buttons) that appear
798
+ * on every page render
799
+ */
800
+ remove_fixed_elements?: boolean | null;
801
+ /**
802
+ * Remove navigation elements (nav bars, sidebars, menus) to focus on main content
803
+ */
804
+ remove_navigation_elements?: boolean | null;
805
+ }
806
+ /**
807
+ * Presentation parsing options (applies to .pptx, .ppt, .odp, .key files)
808
+ */
809
+ interface Presentation {
810
+ /**
811
+ * Extract content positioned outside the visible slide area. Some presentations
812
+ * have hidden notes or content that extends beyond slide boundaries
813
+ */
814
+ out_of_bounds_content?: boolean | null;
815
+ /**
816
+ * Skip extraction of embedded chart data tables. When true, only the visual
817
+ * representation of charts is captured, not the underlying data
818
+ */
819
+ skip_embedded_data?: boolean | null;
820
+ }
821
+ /**
822
+ * Spreadsheet parsing options (applies to .xlsx, .xls, .csv, .ods files)
823
+ */
824
+ interface Spreadsheet {
825
+ /**
826
+ * Detect and extract multiple tables within a single sheet. Useful when
827
+ * spreadsheets contain several data regions separated by blank rows/columns
828
+ */
829
+ detect_sub_tables_in_sheets?: boolean | null;
830
+ /**
831
+ * Compute formula results instead of extracting formula text. Use when you need
832
+ * calculated values rather than formula definitions
833
+ */
834
+ force_formula_computation_in_sheets?: boolean | null;
835
+ /**
836
+ * Parse hidden sheets in addition to visible ones. By default, hidden sheets are
837
+ * skipped
838
+ */
839
+ include_hidden_sheets?: boolean | null;
840
+ }
841
+ }
842
+ /**
843
+ * Output formatting options for markdown, text, and extracted images
844
+ */
845
+ interface OutputOptions {
846
+ /**
847
+ * Extract the printed page number as it appears in the document (e.g., 'Page 5 of
848
+ * 10', 'v', 'A-3'). Useful for referencing original page numbers
849
+ */
850
+ extract_printed_page_number?: boolean | null;
851
+ /**
852
+ * Image categories to extract and save. Options: 'screenshot' (full page renders
853
+ * useful for visual QA), 'embedded' (images found within the document), 'layout'
854
+ * (cropped regions from layout detection like figures and diagrams). Empty list
855
+ * saves no images
856
+ */
857
+ images_to_save?: Array<'screenshot' | 'embedded' | 'layout'>;
858
+ /**
859
+ * Markdown formatting options including table styles and link annotations
860
+ */
861
+ markdown?: OutputOptions.Markdown;
862
+ /**
863
+ * Spatial text output options for preserving document layout structure
864
+ */
865
+ spatial_text?: OutputOptions.SpatialText;
866
+ /**
867
+ * Options for exporting tables as XLSX spreadsheets
868
+ */
869
+ tables_as_spreadsheet?: OutputOptions.TablesAsSpreadsheet;
870
+ }
871
+ namespace OutputOptions {
872
+ /**
873
+ * Markdown formatting options including table styles and link annotations
874
+ */
875
+ interface Markdown {
876
+ /**
877
+ * Add link annotations to markdown output in the format [text](url). When false,
878
+ * only the link text is included
879
+ */
880
+ annotate_links?: boolean | null;
881
+ /**
882
+ * Embed images directly in markdown as base64 data URIs instead of extracting them
883
+ * as separate files. Useful for self-contained markdown output
884
+ */
885
+ inline_images?: boolean | null;
886
+ /**
887
+ * Table formatting options including markdown vs HTML format and merging behavior
888
+ */
889
+ tables?: Markdown.Tables;
890
+ }
891
+ namespace Markdown {
892
+ /**
893
+ * Table formatting options including markdown vs HTML format and merging behavior
894
+ */
895
+ interface Tables {
896
+ /**
897
+ * Remove extra whitespace padding in markdown table cells for more compact output
898
+ */
899
+ compact_markdown_tables?: boolean | null;
900
+ /**
901
+ * Separator string for multiline cell content in markdown tables. Example:
902
+ * '&lt;br&gt;' to preserve line breaks, ' ' to join with spaces
903
+ */
904
+ markdown_table_multiline_separator?: string | null;
905
+ /**
906
+ * Automatically merge tables that span multiple pages into a single table. The
907
+ * merged table appears on the first page with merged_from_pages metadata
908
+ */
909
+ merge_continued_tables?: boolean | null;
910
+ /**
911
+ * Output tables as markdown pipe tables instead of HTML &lt;table&gt; tags.
912
+ * Markdown tables are simpler but cannot represent complex structures like merged
913
+ * cells
914
+ */
915
+ output_tables_as_markdown?: boolean | null;
916
+ }
917
+ }
918
+ /**
919
+ * Spatial text output options for preserving document layout structure
920
+ */
921
+ interface SpatialText {
922
+ /**
923
+ * Keep multi-column layouts intact instead of linearizing columns into sequential
924
+ * text. Automatically enabled for non-fast tiers
925
+ */
926
+ do_not_unroll_columns?: boolean | null;
927
+ /**
928
+ * Maintain consistent text column alignment across page boundaries. Automatically
929
+ * enabled for document-level parsing modes
930
+ */
931
+ preserve_layout_alignment_across_pages?: boolean | null;
932
+ /**
933
+ * Include text below the normal size threshold. Useful for footnotes, watermarks,
934
+ * or fine print that might otherwise be filtered out
935
+ */
936
+ preserve_very_small_text?: boolean | null;
937
+ }
938
+ /**
939
+ * Options for exporting tables as XLSX spreadsheets
940
+ */
941
+ interface TablesAsSpreadsheet {
942
+ /**
943
+ * Whether this option is enabled
944
+ */
945
+ enable?: boolean | null;
946
+ /**
947
+ * Automatically generate descriptive sheet names from table context (headers,
948
+ * surrounding text) instead of using generic names like 'Table_1'
949
+ */
950
+ guess_sheet_name?: boolean;
951
+ }
952
+ }
953
+ /**
954
+ * Page selection: limit total pages or specify exact pages to process
955
+ */
956
+ interface PageRanges {
957
+ /**
958
+ * Maximum number of pages to process. Pages are processed in order starting from
959
+ * page 1. If both max_pages and target_pages are set, target_pages takes
960
+ * precedence
961
+ */
962
+ max_pages?: number | null;
963
+ /**
964
+ * Comma-separated list of specific pages to process using 1-based indexing.
965
+ * Supports individual pages and ranges. Examples: '1,3,5' (pages 1, 3, 5), '1-5'
966
+ * (pages 1 through 5 inclusive), '1,3,5-8,10' (pages 1, 3, 5-8, and 10). Pages are
967
+ * sorted and deduplicated automatically. Duplicate pages cause an error
968
+ */
969
+ target_pages?: string | null;
970
+ }
971
+ /**
972
+ * Job execution controls including timeouts and failure thresholds
973
+ */
974
+ interface ProcessingControl {
975
+ /**
976
+ * Quality thresholds that determine when a job should fail vs complete with
977
+ * partial results
978
+ */
979
+ job_failure_conditions?: ProcessingControl.JobFailureConditions;
980
+ /**
981
+ * Timeout settings for job execution. Increase for large or complex documents
982
+ */
983
+ timeouts?: ProcessingControl.Timeouts;
984
+ }
985
+ namespace ProcessingControl {
986
+ /**
987
+ * Quality thresholds that determine when a job should fail vs complete with
988
+ * partial results
989
+ */
990
+ interface JobFailureConditions {
991
+ /**
992
+ * Maximum ratio of pages allowed to fail before the job fails (0-1). Example: 0.1
993
+ * means job fails if more than 10% of pages fail. Default is 0.05 (5%)
994
+ */
995
+ allowed_page_failure_ratio?: number | null;
996
+ /**
997
+ * Fail the job if a problematic font is detected that may cause incorrect text
998
+ * extraction. Buggy fonts can produce garbled or missing characters
999
+ */
1000
+ fail_on_buggy_font?: boolean | null;
1001
+ /**
1002
+ * Fail the entire job if any embedded image cannot be extracted. By default, image
1003
+ * extraction errors are logged but don't fail the job
1004
+ */
1005
+ fail_on_image_extraction_error?: boolean | null;
1006
+ /**
1007
+ * Fail the entire job if OCR fails on any image. By default, OCR errors result in
1008
+ * empty text for that image
1009
+ */
1010
+ fail_on_image_ocr_error?: boolean | null;
1011
+ /**
1012
+ * Fail the entire job if markdown cannot be reconstructed for any page. By
1013
+ * default, failed pages use fallback text extraction
1014
+ */
1015
+ fail_on_markdown_reconstruction_error?: boolean | null;
1016
+ }
1017
+ /**
1018
+ * Timeout settings for job execution. Increase for large or complex documents
1019
+ */
1020
+ interface Timeouts {
1021
+ /**
1022
+ * Base timeout for the job in seconds (max 1800 = 30 minutes). This is the minimum
1023
+ * time allowed regardless of document size
1024
+ */
1025
+ base_in_seconds?: number | null;
1026
+ /**
1027
+ * Additional timeout per page in seconds (max 300 = 5 minutes). Total timeout =
1028
+ * base + (this value × page count)
1029
+ */
1030
+ extra_time_per_page_in_seconds?: number | null;
1031
+ }
1032
+ }
1033
+ /**
1034
+ * Document processing options including OCR, table extraction, and chart parsing
1035
+ */
1036
+ interface ProcessingOptions {
1037
+ /**
1038
+ * Use aggressive heuristics to detect table boundaries, even without visible
1039
+ * borders. Useful for documents with borderless or complex tables
1040
+ */
1041
+ aggressive_table_extraction?: boolean | null;
1042
+ /**
1043
+ * Conditional processing rules that apply different parsing options based on page
1044
+ * content, document structure, or filename patterns. Each entry defines trigger
1045
+ * conditions and the parsing configuration to apply when triggered
1046
+ */
1047
+ auto_mode_configuration?: Array<ProcessingOptions.AutoModeConfiguration> | null;
1048
+ /**
1049
+ * Cost optimizer configuration for reducing parsing costs on simpler pages.
1050
+ *
1051
+ * When enabled, the parser analyzes each page and routes simpler pages to faster,
1052
+ * cheaper processing while preserving quality for complex pages. Only works with
1053
+ * 'agentic' or 'agentic_plus' tiers.
1054
+ */
1055
+ cost_optimizer?: ProcessingOptions.CostOptimizer | null;
1056
+ /**
1057
+ * Disable automatic heuristics including outlined table extraction and adaptive
1058
+ * long table handling. Use when heuristics produce incorrect results
1059
+ */
1060
+ disable_heuristics?: boolean | null;
1061
+ /**
1062
+ * Options for ignoring specific text types (diagonal, hidden, text in images)
1063
+ */
1064
+ ignore?: ProcessingOptions.Ignore;
1065
+ /**
1066
+ * OCR configuration including language detection settings
1067
+ */
1068
+ ocr_parameters?: ProcessingOptions.OcrParameters;
1069
+ /**
1070
+ * Enable AI-powered chart analysis. Modes: 'efficient' (fast, lower cost),
1071
+ * 'agentic' (balanced), 'agentic_plus' (highest accuracy). Automatically enables
1072
+ * extract_layout and precise_bounding_box when set
1073
+ */
1074
+ specialized_chart_parsing?: 'agentic_plus' | 'agentic' | 'efficient' | null;
1075
+ }
1076
+ namespace ProcessingOptions {
1077
+ /**
1078
+ * A single auto mode rule with trigger conditions and parsing configuration.
1079
+ *
1080
+ * Auto mode allows conditional parsing where different configurations are applied
1081
+ * based on page content, structure, or filename. When triggers match, the
1082
+ * parsing_conf overrides default settings for that page.
1083
+ */
1084
+ interface AutoModeConfiguration {
1085
+ /**
1086
+ * Parsing configuration to apply when trigger conditions are met
1087
+ */
1088
+ parsing_conf: AutoModeConfiguration.ParsingConf;
1089
+ /**
1090
+ * Single glob pattern to match against filename
1091
+ */
1092
+ filename_match_glob?: string | null;
1093
+ /**
1094
+ * List of glob patterns to match against filename
1095
+ */
1096
+ filename_match_glob_list?: Array<string> | null;
1097
+ /**
1098
+ * Regex pattern to match against filename
1099
+ */
1100
+ filename_regexp?: string | null;
1101
+ /**
1102
+ * Regex mode flags (e.g., 'i' for case-insensitive)
1103
+ */
1104
+ filename_regexp_mode?: string | null;
1105
+ /**
1106
+ * Trigger if page contains a full-page image (scanned page detection)
1107
+ */
1108
+ full_page_image_in_page?: boolean | null;
1109
+ /**
1110
+ * Threshold for full page image detection (0.0-1.0, default 0.8)
1111
+ */
1112
+ full_page_image_in_page_threshold?: number | string | null;
1113
+ /**
1114
+ * Trigger if page contains non-screenshot images
1115
+ */
1116
+ image_in_page?: boolean | null;
1117
+ /**
1118
+ * Trigger if page contains this layout element type
1119
+ */
1120
+ layout_element_in_page?: string | null;
1121
+ /**
1122
+ * Confidence threshold for layout element detection
1123
+ */
1124
+ layout_element_in_page_confidence_threshold?: number | string | null;
1125
+ /**
1126
+ * Trigger if page has more than N charts
1127
+ */
1128
+ page_contains_at_least_n_charts?: number | string | null;
1129
+ /**
1130
+ * Trigger if page has more than N images
1131
+ */
1132
+ page_contains_at_least_n_images?: number | string | null;
1133
+ /**
1134
+ * Trigger if page has more than N layout elements
1135
+ */
1136
+ page_contains_at_least_n_layout_elements?: number | string | null;
1137
+ /**
1138
+ * Trigger if page has more than N lines
1139
+ */
1140
+ page_contains_at_least_n_lines?: number | string | null;
1141
+ /**
1142
+ * Trigger if page has more than N links
1143
+ */
1144
+ page_contains_at_least_n_links?: number | string | null;
1145
+ /**
1146
+ * Trigger if page has more than N numeric words
1147
+ */
1148
+ page_contains_at_least_n_numbers?: number | string | null;
1149
+ /**
1150
+ * Trigger if page has more than N% numeric words
1151
+ */
1152
+ page_contains_at_least_n_percent_numbers?: number | string | null;
1153
+ /**
1154
+ * Trigger if page has more than N tables
1155
+ */
1156
+ page_contains_at_least_n_tables?: number | string | null;
1157
+ /**
1158
+ * Trigger if page has more than N words
1159
+ */
1160
+ page_contains_at_least_n_words?: number | string | null;
1161
+ /**
1162
+ * Trigger if page has fewer than N charts
1163
+ */
1164
+ page_contains_at_most_n_charts?: number | string | null;
1165
+ /**
1166
+ * Trigger if page has fewer than N images
1167
+ */
1168
+ page_contains_at_most_n_images?: number | string | null;
1169
+ /**
1170
+ * Trigger if page has fewer than N layout elements
1171
+ */
1172
+ page_contains_at_most_n_layout_elements?: number | string | null;
1173
+ /**
1174
+ * Trigger if page has fewer than N lines
1175
+ */
1176
+ page_contains_at_most_n_lines?: number | string | null;
1177
+ /**
1178
+ * Trigger if page has fewer than N links
1179
+ */
1180
+ page_contains_at_most_n_links?: number | string | null;
1181
+ /**
1182
+ * Trigger if page has fewer than N numeric words
1183
+ */
1184
+ page_contains_at_most_n_numbers?: number | string | null;
1185
+ /**
1186
+ * Trigger if page has fewer than N% numeric words
1187
+ */
1188
+ page_contains_at_most_n_percent_numbers?: number | string | null;
1189
+ /**
1190
+ * Trigger if page has fewer than N tables
1191
+ */
1192
+ page_contains_at_most_n_tables?: number | string | null;
1193
+ /**
1194
+ * Trigger if page has fewer than N words
1195
+ */
1196
+ page_contains_at_most_n_words?: number | string | null;
1197
+ /**
1198
+ * Trigger if page has more than N characters
1199
+ */
1200
+ page_longer_than_n_chars?: number | string | null;
1201
+ /**
1202
+ * Trigger on pages with markdown extraction errors
1203
+ */
1204
+ page_md_error?: boolean | null;
1205
+ /**
1206
+ * Trigger if page has fewer than N characters
1207
+ */
1208
+ page_shorter_than_n_chars?: number | string | null;
1209
+ /**
1210
+ * Regex pattern to match in page content
1211
+ */
1212
+ regexp_in_page?: string | null;
1213
+ /**
1214
+ * Regex mode flags for regexp_in_page
1215
+ */
1216
+ regexp_in_page_mode?: string | null;
1217
+ /**
1218
+ * Trigger if page contains a table
1219
+ */
1220
+ table_in_page?: boolean | null;
1221
+ /**
1222
+ * Trigger if page text/markdown contains this string
1223
+ */
1224
+ text_in_page?: string | null;
1225
+ /**
1226
+ * How to combine multiple trigger conditions: 'and' (all conditions must match,
1227
+ * this is the default) or 'or' (any single condition can trigger)
1228
+ */
1229
+ trigger_mode?: string | null;
1230
+ }
1231
+ namespace AutoModeConfiguration {
1232
+ /**
1233
+ * Parsing configuration to apply when trigger conditions are met
1234
+ */
1235
+ interface ParsingConf {
1236
+ /**
1237
+ * Whether to use adaptive long table handling
1238
+ */
1239
+ adaptive_long_table?: boolean | null;
1240
+ /**
1241
+ * Whether to use aggressive table extraction
1242
+ */
1243
+ aggressive_table_extraction?: boolean | null;
1244
+ /**
1245
+ * Crop box options for auto mode parsing configuration.
1246
+ */
1247
+ crop_box?: ParsingConf.CropBox | null;
1248
+ /**
1249
+ * Custom AI instructions for matched pages. Overrides the base custom_prompt
1250
+ */
1251
+ custom_prompt?: string | null;
1252
+ /**
1253
+ * Whether to extract layout information
1254
+ */
1255
+ extract_layout?: boolean | null;
1256
+ /**
1257
+ * Whether to use high resolution OCR
1258
+ */
1259
+ high_res_ocr?: boolean | null;
1260
+ /**
1261
+ * Ignore options for auto mode parsing configuration.
1262
+ */
1263
+ ignore?: ParsingConf.Ignore | null;
1264
+ /**
1265
+ * Primary language of the document
1266
+ */
1267
+ language?: string | null;
1268
+ /**
1269
+ * Whether to use outlined table extraction
1270
+ */
1271
+ outlined_table_extraction?: boolean | null;
1272
+ /**
1273
+ * Presentation-specific options for auto mode parsing configuration.
1274
+ */
1275
+ presentation?: ParsingConf.Presentation | null;
1276
+ /**
1277
+ * Spatial text options for auto mode parsing configuration.
1278
+ */
1279
+ spatial_text?: ParsingConf.SpatialText | null;
1280
+ /**
1281
+ * Enable specialized chart parsing with the specified mode
1282
+ */
1283
+ specialized_chart_parsing?: 'agentic_plus' | 'agentic' | 'efficient' | null;
1284
+ /**
1285
+ * Override the parsing tier for matched pages. Must be paired with version
1286
+ */
1287
+ tier?: 'fast' | 'cost_effective' | 'agentic' | 'agentic_plus' | null;
1288
+ /**
1289
+ * Tier version when overriding tier. Required when tier is specified
1290
+ */
1291
+ version?: '2025-12-11' | '2025-12-18' | '2025-12-31' | '2026-01-08' | '2026-01-09' | '2026-01-16' | '2026-01-21' | '2026-01-22' | '2026-01-24' | '2026-01-29' | '2026-01-30' | '2026-02-03' | '2026-02-18' | '2026-02-20' | '2026-02-24' | '2026-02-26' | '2026-03-02' | '2026-03-03' | '2026-03-04' | '2026-03-05' | '2026-03-09' | '2026-03-10' | '2026-03-11' | '2026-03-12' | '2026-03-17' | '2026-03-19' | '2026-03-20' | '2026-03-22' | '2026-03-23' | '2026-03-24' | '2026-03-25' | '2026-03-26' | '2026-03-27' | '2026-03-30' | '2026-03-31' | 'latest' | (string & {}) | null;
1292
+ }
1293
+ namespace ParsingConf {
1294
+ /**
1295
+ * Crop box options for auto mode parsing configuration.
1296
+ */
1297
+ interface CropBox {
1298
+ /**
1299
+ * Bottom boundary of crop box as ratio (0-1)
1300
+ */
1301
+ bottom?: number | null;
1302
+ /**
1303
+ * Left boundary of crop box as ratio (0-1)
1304
+ */
1305
+ left?: number | null;
1306
+ /**
1307
+ * Right boundary of crop box as ratio (0-1)
1308
+ */
1309
+ right?: number | null;
1310
+ /**
1311
+ * Top boundary of crop box as ratio (0-1)
1312
+ */
1313
+ top?: number | null;
1314
+ }
1315
+ /**
1316
+ * Ignore options for auto mode parsing configuration.
1317
+ */
1318
+ interface Ignore {
1319
+ /**
1320
+ * Whether to ignore diagonal text in the document
1321
+ */
1322
+ ignore_diagonal_text?: boolean | null;
1323
+ /**
1324
+ * Whether to ignore hidden text in the document
1325
+ */
1326
+ ignore_hidden_text?: boolean | null;
1327
+ }
1328
+ /**
1329
+ * Presentation-specific options for auto mode parsing configuration.
1330
+ */
1331
+ interface Presentation {
1332
+ /**
1333
+ * Extract out of bounds content in presentation slides
1334
+ */
1335
+ out_of_bounds_content?: boolean | null;
1336
+ /**
1337
+ * Skip extraction of embedded data for charts in presentation slides
1338
+ */
1339
+ skip_embedded_data?: boolean | null;
1340
+ }
1341
+ /**
1342
+ * Spatial text options for auto mode parsing configuration.
1343
+ */
1344
+ interface SpatialText {
1345
+ /**
1346
+ * Keep column structure intact without unrolling
1347
+ */
1348
+ do_not_unroll_columns?: boolean | null;
1349
+ /**
1350
+ * Preserve text alignment across page boundaries
1351
+ */
1352
+ preserve_layout_alignment_across_pages?: boolean | null;
1353
+ /**
1354
+ * Include very small text in spatial output
1355
+ */
1356
+ preserve_very_small_text?: boolean | null;
1357
+ }
1358
+ }
1359
+ }
1360
+ /**
1361
+ * Cost optimizer configuration for reducing parsing costs on simpler pages.
1362
+ *
1363
+ * When enabled, the parser analyzes each page and routes simpler pages to faster,
1364
+ * cheaper processing while preserving quality for complex pages. Only works with
1365
+ * 'agentic' or 'agentic_plus' tiers.
1366
+ */
1367
+ interface CostOptimizer {
1368
+ /**
1369
+ * Enable cost-optimized parsing. Routes simpler pages to faster processing while
1370
+ * complex pages use full AI analysis. May reduce speed on some documents.
1371
+ * IMPORTANT: Only available with 'agentic' or 'agentic_plus' tiers
1372
+ */
1373
+ enable?: boolean | null;
1374
+ }
1375
+ /**
1376
+ * Options for ignoring specific text types (diagonal, hidden, text in images)
1377
+ */
1378
+ interface Ignore {
1379
+ /**
1380
+ * Skip text rotated at an angle (not horizontal/vertical). Useful for ignoring
1381
+ * watermarks or decorative angled text
1382
+ */
1383
+ ignore_diagonal_text?: boolean | null;
1384
+ /**
1385
+ * Skip text marked as hidden in the document structure. Some PDFs contain
1386
+ * invisible text layers used for accessibility or search indexing
1387
+ */
1388
+ ignore_hidden_text?: boolean | null;
1389
+ /**
1390
+ * Skip OCR text extraction from embedded images. Use when images contain
1391
+ * irrelevant text (watermarks, logos) that shouldn't be in the output
1392
+ */
1393
+ ignore_text_in_image?: boolean | null;
1394
+ }
1395
+ /**
1396
+ * OCR configuration including language detection settings
1397
+ */
1398
+ interface OcrParameters {
1399
+ /**
1400
+ * Languages to use for OCR text recognition. Specify multiple languages if
1401
+ * document contains mixed-language content. Order matters - put primary language
1402
+ * first. Example: ['en', 'es'] for English with Spanish
1403
+ */
1404
+ languages?: Array<ParsingAPI.ParsingLanguages> | null;
1405
+ }
1406
+ }
1407
+ /**
1408
+ * Webhook configuration for receiving parsing job notifications.
1409
+ *
1410
+ * Webhooks are called when specified events occur during job processing. Configure
1411
+ * multiple webhook configurations to send to different endpoints.
1412
+ */
1413
+ interface WebhookConfiguration {
1414
+ /**
1415
+ * Events that trigger this webhook. Options: 'parse.success' (job completed),
1416
+ * 'parse.failure' (job failed), 'parse.partial' (some pages failed). If not
1417
+ * specified, webhook fires for all events
1418
+ */
1419
+ webhook_events?: Array<string> | null;
1420
+ /**
1421
+ * Custom HTTP headers to include in webhook requests. Use for authentication
1422
+ * tokens or custom routing. Example: {'Authorization': 'Bearer xyz'}
1423
+ */
1424
+ webhook_headers?: {
1425
+ [key: string]: unknown;
1426
+ } | null;
1427
+ /**
1428
+ * HTTPS URL to receive webhook POST requests. Must be publicly accessible
1429
+ */
1430
+ webhook_url?: string | null;
1431
+ }
1432
+ }
1433
+ /**
1434
+ * Catch-all for configurations without a dedicated typed schema.
1435
+ *
1436
+ * Accepts arbitrary JSON fields alongside `product_type`.
1437
+ */
1438
+ interface UntypedParameters {
1439
+ /**
1440
+ * Product type.
1441
+ */
1442
+ product_type: 'unknown';
1443
+ [k: string]: unknown;
1444
+ }
1445
+ }
1446
+ export interface ExtractCreateParams {
1447
+ /**
1448
+ * Body param: File ID or parse job ID to extract from
1449
+ */
1450
+ file_input: string;
1451
+ /**
1452
+ * Query param
1453
+ */
1454
+ organization_id?: string | null;
1455
+ /**
1456
+ * Query param
1457
+ */
1458
+ project_id?: string | null;
1459
+ /**
1460
+ * Body param: Extract configuration combining parse and extract settings.
1461
+ */
1462
+ configuration?: ExtractConfiguration | null;
1463
+ /**
1464
+ * Body param: Saved configuration ID
1465
+ */
1466
+ configuration_id?: string | null;
1467
+ /**
1468
+ * Body param: Outbound webhook endpoints to notify on job status changes
1469
+ */
1470
+ webhook_configurations?: Array<ExtractCreateParams.WebhookConfiguration> | null;
1471
+ }
1472
+ export declare namespace ExtractCreateParams {
1473
+ /**
1474
+ * Configuration for a single outbound webhook endpoint.
1475
+ */
1476
+ interface WebhookConfiguration {
1477
+ /**
1478
+ * Events to subscribe to (e.g. 'parse.success', 'extract.error'). If null, all
1479
+ * events are delivered.
1480
+ */
1481
+ webhook_events?: Array<'extract.pending' | 'extract.success' | 'extract.error' | 'extract.partial_success' | 'extract.cancelled' | 'parse.pending' | 'parse.running' | 'parse.success' | 'parse.error' | 'parse.partial_success' | 'parse.cancelled' | 'classify.pending' | 'classify.success' | 'classify.error' | 'classify.partial_success' | 'classify.cancelled' | 'unmapped_event'> | null;
1482
+ /**
1483
+ * Custom HTTP headers sent with each webhook request (e.g. auth tokens)
1484
+ */
1485
+ webhook_headers?: {
1486
+ [key: string]: string;
1487
+ } | null;
1488
+ /**
1489
+ * Response format sent to the webhook: 'string' (default) or 'json'
1490
+ */
1491
+ webhook_output_format?: string | null;
1492
+ /**
1493
+ * URL to receive webhook POST notifications
1494
+ */
1495
+ webhook_url?: string | null;
1496
+ }
1497
+ }
1498
+ export interface ExtractListParams extends PaginatedCursorParams {
1499
+ /**
1500
+ * Filter by configuration ID
1501
+ */
1502
+ configuration_id?: string | null;
1503
+ /**
1504
+ * Include items created at or after this timestamp (inclusive)
1505
+ */
1506
+ created_at_on_or_after?: string | null;
1507
+ /**
1508
+ * Include items created at or before this timestamp (inclusive)
1509
+ */
1510
+ created_at_on_or_before?: string | null;
1511
+ /**
1512
+ * Filter by document input type (file_id or parse_job_id)
1513
+ */
1514
+ document_input_type?: string | null;
1515
+ /**
1516
+ * @deprecated Deprecated: use file_input instead
1517
+ */
1518
+ document_input_value?: string | null;
1519
+ /**
1520
+ * Additional fields to include: configuration, extract_metadata
1521
+ */
1522
+ expand?: Array<string>;
1523
+ /**
1524
+ * Filter by file input value
1525
+ */
1526
+ file_input?: string | null;
1527
+ /**
1528
+ * Filter by specific job IDs
1529
+ */
1530
+ job_ids?: Array<string> | null;
1531
+ organization_id?: string | null;
1532
+ project_id?: string | null;
1533
+ /**
1534
+ * Filter by status
1535
+ */
1536
+ status?: 'PENDING' | 'THROTTLED' | 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | null;
1537
+ }
1538
+ export interface ExtractDeleteParams {
1539
+ organization_id?: string | null;
1540
+ project_id?: string | null;
1541
+ }
1542
+ export interface ExtractGenerateSchemaParams {
1543
+ /**
1544
+ * Query param
1545
+ */
1546
+ organization_id?: string | null;
1547
+ /**
1548
+ * Query param
1549
+ */
1550
+ project_id?: string | null;
1551
+ /**
1552
+ * Body param: Optional schema to validate, refine, or extend
1553
+ */
1554
+ data_schema?: {
1555
+ [key: string]: {
1556
+ [key: string]: unknown;
1557
+ } | Array<unknown> | string | number | boolean | null;
1558
+ } | null;
1559
+ /**
1560
+ * Body param: Optional file ID to analyze for schema generation
1561
+ */
1562
+ file_id?: string | null;
1563
+ /**
1564
+ * Body param: Name for the generated configuration (auto-generated if omitted)
1565
+ */
1566
+ name?: string | null;
1567
+ /**
1568
+ * Body param: Natural language description of the data structure to extract
1569
+ */
1570
+ prompt?: string | null;
1571
+ }
1572
+ export interface ExtractGetParams {
1573
+ /**
1574
+ * Additional fields to include: configuration, extract_metadata
1575
+ */
1576
+ expand?: Array<string>;
1577
+ organization_id?: string | null;
1578
+ project_id?: string | null;
1579
+ }
1580
+ export interface ExtractValidateSchemaParams {
1581
+ /**
1582
+ * JSON Schema to validate for use with extract jobs
1583
+ */
1584
+ data_schema: {
1585
+ [key: string]: {
1586
+ [key: string]: unknown;
1587
+ } | Array<unknown> | string | number | boolean | null;
1588
+ };
1589
+ }
1590
+ export declare namespace Extract {
1591
+ export { type ExtractConfiguration as ExtractConfiguration, type ExtractJobMetadata as ExtractJobMetadata, type ExtractJobUsage as ExtractJobUsage, type ExtractV2Job as ExtractV2Job, type ExtractV2JobCreate as ExtractV2JobCreate, type ExtractV2JobQueryResponse as ExtractV2JobQueryResponse, type ExtractV2SchemaGenerateRequest as ExtractV2SchemaGenerateRequest, type ExtractV2SchemaValidateRequest as ExtractV2SchemaValidateRequest, type ExtractV2SchemaValidateResponse as ExtractV2SchemaValidateResponse, type ExtractedFieldMetadata as ExtractedFieldMetadata, type ExtractDeleteResponse as ExtractDeleteResponse, type ExtractGenerateSchemaResponse as ExtractGenerateSchemaResponse, type ExtractV2JobsPaginatedCursor as ExtractV2JobsPaginatedCursor, type ExtractCreateParams as ExtractCreateParams, type ExtractListParams as ExtractListParams, type ExtractDeleteParams as ExtractDeleteParams, type ExtractGenerateSchemaParams as ExtractGenerateSchemaParams, type ExtractGetParams as ExtractGetParams, type ExtractValidateSchemaParams as ExtractValidateSchemaParams, };
1592
+ }
1593
+ //# sourceMappingURL=extract.d.ts.map