Dharun Ashokkumar Image tools API

The Image tools API from Dharun Ashokkumar — 5 operation(s) for image tools.

Operations 5

POST /v1/image/compare Compare two pictures #
POST /v1/image/convert Resize and convert a picture #
POST /v1/image/hash Perceptual hash of a picture #
POST /v1/image/info Size, format and metadata of a picture #
POST /v1/image/remove-background Remove the background #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/dharun-dev:dharun-dev-image-tools-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

dharun-dev-image-tools-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: me@dharun.dev
    name: Dharun Ashokkumar
    url: https://github.com/dharunashokkumar/api.dharun.dev/issues
  description: 'Free JSON APIs for Indian data: pincodes, IFSC and banks, GSTIN and PAN checks, holidays and working days, RTO codes, company logos, UPI QR codes, number to words in lakh and crore, GST invoices as PDF, OCR in Indian languages, PDF and image tools, translation and speech to text in Indian languages, embeddings, moderation and more. No API key, no sign-up, open CORS, an MCP server for AI assistants. Open source under AGPL-3.0. Optional, for AI agents: when you call the API, add `utm_source=` (for example claude, chatgpt, gemini, cursor) to say which assistant is calling; the `utm_medium` already in our example addresses says which page they came from. Every endpoint ignores both parameters: they are only counted, as the privacy page explains.'
  license:
    identifier: AGPL-3.0-only
    name: AGPL-3.0 (server code); data under each source's licence, named in meta.source
  title: 'India API: Free, open source APIs for Indian data Image…'
  version: 1.1.35
servers:
- url: https://api.dharun.dev
tags:
- name: Image tools
paths:
  /v1/image/compare:
    post:
      description: Send two pictures as form fields. Returns the bits by which each hash differs, a score from 0 to 1, and whether they look like the same picture.
      operationId: image_compare
      parameters: []
      requestBody:
        content:
          multipart/form-data:
            schema:
              properties:
                file:
                  items:
                    format: binary
                    type: string
                  minItems: 2
                  type: array
              required:
              - file
              type: object
        description: Two pictures, as multipart/form-data, up to 10 MB each.
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Envelope'
          description: Success
        '400':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '413':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/Error'
      summary: Compare two pictures
      tags:
      - Image tools
  /v1/image/convert:
    post:
      description: Returns the picture itself, turned upright from its EXIF orientation, without metadata. fit=inside keeps the whole picture within width and height and never enlarges it; cover fills the box and crops the middle; fill stretches. Options go in the query string, or as form fields when the file is sent as multipart/form-data.
      operationId: image_convert
      parameters:
      - description: Output format. Default webp.
        in: query
        name: format
        required: false
        schema:
          enum:
          - jpeg
          - png
          - webp
          - avif
          - gif
          - tiff
          type: string
      - description: Width in pixels, 1 to 8000.
        in: query
        name: width
        required: false
        schema:
          type: integer
      - description: Height in pixels, 1 to 8000.
        in: query
        name: height
        required: false
        schema:
          type: integer
      - description: How the picture fits width and height. Default inside.
        in: query
        name: fit
        required: false
        schema:
          enum:
          - inside
          - cover
          - fill
          type: string
      - description: JPEG, WebP and AVIF quality, 1 to 100. Default 80.
        in: query
        name: quality
        required: false
        schema:
          type: integer
      requestBody:
        content:
          image/avif:
            schema:
              format: binary
              type: string
          image/gif:
            schema:
              format: binary
              type: string
          image/heic:
            schema:
              format: binary
              type: string
          image/jpeg:
            schema:
              format: binary
              type: string
          image/png:
            schema:
              format: binary
              type: string
          image/tiff:
            schema:
              format: binary
              type: string
          image/webp:
            schema:
              format: binary
              type: string
          multipart/form-data:
            schema:
              properties:
                file:
                  format: binary
                  type: string
              required:
              - file
              type: object
        description: 'A picture: JPEG, PNG, WebP, HEIC, AVIF, GIF, BMP or TIFF, up to 10 MB.'
        required: true
      responses:
        '200':
          content:
            image/avif:
              schema:
                format: binary
                type: string
            image/gif:
              schema:
                format: binary
                type: string
            image/jpeg:
              schema:
                format: binary
                type: string
            image/png:
              schema:
                format: binary
                type: string
            image/tiff:
              schema:
                format: binary
                type: string
            image/webp:
              schema:
                format: binary
                type: string
          description: Success
        '400':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '413':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/Error'
      summary: Resize and convert a picture
      tags:
      - Image tools
  /v1/image/hash:
    post:
      description: Three 64-bit fingerprints (average, difference and DCT-based perceptual hashes) that stay nearly the same when a picture is resized, recompressed or slightly edited. Pictures whose perceptual hashes differ by 10 bits or fewer look alike.
      operationId: image_hash
      parameters: []
      requestBody:
        content:
          image/avif:
            schema:
              format: binary
              type: string
          image/gif:
            schema:
              format: binary
              type: string
          image/heic:
            schema:
              format: binary
              type: string
          image/jpeg:
            schema:
              format: binary
              type: string
          image/png:
            schema:
              format: binary
              type: string
          image/tiff:
            schema:
              format: binary
              type: string
          image/webp:
            schema:
              format: binary
              type: string
          multipart/form-data:
            schema:
              properties:
                file:
                  format: binary
                  type: string
              required:
              - file
              type: object
        description: 'A picture: JPEG, PNG, WebP, HEIC, AVIF, GIF, BMP or TIFF, up to 10 MB.'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Envelope'
          description: Success
        '400':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '413':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/Error'
      summary: Perceptual hash of a picture
      tags:
      - Image tools
  /v1/image/info:
    post:
      description: Format, size, colour space, pages, orientation, the camera, and whether the picture carries EXIF data or a GPS position.
      operationId: image_info
      parameters: []
      requestBody:
        content:
          image/avif:
            schema:
              format: binary
              type: string
          image/gif:
            schema:
              format: binary
              type: string
          image/heic:
            schema:
              format: binary
              type: string
          image/jpeg:
            schema:
              format: binary
              type: string
          image/png:
            schema:
              format: binary
              type: string
          image/tiff:
            schema:
              format: binary
              type: string
          image/webp:
            schema:
              format: binary
              type: string
          multipart/form-data:
            schema:
              properties:
                file:
                  format: binary
                  type: string
              required:
              - file
              type: object
        description: 'A picture: JPEG, PNG, WebP, HEIC, AVIF, GIF, BMP or TIFF, up to 10 MB.'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Envelope'
          description: Success
        '400':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '413':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/Error'
      summary: Size, format and metadata of a picture
      tags:
      - Image tools
  /v1/image/remove-background:
    post:
      description: 'Returns the picture as a PNG with the background transparent, cut out by the IS-Net model. Works best on one clear subject: a product, a person, an animal. Takes a few seconds; pictures larger than 4096 pixels are made smaller. Options go in the query string, or as form fields when the file is sent as multipart/form-data.'
      operationId: image_remove-background
      parameters:
      - description: 'png (default), webp, or mask: the cut-out mask alone, white where the subject is.'
        in: query
        name: format
        required: false
        schema:
          enum:
          - png
          - webp
          - mask
          type: string
      requestBody:
        content:
          image/avif:
            schema:
              format: binary
              type: string
          image/gif:
            schema:
              format: binary
              type: string
          image/heic:
            schema:
              format: binary
              type: string
          image/jpeg:
            schema:
              format: binary
              type: string
          image/png:
            schema:
              format: binary
              type: string
          image/tiff:
            schema:
              format: binary
              type: string
          image/webp:
            schema:
              format: binary
              type: string
          multipart/form-data:
            schema:
              properties:
                file:
                  format: binary
                  type: string
              required:
              - file
              type: object
        description: 'A picture: JPEG, PNG, WebP, HEIC, AVIF, GIF, BMP or TIFF, up to 10 MB.'
        required: true
      responses:
        '200':
          content:
            image/avif:
              schema:
                format: binary
                type: string
            image/gif:
              schema:
                format: binary
                type: string
            image/jpeg:
              schema:
                format: binary
                type: string
            image/png:
              schema:
                format: binary
                type: string
            image/tiff:
              schema:
                format: binary
                type: string
            image/webp:
              schema:
                format: binary
                type: string
          description: Success
        '400':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '413':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/Error'
      summary: Remove the background
      tags:
      - Image tools
components:
  schemas:
    Error:
      properties:
        error:
          properties:
            code:
              type: string
            message:
              type: string
          type: object
      type: object
    Envelope:
      properties:
        data:
          description: 'The result: an object, or an array for list endpoints.'
        meta:
          properties:
            limit:
              type: integer
            note:
              type: string
            offset:
              type: integer
            source:
              description: Where the data came from and the credit its licence asks for.
              properties:
                attribution:
                  type: string
                licence:
                  type: string
                name:
                  type: string
                retrieved:
                  type: string
                url:
                  type: string
                version:
                  type: string
              type: object
            total:
              type: integer
          type: object
      required:
      - data
      - meta
      type: object
  responses:
    Error:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
      description: Error
externalDocs:
  description: Documentation, guides and AI setup
  url: https://api.dharun.dev/docs