Base85 Decoder API¶
Overview¶
Decodes Base85-encoded text. Body mode processes the request synchronously; URL and file modes create an asynchronous job.
Endpoint¶
POST https://api.apidatatools.com/base85-decoder-api
Authentication¶
Send your API key in the x-api-key header:
x-api-key: YOUR_API_KEY
Input modes¶
| Mode | Description |
|---|---|
body | Send Base85-encoded text directly. This mode is synchronous. |
url | Submit a URL to a supported input file. This mode is asynchronous. |
file | Submit the exact storage key returned by the upload workflow. This mode is asynchronous. |
The x-source-type header selects the mode and defaults to body.
Headers¶
Header names are case-insensitive. The lowercase spellings are shown here.
| Header | Type | Required | Default / values | Description |
|---|---|---|---|---|
x-api-key | String | Yes | — | API key used to authenticate the request. |
x-source-type | String | No | body; body, url, or file | Selects the input mode. |
Accepted file extensions¶
For URL and file modes, the accepted extensions are .txt and .log.
Request body¶
Body mode¶
Send the Base85-encoded input as raw text. Do not wrap it in JSON.
URL mode¶
Send a JSON object with a url field:
{
"url": "https://example.com/input.txt"
}
File mode¶
Send a JSON object with a file field containing the exact storage key returned by the upload workflow:
{
"file": "S3_KEY_RETURNED_BY_THE_UPLOAD_WORKFLOW"
}
curl examples¶
Body mode¶
Put the Base85 text in encoded.txt, then send that file as the raw request body:
curl -X POST "https://api.apidatatools.com/base85-decoder-api" \
-H "x-api-key: YOUR_API_KEY" \
-H "x-source-type: body" \
--data-binary @encoded.txt
URL mode¶
curl -X POST "https://api.apidatatools.com/base85-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/base85-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 body-mode request returns HTTP 200 with a JSON response containing a temporary output download URL and a preview:
{
"request_id": "REQUEST_ID",
"status": "success",
"file": "TEMPORARY_DOWNLOAD_URL",
"preview": "Decoded output preview"
}
Asynchronous URL and file modes¶
A successfully accepted request 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 returned status URL with an authenticated GET request:
curl -X GET "https://api.apidatatools.com/jobs/JOB_ID" \
-H "x-api-key: YOUR_API_KEY"
The status endpoint returns HTTP 200 for a retrieved job. While the job is queued or processing, the response has this shape:
{
"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
}
status is queued or processing while work is pending.
On success, the response includes result:
{
"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"
}
}
On failure, the response includes error:
{
"request_id": "REQUEST_ID",
"job_id": "JOB_ID",
"status": "failed",
"created_at": 0,
"updated_at": 0,
"error": {
"code": "ERROR_CODE",
"message": "Failure message",
"details": {
"message": "Failure message"
}
}
}
Error handling¶
Error responses use this envelope. Additional fields may appear in details.
{
"status": "error",
"error": "ERROR_CODE",
"request_id": "REQUEST_ID",
"details": {
"message": "Description of the error"
}
}
The following HTTP statuses are grounded in the endpoint and job-status implementations:
| HTTP status | Error codes / conditions |
|---|---|
400 | INVALID_SOURCE_TYPE, EMPTY_BODY; asynchronous request validation errors including INVALID_BODY, INVALID_URL, URL_UNREACHABLE, URL_NOT_OK, INVALID_FILE, FILE_UNAVAILABLE, and INVALID_FILE_EXTENSION. Tool execution errors are also returned as HTTP 400 in body mode. The status endpoint returns HTTP 400 for INVALID_JOB_ID, JOB_NOT_FOUND, FORBIDDEN, and DDB_ERROR. |
401 | UNAUTHORIZED |
404 | USER_NOT_FOUND, UNKNOWN_FUNCTION |
413 | PAYLOAD_TOO_LARGE for an oversized body; FILE_TOO_LARGE for an oversized URL or file input. |
429 | QUOTA_EXCEEDED, RATE_LIMITED |
500 | PLAN_NOT_FOUND, INTERNAL_ERROR; asynchronous setup errors CONFIG_ERROR and PLAN_CONFIG_ERROR. |
URL/file processing failures such as DOWNLOAD_FAILED and UPLOAD_FAILED are recorded as failed jobs and can be read from the job status response.
Notes¶
- Body mode accepts raw text, not a JSON wrapper.
- Body-size, file-size, quota, rate, and download-retention limits depend on the plan. See tool limits.
- Download URLs are temporary; their retention period depends on the plan.