Skip to content

Base16 Decoder API

Overview

Decode Base16 (hexadecimal) text into its decoded output. The endpoint accepts raw text synchronously or processes an input file asynchronously.

Base16 input is case-insensitive. Spaces, tabs, carriage returns, and line feeds are ignored during decoding.

Endpoint

POST https://api.apidatatools.com/base16-decoder-api

Authentication

Include your API key in the x-api-key header:

x-api-key: YOUR_API_KEY

Header names are case-insensitive. The lowercase spellings shown on this page are the documented forms.

Input modes

Select a mode with x-source-type.

Mode Processing Request format
body Synchronous Raw Base16 text
url Asynchronous JSON object containing a url
file Asynchronous JSON object containing a previously uploaded file key

If x-source-type is omitted, the mode defaults to body.

Headers

Header Type Required Default / values Description
x-api-key String Yes None API key used for authentication.
x-source-type String No body; body, url, or file Selects synchronous body input or asynchronous URL/file input.
x-record-path String No Not specified Detected header. The supplied Base16 decoder source does not define endpoint-specific behavior for it.
x-root-name String No Not specified Detected header. The supplied Base16 decoder source does not define endpoint-specific behavior for it.
x-tab-space String No Not specified Detected header. The supplied Base16 decoder source does not define endpoint-specific behavior for it.

Accepted file extensions

For url and file modes, the input file extension must be txt or log.

Request body

Body mode

Send raw Base16 text as the request body. Do not wrap it in JSON. The body must not be empty.

URL mode

Send a JSON object with a URL:

{"url":"https://example.com/input.txt"}

The URL must use HTTP or HTTPS and identify a file with an accepted extension.

File mode

Send a JSON object whose file value is the exact storage key returned by the upload workflow:

{"file":"S3_KEY_RETURNED_BY_THE_UPLOAD_WORKFLOW"}

The file must have an accepted extension.

curl examples

Body mode

curl -X POST "https://api.apidatatools.com/base16-decoder-api" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "x-source-type: body" \
  --data-raw '48656c6c6f'

URL mode

curl -X POST "https://api.apidatatools.com/base16-decoder-api" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "x-source-type: url" \
  -H "Content-Type: application/json" \
  --data '{"url":"https://example.com/input.txt"}'

File mode

curl -X POST "https://api.apidatatools.com/base16-decoder-api" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "x-source-type: file" \
  -H "Content-Type: application/json" \
  --data '{"file":"S3_KEY_RETURNED_BY_THE_UPLOAD_WORKFLOW"}'

Success responses

Synchronous body mode

A successful synchronous file-producing request returns HTTP 200 with a JSON response containing request_id, status, file, and preview.

{
  "request_id": "REQUEST_ID",
  "status": "success",
  "file": "TEMPORARY_DOWNLOAD_URL",
  "preview": "Decoded output preview"
}

The file URL is temporary. Download retention depends on the plan.

Asynchronous URL and file modes

A successful job submission returns HTTP 202:

{
  "status": "accepted",
  "job_id": "JOB_ID",
  "status_url": "https://api.apidatatools.com/jobs/JOB_ID",
  "request_id": "REQUEST_ID"
}

Async job status

Poll the job status using:

GET https://api.apidatatools.com/jobs/{job_id}

The status endpoint returns HTTP 200 for a job state. Its response shapes are:

Queued or processing

Both queued and processing responses include the same pending fields:

{
  "request_id": "REQUEST_ID",
  "job_id": "JOB_ID",
  "status": "queued",
  "created_at": 0,
  "updated_at": 0,
  "message": "Your job is being processed.",
  "retry_after": 2
}

For a processing job, status is "processing". The timestamps are Unix epoch seconds.

Success

{
  "request_id": "REQUEST_ID",
  "job_id": "JOB_ID",
  "status": "success",
  "created_at": 0,
  "updated_at": 0,
  "result": {
    "status": "success",
    "file": "TEMPORARY_DOWNLOAD_URL",
    "preview": "Decoded output preview"
  }
}

Failed

{
  "request_id": "REQUEST_ID",
  "job_id": "JOB_ID",
  "status": "failed",
  "created_at": 0,
  "updated_at": 0,
  "error": {
    "code": "ERROR_CODE",
    "message": "Error message",
    "details": {}
  }
}

The error fields reflect the stored job failure; message or code may be null if not present in the stored failure response. Download URLs are temporary, with retention depending on the plan.

Error handling

Errors use this envelope:

{
  "status": "error",
  "error": "ERROR_CODE",
  "request_id": "REQUEST_ID",
  "details": {
    "message": "Description of the error"
  }
}

Additional fields may appear in details.

HTTP statuses

HTTP status Error code(s) When it applies
400 INVALID_SOURCE_TYPE x-source-type is not body, url, or file.
400 INVALID_BODY_ENCODING The request body cannot be decoded from the transport’s Base64 encoding.
400 EMPTY_BODY The request body is empty.
400 INVALID_BODY An asynchronous request body is invalid JSON or is not a JSON object.
400 INVALID_URL, URL_UNREACHABLE, URL_NOT_OK The URL is invalid, unreachable, or responds with a status other than 200 or 206 during validation.
400 INVALID_FILE, FILE_UNAVAILABLE, INVALID_FILE_EXTENSION The file reference is invalid or unavailable, or the input extension is unsupported.
400 Tool validation errors Tool execution errors are returned as HTTP 400.
401 UNAUTHORIZED Authentication is missing or invalid.
404 USER_NOT_FOUND, UNKNOWN_FUNCTION The authenticated user cannot be found, or the endpoint is not recognized.
404 JOB_NOT_FOUND The requested job does not exist.
403 FORBIDDEN The requested job does not belong to the authenticated user.
413 PAYLOAD_TOO_LARGE A body-mode request exceeds the body-size limit for the plan.
413 FILE_TOO_LARGE A URL or uploaded file exceeds the applicable plan limit.
429 QUOTA_EXCEEDED, RATE_LIMITED The plan quota or rate limit has been reached.
500 PLAN_NOT_FOUND, CONFIG_ERROR, PLAN_CONFIG_ERROR, INTERNAL_ERROR Plan configuration, asynchronous job configuration, or request processing fails.
500 DDB_ERROR The job status service cannot query job data.

Asynchronous job execution failures are reported in the job’s failed status response; poll the status URL to retrieve them.

Notes

  • Body mode is synchronous. URL and file modes are asynchronous.
  • Body-size limits, file-size limits, quota, rate limits, and download retention depend on the plan. See tool limits.
  • The decoded result is returned as a file; the preview field is a preview of that output.