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

Request

Fetch a list of all available extractions.

Security
tokenAuth
Query
pageinteger

Number of the page.

Default 1
searchstring

(Optional) Allows searching within the fields extract.document_name and extract.schema.name

sizeinteger

Page size.

Default 50
workflow_idstring(uuid)

(Optional) Optional id of a workflow to filter by.

workflow_session_idinteger

(Optional) Optional id of a workflow session to filter by.

meta_keystring

(Optional) Recherche un extract qui contient la clé meta_key dans ses metadatas.

meta_valuestring

(Optional) Recherche un extract qui contient la valeur meta_value dans ses metadatas.

curl -i -X GET \
  'https://api.anesya.app/extract/?page=1&search=string&size=50&workflow_id=497f6eca-6276-4993-bfeb-53cbbbba6f08&workflow_session_id=0&meta_key=string&meta_value=string' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

List of extractions

Bodyapplication/json
countintegerrequired
Example: 1
nextstring or nullrequired
Example: "https://api.anesya.app/schema/?page=3&size=50"
previousstring or nullrequired
Example: "https://api.anesya.app/schema/?page=2&size=50"
resultsArray of objects(ExtractList)required
results[].​idstring(uuid)read-onlyrequired
Example: "300f339f-da71-4f9f-80f6-c25a63baae75"
results[].​document_namestring or nullread-onlyrequired
Example: "invoice.pdf"
results[].​document_urlstringread-onlyrequired
Example: "/document/3019eef7-3aaa-4f25-aaad-c570acaa32dc/?type=extract"
results[].​workflowstring(uuid)read-only
Example: "300f339f-da71-4f9f-80f6-c25a63baae75"
results[].​workflow_session_idintegerread-only
Example: 1758716706
results[].​schemaobjectread-only
results[].​classifierstring(uuid)read-only
Example: "300f339f-da71-4f9f-80f6-c25a63baae75"
results[].​serverstringread-only
  • EU-1 - Eu1
  • FR-1 - Fr1
  • FR-2 - Fr2
  • FR-3 - Fr3
Enum"EU-1""FR-1""FR-2""FR-3"
Example: "FR-3"
results[].​statusstringread-onlyrequired
  • CREATED - Created
  • IN_PROGRESS - In Progress
  • FINISHED - Finished
  • ERROR - Error
Enum"CREATED""IN_PROGRESS""FINISHED""ERROR"
results[].​errorstring or nullread-onlyrequired
Example: "Failed to extract"
results[].​created_atstring(date-time)read-onlyrequired
Example: "2025-06-12T14:56:10.682461Z"
Response
application/json
{ "count": 1, "next": "https://api.anesya.app/schema/?page=3&size=50", "previous": "https://api.anesya.app/schema/?page=2&size=50", "results": [ {} ] }

Request

Creates a new extraction with or without a theme (extraction schema).

Security
tokenAuth
Query
pdf_page_startinteger>= 1

Start page (PDF only)

Default 1
pdf_page_endinteger<= 30

End page (PDF only)

Default 30
Bodymultipart/form-datarequired
documentstring(binary)required

Document to process, accepted : .pdf / .png / .jpg / .jpeg

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"
schemastring or null(uuid)

ID of the schema you want to use

Example: "1f25b8af-eb35-4caf-8f3f-5edd3a79beee"
classifierstring or null(uuid)

ID of the classifier you want to use

Example: "1f25b8af-eb35-4caf-8f3f-5edd3a79beee"
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"}
curl -i -X POST \
  'https://api.anesya.app/extract/?pdf_page_start=1&pdf_page_end=30' \
  -H 'Authorization: YOUR_API_KEY_HERE' \
  -H 'Content-Type: multipart/form-data' \
  -F document=string \
  -F server=FR-3 \
  -F schema=1f25b8af-eb35-4caf-8f3f-5edd3a79beee \
  -F classifier=1f25b8af-eb35-4caf-8f3f-5edd3a79beee \
  -F 'metadata[personal_id]=1234567890'

Responses

Extract successfully created.

Bodyapplication/json
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": { "personal_id": "1234567890" }, "created_at": "2025-06-12T14:56:10.682461Z" }

Request

Extraction details.

Security
tokenAuth
Path
idstringrequired
Query
downloadstring

(Optional) Content download format:

  • csv → Download tabular data
  • images → Download associated images (.zip)
  • json → Download the full JSON
⚠️ If not specified, CSV is selected by default.
⚠️ If no schema is present in the extraction, nothing will be downloaded.

Default "csv"
Enum"csv""images""json"
curl -i -X GET \
  'https://api.anesya.app/extract/{id}/?download=csv' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

Extract details

Bodyapplication/json
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": { "personal_id": "1234567890" }, "created_at": "2025-06-12T14:56:10.682461Z" }

Request

⚠️ Permanently delete an extraction.

Security
tokenAuth
Path
idstringrequired
curl -i -X DELETE \
  'https://api.anesya.app/extract/{id}/' \
  -H 'Authorization: YOUR_API_KEY_HERE'

Responses

No response body

Response
No content
Operations

Workflows

Groups all endpoints related to workflow management:

Operations