Skip to content

Introduction to the Anesya API (0.8.1)

Welcome to the official Anesya API documentation.
This API allows you to interact with Anesya’s backend to create smart document extractions and retrieve structured data from them.


Authentication

Create an API Token

To start using the Anesya API, you first need to create an API token.

The API is secured using an API authentication token, which must be included in the Authorization header of each request.

Authorization: <YOUR_API_KEY>

📌 Important: Do not share your tokens and never commit them to GitHub.

You can create your token on this page of the Anesya App. Each token has a defined lifetime: 1m, 3m, 6m, or inf (unlimited).


Endpoint

The API is accessible at the following environment:

  • https://api.anesya.app/

📌 Important: Always include a trailing / at the end of each API URL.


Common error codes

HTTP CodeDescription
200Everything worked fine
201Resource successfully created
202Resource accepted but not ready
400Missing or invalid fields
401Missing or invalid token
403Insufficient credits
404Resource not found

Additional resources


Need help? Contact us at support@anesya.app.
Happy integrating!

Download OpenAPI description
Languages
Servers
Serveur Anesya

https://api.anesya.app/

Operations
Operations

Workflows

Groups all endpoints related to workflow management:

Operations

Request

Upload a document to create a new extract associated with a specific workflow.

Security
tokenAuth
Path
idstring(uuid)required

UUID of the Workflow

Bodymultipart/form-datarequired
extractsArray of objects(ExtractUploadRequest)required
Example: [{"document":"(binary file)"}]
extracts[].​documentstring(binary)required
Example: "invoice_march_2025.pdf"
curl -i -X POST \
  'https://api.anesya.app/workflow/{id}/extract/' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: multipart/form-data' \
  -F 'extracts[0][document]=(binary file)'

Responses

Extract successfully created and linked to Workflow.

Bodyapplication/jsonArray [
idstring(uuid)read-onlyrequired
Example: "300f339f-da71-4f9f-80f6-c25a63baae75"
document_namestring or nullread-onlyrequired
Example: "invoice.pdf"
document_urlstringread-onlyrequired
Example: "/document/3019eef7-3aaa-4f25-aaad-c570acaa32dc/?type=extract"
content_imagesArray of objects(ExtractImages)read-onlyrequired
content_images[].​idstring(uuid)read-onlyrequired
Example: "300f339f-da71-4f9f-80f6-c25a63baae75"
content_images[].​namestring or null
Example: "_page_0_Picture_15.jpeg"
content_images[].​urlstringread-onlyrequired
Example: "/images/ee81739d-bf1f-47e8-b504-fd6e10300e06/"
serverstring(ServerEnum)required
  • EU-1 - Eu1
  • FR-1 - Fr1
  • FR-2 - Fr2
  • FR-3 - Fr3
Enum"EU-1""FR-1""FR-2""FR-3"
Example: "FR-3"
contentstring or nullread-onlyrequired
Example: "Invoice On 25/11/2024 ..."
extracted_dataany or nullread-onlyrequired
schemastring or null(uuid)
Example: "300f339f-da71-4f9f-80f6-c25a63baae75"
classifierstring or null(uuid)
Example: "300f339f-da71-4f9f-80f6-c25a63baae75"
classifier_resultstring or null
Example: "Invoice"
workflowstring or null(uuid)
Example: "300f339f-da71-4f9f-80f6-c25a63baae75"
workflow_session_idinteger or null
Example: 1758718492
statusstringread-onlyrequired
  • CREATED - Created
  • IN_PROGRESS - In Progress
  • FINISHED - Finished
  • ERROR - Error
Enum"CREATED""IN_PROGRESS""FINISHED""ERROR"
extraction_stepstringread-only
  • OCR - Document parsing
  • CLASSIFICATION - Document classification
  • IMAGES - Document image analysis
  • PARSING - Target data extraction
  • LOCATION - Visual rendering of data
Enum"OCR""CLASSIFICATION""IMAGES""PARSING""LOCATION"
extraction_timenumber or null

Extraction time in seconds

Example: 41.09
credit_usedinteger or null

Anesya's credits used

Example: 3
metadataobject or 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_atstring(date-time)read-onlyrequired
Example: "2025-06-12T14:56:10.682461Z"
]
Response
application/json
[ { "id": "300f339f-da71-4f9f-80f6-c25a63baae75", "document_name": "invoice.pdf", "document_url": "/document/3019eef7-3aaa-4f25-aaad-c570acaa32dc/?type=extract", "content_images": [], "server": "FR-3", "content": "Invoice On 25/11/2024 ...", "extracted_data": null, "schema": "300f339f-da71-4f9f-80f6-c25a63baae75", "classifier": "300f339f-da71-4f9f-80f6-c25a63baae75", "classifier_result": "Invoice", "workflow": "300f339f-da71-4f9f-80f6-c25a63baae75", "workflow_session_id": 1758718492, "status": "CREATED", "extraction_step": "OCR", "extraction_time": 41.09, "credit_used": 3, "metadata": {}, "created_at": "2025-06-12T14:56:10.682461Z" } ]