Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

Base64 Encoder

platform.base64_encode

ProductionBounded custom (Class B)Deterministicstrictinstantv1.0.0
File inputNo network

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

Note
Encodes binary or text data to Base64 per RFC 4648.

Non-goals

  • Does not decode Base64 (use platform.base64_decode)
  • Does not encrypt or sign data
  • Does not handle streaming or chunked encoding

Properties

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

encodingtext-processing

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call1 credit

File handling

Accepts file_refProduces file_refMax input2 MBMax file size5 MB

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.

LimitValueLimited by
Maximum size per input file5 MiBSkill and platform maximum

How we handle your data

Sensitive output possible
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.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
dataTextstringNoInline text to encode; omit it when dataBase64 or file_ref is the source.
dataBase64stringNoPadded standard Base64 carrying inline bytes; omit it when dataText or file_ref is the source.
file_refstringNoTenant-scoped opaque file reference; omit it when dataText or dataBase64 is the source.
inputEncodingstringNoText charset; omit it for UTF-8.
urlSafebooleanNoWhether to use Base64url; omit it for false.
paddingbooleanNoWhether to include padding; omit it for true.

Output schema

FieldTypeRequiredDescription
encodedstringYesBounded Base64 text.
alphabetstringYesApplied alphabet, either base64 or base64url.
paddingbooleanYesWhether padding was emitted.
inputBytesintegerYesEncoded raw-byte count.
outputLengthintegerYesEncoded character count.

API contract

POST /v1/execute
curl
curl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"platform.base64_encode","input":{"dataText":"Hello, World!"}}'
Integrations
TypeScript SDK
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

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.

Other limits

LimitValue
Recommended inline bytes32 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)

Request bodyjson
{
  "skillKey": "platform.base64_encode",
  "input": {
    "dataText": "Hello, World!"
  }
}

Examples

Encode text to standard Base64

Inputjson
{
  "dataText": "Hello, World!"
}
Expected outputjson
{
  "outputLength": 20,
  "alphabet": "base64",
  "encoded": "SGVsbG8sIFdvcmxkIQ==",
  "padding": true,
  "inputBytes": 13
}
Tip
Standard Base64 with padding

URL-safe encoding without padding

Inputjson
{
  "urlSafe": true,
  "dataText": "hello",
  "padding": false
}
Expected outputjson
{
  "outputLength": 7,
  "alphabet": "base64url",
  "encoded": "aGVsbG8",
  "padding": false,
  "inputBytes": 5
}
Tip
URL-safe alphabet, no padding characters
  • 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

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.

Tags

transformationencoding