LoginTry for free

API Documentation

This guide provides detailed instructions on how to use the IMG2HTML API to convert images into HTML code. Follow the provided examples for cURL, Node.js, Python, Go, and Ruby to get started.

Endpoint Description

Send a POST request with your email, API key, and image file as formData to convert your images to HTML code. The expected response is a JSON object with a `status` set to `true` and an `html` field containing the generated HTML code.

POST /api/generate-html

Requirements

  • Email - Your registered email address.
  • API Key - Your personal API key for authentication. Generate it in your profile section.
  • File - The image file you want to convert to HTML.

Examples

cURL

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

Node.js

Python

Go

Ruby