Smart OCR / Technical reference
API Docs.
Everything needed to authenticate, upload, and process documents with the implemented developer API. The documentation shows routes even when they are not yet activated.
API Base URL
https://www.staging.smartocr.io/api/v1
Bearer token · HTTPS on production
01 / Get started
Authentication
Generate an API key in your Smart OCR account. Pass the key using the Authorization header for every developer request. Never expose keys in public JavaScript, URLs or logs.
POST uploads use multipart/form-data, and developer API requests do not require the website's Turnstile token.
02 / Endpoint catalog
Conversion routes
These three routes are implemented by the server. Their current enabled status depends on the active Tool Settings and your API subscription.
POST · /api/v1/image-to-text
Image to Text
Recognize text in an image or scanned page. Plain text and formatted modes are supported.
| Field | Required | Value / description |
|---|---|---|
| image | Yes | Multipart upload file |
| mode | No | simple, formatted (aliases: plain, layout) |
| batch_total | No | Optional number of files in submitted batch |
Output: JSON: text, mode, render_mode and formatting metadata. Response structure depends on conversion mode.
curl -X POST 'https://www.staging.smartocr.io/api/v1/image-to-text' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-F 'image={{ $detail['file'] ?? 'image.png' }}' \
-F 'mode=simple'This endpoint is documented but not enabled by current tool settings. Enable the appropriate modes through Smart OCR administration before attempting live requests. No credit price is asserted here.
POST · /api/v1/jpg-to-excel
JPG to Excel
Detect tables and text from uploaded images. Returns structured spreadsheet data.
| Field | Required | Value / description |
|---|---|---|
| image | Yes | Multipart upload file |
| mode | No | table, auto, rows |
| batch_total | No | Optional number of files in submitted batch |
Output: JSON conversion output including table data / export fields. Response structure depends on conversion mode.
curl -X POST 'https://www.staging.smartocr.io/api/v1/jpg-to-excel' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-F 'image={{ $detail['file'] ?? 'image.png' }}' \
-F 'mode=table'This endpoint is documented but not enabled by current tool settings. Enable the appropriate modes through Smart OCR administration before attempting live requests. No credit price is asserted here.
POST · /api/v1/jpg-to-word
JPG to Word
Create an editable Word document from one or more uploaded images.
| Field | Required | Value / description |
|---|---|---|
| images[] | Yes | Multipart upload file |
| mode | Yes | direct, text, formatted |
| batch_total | No | Optional number of files in submitted batch |
Output: Document download or conversion output depending on mode. Response structure depends on conversion mode.
curl -X POST 'https://www.staging.smartocr.io/api/v1/jpg-to-word' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-F 'images[]={{ $detail['file'] ?? 'image.png' }}' \
-F 'mode=text'This endpoint is documented but not enabled by current tool settings. Enable the appropriate modes through Smart OCR administration before attempting live requests. No credit price is asserted here.
Word to Excel website tool
Word to Excel is available on the public website. A separate /api/v1/word-to-excel developer route is not implemented in the provided Laravel API routes and is not advertised here.
03 / Handle responses
Responses and errors
Successful conversions return content or conversion-specific metadata. Check the response status and content type, and handle binary downloads as files when applicable. Validation errors use Laravel JSON responses.
| HTTP code | Meaning | Action |
|---|---|---|
| 200 | Successful processing | Read returned content or download |
| 401 | Missing or invalid key | Check bearer token |
| 403 | Not authorized / permission denied | Check subscription and API permissions |
| 422 | Invalid file, mode or parameters | Correct upload fields and supported modes |
| 429 | Rate or usage limit reached | Wait, reduce usage or upgrade |
| 500 | Server processing error | Retry later and contact support if persistent |
04 / Production checklist
Limits & security
- ✓ Use HTTPS in production and store API keys in server-side secrets.
- ✓ Respect your plan's file-size, batch and credit allowances.
- ✓ Use multipart/form-data for images and images[] for Word document conversion.
- ✓ Handle rate limiting and failures without exposing uploaded user files.
- ✓ Avoid logging authorization headers or raw file contents.
- ✓ Enable only the modes you intend to offer in Tool Settings.