POST /v1/core/hash-file
File hash
MD5, SHA-1, SHA-256, SHA-512 or BLAKE2 of anything you upload, to verify a download matched.
Get the checksum of a file now No key, no code — 1 credit either way.
curl -X POST "$DOATHING_API/v1/core/hash-file" \
-H "x-api-key: $DOATHING_KEY" \
-H "content-type: application/json" \
-d '{"file": {"filename": "notes.txt", "content_type": "text/plain", "data_b64": "aGVsbG8="}}'
MD5, SHA-1, SHA-256, SHA-512 or BLAKE2 of anything you upload, to verify a download matched.
Compute md5, sha1, sha256, sha512 and blake2b digests of an uploaded file.
Input
Send a file object with base64 data_b64, its content_type and a filename. Accepted types: application/octet-stream, text/plain, application/pdf, image/png, image/jpeg.
The declared type is not trusted — the bytes are sniffed and a contradiction is rejected rather than corrected.
Response
The result carries your remaining balance alongside it, so you can track spend without a second call.
{
"sha256": "2cf24dba5fb0a30e26e83b2ac5b9e29e…",
"size_bytes": 5,
"request_id": "37f01edb-0163-42a1-ac51-0acaef979800",
"credits_remaining": 96
}
Cost
1 credit per call, whether it is run from the site or from the API — the credential differs, the price does not. A new account starts with 20 credits.
A rejected request still costs a credit: the authorizer decrements before the tool validates. A call rejected for a missing or invalid key is free.
Parameters
Generated from the endpoint’s own validation, so this is exactly what it accepts. A body field goes at the top level; an option goes inside options.
| Name | In | Type | Default | Notes |
|---|---|---|---|---|
| algorithms | options | string[] | — | Any of md5, sha1, sha256, sha512, blake2b. All by default. from md5, sha1, sha256, sha512, blake2b |