# Creates a new extraction. Creates a new extraction with or without a theme (extraction schema). Endpoint: POST /extract/ Version: 0.8.1 Security: tokenAuth ## Query parameters: - `pdf_page_start` (integer) Start page (PDF only) - `pdf_page_end` (integer) End page (PDF only) ## Request fields (multipart/form-data): - `document` (string, required) Document to process, accepted : .pdf / .png / .jpg / .jpeg - `server` (string, required) * - Eu1 * - Fr1 * - Fr2 * - Fr3 Enum: "EU-1", "FR-1", "FR-2", "FR-3" - `schema` (string,null) ID of the schema you want to use Example: "1f25b8af-eb35-4caf-8f3f-5edd3a79beee" - `classifier` (string,null) ID of the classifier you want to use Example: "1f25b8af-eb35-4caf-8f3f-5edd3a79beee" - `metadata` (object,null) Key-value store for custom information related to the extract. Can be used to attach arbitrary structured data (e.g. identifiers, tags, integration info). Example: {"personal_id":"1234567890"} ## Response 201 fields (application/json): - `id` (string, required) Example: "300f339f-da71-4f9f-80f6-c25a63baae75" - `document_name` (string,null, required) Example: "invoice.pdf" - `document_url` (string, required) Example: "/document/3019eef7-3aaa-4f25-aaad-c570acaa32dc/?type=extract" - `content_images` (array, required) - `content_images.name` (string,null) Example: "_page_0_Picture_15.jpeg" - `content_images.url` (string, required) Example: "/images/ee81739d-bf1f-47e8-b504-fd6e10300e06/" - `server` (string, required) * - Eu1 * - Fr1 * - Fr2 * - Fr3 Enum: "EU-1", "FR-1", "FR-2", "FR-3" - `content` (string,null, required) Example: "Invoice On 25/11/2024 ..." - `extracted_data` (any,null, required) - `schema` (string,null) Example: "300f339f-da71-4f9f-80f6-c25a63baae75" - `classifier` (string,null) Example: "300f339f-da71-4f9f-80f6-c25a63baae75" - `classifier_result` (string,null) Example: "Invoice" - `workflow` (string,null) Example: "300f339f-da71-4f9f-80f6-c25a63baae75" - `workflow_session_id` (integer,null) Example: 1758718492 - `status` (string, required) * - Created * - In Progress * - Finished * - Error Enum: "CREATED", "IN_PROGRESS", "FINISHED", "ERROR" - `extraction_step` (string) * - Document parsing * - Document classification * - Document image analysis * - Target data extraction * - Visual rendering of data Enum: "OCR", "CLASSIFICATION", "IMAGES", "PARSING", "LOCATION" - `extraction_time` (number,null) Extraction time in seconds Example: 41.09 - `credit_used` (integer,null) Anesya's credits used Example: 3 - `metadata` (object,null) Key-value store for custom information related to the extract. Can be used to attach arbitrary structured data (e.g. identifiers, tags, integration info). Example: {"personal_id":"1234567890"} - `created_at` (string, required) Example: "2025-06-12T14:56:10.682461Z" ## Response 400 fields (application/json): - `field_name` (array, required) Liste des erreurs pour un champ spécifique ## Response 401 fields (application/json): - `detail` (string, required) Message principal de l'erreur Example: "Given token not valid for any token type" - `code` (string, required) Code d'erreur JWT Example: "token_not_valid" - `messages` (array, required) Liste des messages d'erreur détaillés - `messages.token_class` (string, required) Type de token JWT Example: "AccessToken" - `messages.token_type` (string, required) Type de token (ex: access) Example: "access" - `messages.message` (string, required) Description de l'erreur Example: "Token is expired" ## Response 403 fields (application/json): - `field_name` (array, required) Liste des erreurs pour un champ spécifique