Text Base64
Encode bounded caller-supplied UTF-8 text as standard or URL-safe Base64, or decode canonical Base64 back to valid UTF-8 text. Forest performs the transform locally with no network request and rejects invalid encodings, non-UTF-8 decoded bytes, and outputs beyond the 100 KiB byte bound.
Forest exposes this capability as a deterministic machine-readable API for software agents. Discovery is free; execution uses the canonical paid endpoint below. The live x402 challenge is the source of truth for payment terms.
$0.001 / callPOST /text/base64x402 · Base
Typical agent tasks
This capability is intended for bounded machine decisions such as:
- encode this UTF-8 string as Base64 before sending it to another tool
- decode this Base64 value back into validated UTF-8 text
- convert text to URL-safe Base64 without calling an external service
- turn a canonical Base64 string into plain text with strict validation
What Forest guarantees
- encoding operates on exact UTF-8 bytes and decoding returns only valid UTF-8 text
- standard Base64 decoding requires canonical padding while URL-safe decoding uses unpadded Base64URL form
- decoded or encoded source data is bounded to 100 KiB
- no network request, external provider, authentication or storage is used
Boundaries
- encryption, secrecy, compression or integrity protection
- arbitrary binary output when decoded bytes are not valid UTF-8
- automatic charset detection or Unicode normalization before encoding
Machine contract
The request and response schemas are published in the canonical OpenAPI document. This page shows a representative input from the same production manifest.
Input example
{
"value": "hello forest",
"mode": "encode",
"variant": "standard"
}
Canonical paid endpoint
https://http--forest-gas-station-mainnet--lcjl27p8lmjs.code.run/text/base64
Related capabilities
- Text Hash — Hash caller-supplied UTF-8 text deterministically with SHA-256 or SHA-512 and return both hexadecimal and Base64 digests. Input is bounded to 100 KiB, no network request or external provider is used, and Forest never treats a digest as proof of authenticity or password security.
- Blob Decode — Identify and unwrap a bounded caller-supplied opaque string into readable JSON, text or binary evidence using deterministic local rules for JWT payloads, canonical Base64/Base64URL and gzip. Ambiguous hex/Base64 representations stop in auto mode; canonical hex and Brotli can be selected only through explicit bounded hints. JWT claims are decode-only and always marked unverified.