Base64 Encoder
platform.base64_encode
Overview
You pass text, raw bytes, or a file reference; we encode it to Base64 per RFC 4648 and return the encoded string with alphabet, padding, and byte counts. Choose standard or URL-safe alphabet and whether to include padding. Send exactly one of dataText, dataBase64 and file_ref — file_ref is the right choice for large or binary content, and if several arrive we take file_ref first, then dataText. Base64 is transport encoding, not protection, so do not reach for it to hide or encrypt anything, and do not use it to decode.
Agents frequently need to embed binary data in JSON or URL contexts. Base64 encoding is mechanical but error-prone with alphabet and padding variations.
Reliability
STRICT and deterministic — the same bytes with the same alphabet and padding always give you the same string. Encoding hides nothing: anyone can decode the result, so never treat it as a way to protect a secret. Send more than one input source and we do not fail — file_ref wins, then dataText — so send just the one you mean. Input validation (not retryable): no input source at all; an inputEncoding this platform does not know; dataBase64 that is not valid standard Base64; inline text over 2097152 characters or a file over 5242880 bytes.
Context footprint
Encodes inline text/Base64, or the raw bytes of an uploaded file via file_ref (preferred for large or binary content — avoids the gateway envelope limit). Returns instantly. A successful call costs 1 execution credit.
When to use it
When you need to convert text or binary data to a Base64 string for transport in JSON, URLs, or other text-only channels.
When you need to decode Base64 (use platform.base64_decode), encrypt data, or handle files larger than the input size limit.
Scope
Non-goals
- Does not decode Base64 (use platform.base64_decode)
- Does not encrypt or sign data
- Does not handle streaming or chunked encoding
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
File limits
Constraints this skill applies to your input and generated files. The “Limited by” column shows the static source of each cap; none of these can be raised by upgrading your plan.
| Limit | Value | Limited by |
|---|---|---|
| Maximum size per input file | 5 MiB | Skill and platform maximum |
How we handle your data
What this means
This skill may receive sensitive content and may return submitted, transformed, extracted, or reformatted content.
Squillify guarantees
- Runs inside Squillify
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- This skill does not target sensitive data.
- The response may contain submitted or transformed content.
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| dataText | string | No | Inline text to encode; omit it when dataBase64 or file_ref is the source. |
| dataBase64 | string | No | Padded standard Base64 carrying inline bytes; omit it when dataText or file_ref is the source. |
| file_ref | string | No | Tenant-scoped opaque file reference; omit it when dataText or dataBase64 is the source. |
| inputEncoding | string | No | Text charset; omit it for UTF-8. |
| urlSafe | boolean | No | Whether to use Base64url; omit it for false. |
| padding | boolean | No | Whether to include padding; omit it for true. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| encoded | string | Yes | Bounded Base64 text. |
| alphabet | string | Yes | Applied alphabet, either base64 or base64url. |
| padding | boolean | Yes | Whether padding was emitted. |
| inputBytes | integer | Yes | Encoded raw-byte count. |
| outputLength | integer | Yes | Encoded character count. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"platform.base64_encode","input":{"dataText":"Hello, World!"}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("platform.base64_encode", {"dataText":"Hello, World!"});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Does not decode Base64 (use platform.base64_decode)
- Does not encrypt or sign data
- Does not handle streaming or chunked encoding
- Decoding Base64 data
- Encryption or security operations
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "platform.base64_encode",
"input": {
"dataText": "Hello, World!"
}
}Examples
Encode text to standard Base64
{
"dataText": "Hello, World!"
}{
"outputLength": 20,
"alphabet": "base64",
"encoded": "SGVsbG8sIFdvcmxkIQ==",
"padding": true,
"inputBytes": 13
}URL-safe encoding without padding
{
"urlSafe": true,
"dataText": "hello",
"padding": false
}{
"outputLength": 7,
"alphabet": "base64url",
"encoded": "aGVsbG8",
"padding": false,
"inputBytes": 5
}Recommended use cases
- Encode binary payloads for JSON transport
- Create URL-safe encoded tokens
- Prepare data for APIs requiring Base64 input
- Embed small binary artifacts in text-based formats
Avoid for
- Decoding Base64 data
- Encryption or security operations
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.