SHA1 Hash API Endpoint - Free Public API

Endpoint URL:

https://aisenseapi.com/services/v1/sha1_hash

Description:

This endpoint generates an SHA1 hash from the provided input. It accepts JSON, plain text, or file uploads, computes the SHA1 hash, and returns it in a JSON response. If the input is invalid or missing, an appropriate error message is returned.

Response Format

  • Content-Type: application/json

Example Success Response

{ "sha1_hash": "2aae6c35c94fcfb415dbe95f408b9ce91ee846ed" }

Example Error Responses

{ "error": "Invalid data provided. Expected a string." }
{ "error": "No data to hash or invalid input." }
{ "error": "An unexpected error occurred: error details" }

Input Requirements

The API accepts input in three formats:

  • JSON Input json
    { "data": "Hello world" }
  • Plain Text Input
    Hello world
  • File Upload (e.g., an image)
    • The file must be sent as multipart/form-data under the key file.
    • The API will compute the SHA1 hash of the file contents.

Use Cases

  • Generating SHA1 hashes for text validation or integrity checks.
  • Computing a hash fingerprint of file.
  • Comparing SHA1 hashes for data verification.

How to Use

1. Send a POST request to

https://aisenseapi.com/services/v1/sha1_hash

2. Choose your input format

  • JSON input json
    { "data": "Hello world" }
  • Plain text input
    Hello world
  • File upload
    [...data from file...]
    • The file content will be hashed.

3. Handle the response

  • If the input is valid, the response contains the computed SHA1 hash.
  • If the input is missing or invalid, an error message is returned.

Example cURL Requests

Generate SHA1 Hash from JSON Input

curl -X POST https://aisenseapi.com/services/v1/sha1_hash \
-H "Content-Type: application/json" \
-d '{"data":"Hello world"}'

Generate SHA1 Hash from Plain Text Input

curl -X POST https://aisenseapi.com/services/v1/sha1_hash \
-H "Content-Type: text/plain" \
--data "Hello world"

Generate SHA1 Hash from a File

curl -X POST https://aisenseapi.com/services/v1/sha1_hash \
-F "file=@/path/to/file.png"

Key Features

  • Supports JSON, text, and file input
  • Computes an SHA1 hash from the provided data
  • Ensures clear error handling for invalid input
  • No authentication required – free public API
Scroll to Top