Skip to content

feat: Add Mistral AI OCR API integration #2404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

apappascs
Copy link
Contributor

@apappascs apappascs commented Mar 7, 2025

This commit introduces the Mistral AI OCR API integration to Spring AI.

  • Added MistralOcrApi class for interacting with the Mistral OCR endpoint.
  • Added MistralOcrApiIT integration test.
  • Updated documentation to include OCR API usage instructions.

This allows users to extract text and image data from documents using Mistral AI's OCR capabilities.

Announcement: https://mistral.ai/news/mistral-ocr/

Api: https://docs.mistral.ai/api/#tag/ocr
Documentation: https://docs.mistral.ai/capabilities/document/


resolves #2582

@apappascs apappascs force-pushed the feature/mistral-ocr-api branch 2 times, most recently from e888da4 to 42e9b84 Compare March 19, 2025 16:50
Copy link

@ABcDexter ABcDexter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good, will be testing them today.

@apappascs apappascs requested a review from ABcDexter April 7, 2025 10:50
This commit introduces the Mistral AI OCR API integration to Spring AI.

- Added `MistralOcrApi` class for interacting with the Mistral OCR endpoint.
- Added `MistralOcrApiIT` integration test.
- Updated documentation to include OCR API usage instructions.

This allows users to extract text and image data from documents using Mistral AI's OCR capabilities.

Announcement: https://mistral.ai/news/mistral-ocr/
Signed-off-by: Alexandros Pappas <apappascs@gmail.com>
- Introduce `MistralAiOcrAutoConfiguration` for Spring Boot auto-configuration.
- Add `MistralAiOcrProperties` for managing OCR-related settings.
- Implement `MistralAiOcrOptions` for OCR request customization.
- Add corresponding test classes for auto-configuration and options.

Signed-off-by: Alexandros Pappas <apappascs@gmail.com>
@apappascs apappascs force-pushed the feature/mistral-ocr-api branch from 42e9b84 to 60b9ff8 Compare April 16, 2025 10:13
@apappascs
Copy link
Contributor Author

Hi @sobychacko @ilayaperumalg, following up to see if there's any visibility on the review timeline for this Mistral OCR PR as bandwidth allows?

@msansm1
Copy link

msansm1 commented Apr 28, 2025

Can this PR be reviewed ? I need this for my client project, if it can be in the next milestone this would be great !
Thanks,

@markpollack markpollack added this to the 1.0.x milestone May 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Mistral OCR
4 participants