FileOnion AI - Document Analysis API (1.0.1)

Download OpenAPI specification:Download

The FileOnion Document AI API provides a powerful set of tools for processing and analyzing documents.
This documentation outlines the available endpoints and their usage. The API supports multiple
file formats and provides detailed content extraction, including text and image analysis.
This API is particularly useful for applications that require document processing, content extraction, and text analysis.

Features

  • Document Storage: Securely store and manage your documents with ease.
  • Document Analysis: Analyze documents to extract meaningful insights and data.
  • Text Extraction: Extract text from various document formats for further processing.
  • Image Analysis: Analyze images within documents to identify and extract relevant information.
  • Content Summarization: Automatically summarize the content of documents for quick understanding.
  • Tagging and Categorization: Organize documents by tagging and categorizing them for easy retrieval.
  • Chat with Documents: Interact with your documents through a chat interface to get information quickly.
  • Document Removal: Safely remove documents that are no longer needed.

Supported File Types

  • PDF (.pdf)
  • Microsoft Word (.docx)
  • Microsoft Excel (.xlsx, .xls, .cfb)
  • CSV (.csv)
  • Plain Text (.txt)
  • Images (.png, .jpg, .jpeg, .webp)

Authentication

The API uses JWT-based authentication. To access the endpoints, you need to provide a valid JWT token in the Authorization header. Note: The JWT token should be prefixed with 'Bearer'. If you don't have a JWT token, please contact the FileOnion team at support@fileonion.com obtain one.

Store Documents in the FileOnion System

This endpoint enables you to upload documents to the FileOnion system. You can specify a callback URL to receive notifications regarding the storage process, and provide a list of document URLs. In response, you'll receive details about each stored document, including its assigned URL, collection ID, original size, and processing time.

Authorizations:
BearerAuth
Request Body schema: application/json
required
callbackUrl
string <uri>

The URL where the system will send a notification upon successful storage.

documentUrls
required
Array of strings <uri> [ items <uri > ]

A list of URLs pointing to the documents to be stored.

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json
[]

Chat with Uploaded Documents.

This endpoint utilizes AI to search through previously uploaded documents for content that aligns with the specified prompt. The endpoint processes the query against the documents in the designated collection and returns results that match the query's intent.

Parameters:

  • Collection: The specific collection of documents to search.
  • Query: The prompt or query to be used for the search.
  • Stream: (Optional) Set to true to receive results in a streaming format, allowing for incremental updates as the search progresses.
  • Functionality: The endpoint processes the query against the documents in the designated collection and returns results that match the query's intent.
Authorizations:
BearerAuth
Request Body schema: application/json
required
collection
required
string

The name of the collection containing the documents to search.

query
required
string

The prompt or query to search for.

stream
boolean

Whether to stream results as they are found (default false).

Responses

Request samples

Content type
application/json
{
  • "collection": "395d8207-c910-4705-9e88-5eb00b24a324",
  • "query": "Give me a list of questions to ask",
  • "stream": false
}

Response samples

Content type
application/json
{
  • "answer": "Based on the provided context, here are some questions you might consider asking:\n\n1. How does the proposed system maintain privacy while announcing all transactions publicly?\n2. What role do public keys play in maintaining anonymity in the transaction process?\n3. Why should a new key pair be used for each transaction?\n4. What are the potential risks associated with multi-input transactions in terms of privacy?\n5. How does the system prevent double-spending without a trusted third party?\n6. What is the role of the timestamp server in this electronic cash system?\n7. How does the proof-of-work mechanism contribute to the security of the network?\n8. What does it mean for the network to be robust in its unstructured simplicity?\n9. How do nodes express their acceptance of valid blocks?\n10. What are the potential consequences if an attacker generates an alternate chain faster than the honest chain?\n11. How does the probability of an attacker catching up with the honest chain change with the number of blocks?\n12. Why is it important for the majority of CPU power to be controlled by honest nodes?\n13. What are the weaknesses of the traditional trust-based model of online commerce?\n14. How does the proposed system address the issue of non-reversible transactions?\n15. What are the advantages of using a peer-to-peer network for electronic transactions?",
  • "sourceDocuments": [
    ]
}

Remove Documents Collection

This endpoint enables you to delete documents from the FileOnion system. The endpoint will process the request, remove the specified documents from the specified collections, and send a notification to the provided callback URL (if specified) when the process is complete. If no callback URL is provided, the results will be returned in JSON format.

Parameters:

  • Callback URL: (Optional) The URL where you'd like to receive notifications about the document removal process. If no callback URL is provided, the results will be returned as JSON.
  • Collections: A list of collections containing the documents you wish to delete.
Authorizations:
BearerAuth
Request Body schema: application/json
required
callbackUrl
string <uri>

The URL where the system will send a notification upon successful removal.

collections
required
Array of strings

A list of collection names to delete.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
[
  • {
    }
]

Analyze documents in the FileOnion system.

This endpoint enables you to submit documents for analysis. The endpoint will process the documents, generate detailed summaries, identify relevant tags, and provide information about the original document size and processing time. The results will be sent to the specified callback URL (if provided) or returned in JSON format.

Parameters:

  • Callback URL: (Optional) The URL where you'd like to receive notifications about the analysis process. If no callback URL is provided, the results will be returned as JSON.
  • Document URLs: A list of URLs pointing to the documents you wish to analyze.
Authorizations:
BearerAuth
Request Body schema: application/json
required
callbackUrl
string <uri>

The URL where the system will send a notification upon successful analysis.

documentUrls
required
Array of strings <uri> [ items <uri > ]

A list of URLs pointing to the documents to be analyzed.

Responses

Request samples

Content type
application/json
{}

Response samples

Content type
application/json
[
  • {
    }
]

Analyze Uploaded Images.

This endpoint enables you to submit images for analysis. The endpoint will process uploaded images, generate detailed summaries, identify relevant tags, and provide information about the original document size and processing time. The results will be sent to the specified callback URL (if provided) or returned in JSON format.

Parameters:

  • Callback URL: (Optional) The URL where you'd like to receive notifications about the analysis process. If no callback URL is provided, the results will be returned as JSON.
  • Image URLs: A list of URLs pointing to the documents you wish to analyze.
Authorizations:
BearerAuth
Request Body schema: application/json
required
callbackUrl
string <uri>

The URL where the system will send a notification upon successful analysis.

imageUrls
required
Array of strings <uri> [ items <uri > ]

A list of URLs pointing to the images to be analyzed.

Responses

Request samples

Content type
application/json

Response samples

Content type
application/json
[]