Developer API

JPEG To Text API Documentation

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.

JPEG To Text

Base URL

https://jpegtotext.com

Headers

Authorization: Bearer YOUR_API_KEY
Content-Type: multipart/form-data

Base URL

API Base URL

All developer API requests should be sent to the JPEG To Text API base URL.

URL

https://jpegtotext.com/api/v1

Authentication

API Key Header

Each API request must include your developer API key in the Authorization header.

Header

Authorization: Bearer YOUR_API_KEY

Endpoints

Current API Endpoints

These endpoints cover image OCR, structured Excel extraction, editable Word export, and PDF conversion.

Image to Text

1 credit / image for Simple OCR, 10 credits / image for Formatted OCR

POST

/api/v1/image-to-text

JPG to Excel

15 credits / image

POST

/api/v1/jpg-to-excel

JPG to Word

5 credits / image

POST

/api/v1/jpg-to-word

JPG to PDF

1 credit / image

POST

/api/v1/jpg-to-pdf

Image to Text

POST

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

JPG to Excel

POST

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

JPG to Word

POST

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

JPG to PDF

POST

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

Image to Text Request

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

Success Response

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

Error Response

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
}