IMG2HTML: API दस्तावेज़ीकरण

Send an image, receive HTML. The IMG2HTML API runs the same conversion as the web app: one POST request with your email, your API key and the image file as multipart form data, and a JSON response with the generated HTML (Tailwind CSS). Each conversion uses one credit. API access is included in the Starter, Plus and Advanced plans; create the API key in your profile.

Endpoint

POST https://api.img2html.com/api/generate-html

  • email: the email address of your IMG2HTML account.
  • api_key: your personal API key, generated in the profile section.
  • file: the image to convert (PNG, JPG, WebP, GIF or BMP).

Response: a JSON object with status set to true and an html field containing the generated HTML.

Example with cURL

curl -X POST https://api.img2html.com/api/generate-html \
  -F '[email protected]' \
  -F 'api_key=your_api_key' \
  -F 'file=@path_to_your_file'

The documentation page also has the same request in Node.js, Python, Go and Ruby. Plans and credits: pricing.