Image to Text
1 credit / image for Simple OCR, 10 credits / image for Formatted OCR
/api/v1/image-to-text
Developer API
Use JPEG To Text API access to convert images into text, Excel files, Word documents, and PDF files from your own app, website, or workflow.
Base URL
https://jpegtotext.com
Headers
Authorization: Bearer YOUR_API_KEY
Content-Type: multipart/form-data
Base URL
All developer API requests should be sent to the JPEG To Text API base URL.
URL
https://jpegtotext.com/api/v1
Authentication
Each API request must include your developer API key in the Authorization header.
Header
Authorization: Bearer YOUR_API_KEY
Endpoints
These endpoints cover image OCR, structured Excel extraction, editable Word export, and PDF conversion.
1 credit / image for Simple OCR, 10 credits / image for Formatted OCR
/api/v1/image-to-text
15 credits / image
/api/v1/jpg-to-excel
5 credits / image
/api/v1/jpg-to-word
1 credit / image
/api/v1/jpg-to-pdf
Extract readable text from uploaded images with simple OCR or formatted OCR mode.
Endpoint
/api/v1/image-to-text
Request Body: file, mode
Mode: simple or formatted
Credits: 1 credit / image for Simple OCR, 10 credits / image for Formatted OCR
Convert images containing tables or structured data into spreadsheet-ready output.
Endpoint
/api/v1/jpg-to-excel
Request Body: file
Mode: structured table extraction
Credits: 15 credits / image
Convert image text into an editable Word document output.
Endpoint
/api/v1/jpg-to-word
Request Body: file
Mode: editable DOCX export
Credits: 5 credits / image
Convert uploaded JPG images into clean, organized PDF files.
Endpoint
/api/v1/jpg-to-pdf
Request Body: file
Mode: PDF conversion
Credits: 1 credit / image
cURL Example
This example sends one image to the Image to Text endpoint using simple OCR mode.
Request
curl -X POST "https://jpegtotext.com/api/v1/image-to-text" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json" \
-F "file=@/path/to/image.jpg" \
-F "mode=simple"
Responses
A successful response includes the selected tool, selected mode, credits used, remaining credits, and the conversion result.
JSON
{
"success": true,
"tool": "image-to-text",
"mode": "simple",
"credits_used": 1,
"remaining_credits": 2999,
"result": {
"text": "Extracted text from the uploaded image"
}
}
| Field | Type | Description |
|---|---|---|
success
|
boolean | Shows whether the request was completed successfully. |
tool
|
string | The tool endpoint used for the conversion request. |
mode
|
string | The selected conversion mode, when the tool supports modes. |
credits_used
|
integer | Total credits charged for the uploaded file. |
remaining_credits
|
integer | Remaining monthly or purchased API credits after processing. |
result
|
object | The conversion result returned by the selected tool. |
Errors
Failed API requests return a clear error message with the required credits and remaining credits when the issue is related to usage balance.
JSON
{
"success": false,
"message": "Insufficient credits.",
"required_credits": 15,
"remaining_credits": 8
}