Add api for document analysis.