Skip to content

Base85 Encoder API

Overview

Encodes text using Base85. The endpoint accepts synchronous text in body mode, or an input file through asynchronous URL or file mode.

Endpoint

Property Value
Method POST
URL https://api.apidatatools.com/base85-encoder-api

Authentication

Include your API key in the x-api-key header on every request:

x-api-key: YOUR_API_KEY

Input modes

Set x-source-type to select a mode. If omitted, it defaults to body.

Mode Processing Description
body Synchronous Send raw text in the request body.
url Asynchronous Submit a URL to a .txt or .log file.
file Asynchronous Submit the exact storage key returned by the upload workflow for a .txt or .log file.

Headers

Header names are case-insensitive. The lowercase spellings below are documented.

Header Type Required Default / values Description
x-api-key String Yes Your API key Authenticates the request.
x-source-type String No body; body, url, or file Selects the input mode.

Accepted file extensions

URL and file modes accept .txt and .log inputs.

Request body

Body mode

Send the text to encode as the raw request body. This is a text endpoint, not a binary-body endpoint.

URL mode

Send a JSON object containing the URL:

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

File mode

Send a JSON object containing the exact storage key returned by the upload workflow:

{
  "file": "S3_KEY_RETURNED_BY_THE_UPLOAD_WORKFLOW"
}

curl examples

Body mode

curl -X POST 'https://api.apidatatools.com/base85-encoder-api' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'x-source-type: body' \
  --data-raw 'Text to encode'

URL mode

curl -X POST 'https://api.apidatatools.com/base85-encoder-api' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'x-source-type: url' \
  --data-raw '{"url":"https://example.com/input.txt"}'

File mode

curl -X POST 'https://api.apidatatools.com/base85-encoder-api' \
  -H 'x-api-key: YOUR_API_KEY' \
  -H 'x-source-type: file' \
  --data-raw '{"file":"S3_KEY_RETURNED_BY_THE_UPLOAD_WORKFLOW"}'

Success responses

Synchronous body mode

A successful body-mode request returns HTTP 200. This endpoint produces a file; file contains its temporary download URL and preview contains a preview of the output.

{
  "request_id": "REQUEST_ID",
  "status": "success",
  "file": "https://downloads.apidatatools.com/TEMPORARY_OUTPUT_URL",
  "preview": "BASE85_OUTPUT_PREVIEW"
}

Download URLs are temporary. Availability and retention depend on your plan.

Asynchronous URL and file modes

A valid URL- or file-mode request returns HTTP 202 with a job ID and a URL for checking its status:

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

Async job status

Poll GET https://api.apidatatools.com/jobs/{job_id} using the same API key. The status response includes request_id, job_id, status, created_at, and updated_at.

curl -X GET 'https://api.apidatatools.com/jobs/JOB_ID' \
  -H 'x-api-key: YOUR_API_KEY'

The status response varies with the job state:

  • Queued or processing: includes the common fields, plus message and retry_after.
  • Success: includes the common fields and result. The result contains status, file, and preview.
  • Failed: includes the common fields and error, with code, message, and details.

Queued or processing example:

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

Success example:

{
  "request_id": "REQUEST_ID",
  "job_id": "JOB_ID",
  "status": "success",
  "created_at": 1792000000,
  "updated_at": 1792000002,
  "result": {
    "status": "success",
    "file": "https://downloads.apidatatools.com/TEMPORARY_OUTPUT_URL",
    "preview": "BASE85_OUTPUT_PREVIEW"
  }
}

Failed example:

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

Error handling

Errors use this envelope. Additional fields may appear in details.

{
  "status": "error",
  "error": "ERROR_CODE",
  "request_id": "REQUEST_ID",
  "details": {
    "message": "Error description"
  }
}
HTTP status Error codes When it applies
400 INVALID_SOURCE_TYPE, INVALID_BODY_ENCODING, EMPTY_BODY Invalid mode, invalid encoded request body, or empty request body. Converter execution errors also return 400.
400 INVALID_BODY, INVALID_URL, URL_UNREACHABLE, URL_NOT_OK, INVALID_FILE, FILE_UNAVAILABLE, INVALID_FILE_EXTENSION Invalid asynchronous request body, URL, or file input.
401 UNAUTHORIZED Authentication is missing or invalid.
404 USER_NOT_FOUND, UNKNOWN_FUNCTION User or endpoint was not found.
413 PAYLOAD_TOO_LARGE Body exceeds the limit for the plan.
413 FILE_TOO_LARGE URL or file input exceeds the effective file limit for the plan.
429 QUOTA_EXCEEDED, RATE_LIMITED Plan quota or rate limit was reached.
500 PLAN_NOT_FOUND, INTERNAL_ERROR, CONFIG_ERROR, PLAN_CONFIG_ERROR Plan configuration or processing failure.

Errors from GET /jobs/{job_id} include INVALID_JOB_ID, JOB_NOT_FOUND, FORBIDDEN, and DDB_ERROR; these are returned as HTTP 400 by the status API.

Notes

  • Body mode is synchronous. URL and file modes create asynchronous jobs.
  • Request-body, file-size, quota, rate, and output-retention limits depend on your plan. See tool limits.
  • Async output download URLs are temporary; retention depends on your plan.