PureCipher Base64 API
The Base64 API from PureCipher — 2 operation(s) for base64.
The Base64 API from PureCipher — 2 operation(s) for base64.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/purecipher-com:purecipher-com-base64-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Omniseal™ API Documentation Base64 API
version: '2.0'
tags:
- name: Base64
paths:
/api/v1/base64/encode/:
post:
tags:
- Base64
summary: Encode a File to Base64
description: Encodes an uploaded file into a Base64 string and returns metadata including the file name, format, and size.
operationId: encode_to_base64_api_v1_base64_encode__post
requestBody:
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/Body_encode_to_base64_api_v1_base64_encode__post'
examples:
Curl:
summary: Curl
value:
- curl -X POST "https://api.purecipher.com/base64/encode/" \
- '-H "accept: application/json" \'
- '-H "Content-Type: multipart/form-data" \'
- -F "file=@example.txt"
Python:
summary: Python
value:
- import requests
- ''
- 'with open("example.txt", "rb") as f:'
- ' response = requests.post("https://api.purecipher.com/base64/encode/", files={"file": f})'
- ' print(response.json())'
JavaScript (Node.js):
summary: JavaScript
value:
- const FormData = require('form-data');
- const fs = require('fs');
- const https = require('https');
- ''
- const form = new FormData();
- form.append('file', fs.createReadStream('example.txt'));
- ''
- const options = {
- ' method: ''POST'','
- ' host: ''api.purecipher.com'','
- ' path: ''/encode/'','
- ' headers: form.getHeaders()'
- '};'
- ''
- const req = https.request(options, (res) => {
- ' let data = '''';'
- ' res.on(''data'', (chunk) => {'
- ' data += chunk;'
- ' });'
- ' res.on(''end'', () => {'
- ' console.log(data);'
- ' });'
- '});'
- ''
- form.pipe(req);
- ''
- req.on('error', (err) => {
- ' console.error(err);'
- '});'
Go:
summary: Go
value:
- package main
- ''
- import (
- ' "bytes"'
- ' "fmt"'
- ' "io"'
- ' "mime/multipart"'
- ' "net/http"'
- ' "os"'
- )
- ''
- func main() {
- ' file, err := os.Open("example.txt")'
- ' if err != nil {'
- ' panic(err)'
- ' }'
- ' defer file.Close()'
- ''
- ' body := &bytes.Buffer{}'
- ' writer := multipart.NewWriter(body)'
- ' part, err := writer.CreateFormFile("file", "example.txt")'
- ' if err != nil {'
- ' panic(err)'
- ' }'
- ' _, err = io.Copy(part, file)'
- ' if err != nil {'
- ' panic(err)'
- ' }'
- ' writer.Close()'
- ''
- ' req, err := http.NewRequest("POST", "https://api.purecipher.com/base64/encode/", body)'
- ' if err != nil {'
- ' panic(err)'
- ' }'
- ' req.Header.Set("Content-Type", writer.FormDataContentType())'
- ''
- ' client := &http.Client{}'
- ' resp, err := client.Do(req)'
- ' if err != nil {'
- ' panic(err)'
- ' }'
- ' defer resp.Body.Close()'
- ''
- ' fmt.Println("Status:", resp.Status)'
- '}'
.NET (C#):
summary: .NET (C#)
value:
- using System;
- using System.IO;
- using System.Net.Http;
- using System.Net.Http.Headers;
- using System.Threading.Tasks;
- ''
- class Program {
- ' static async Task Main() {'
- ' using var client = new HttpClient();'
- ' using var form = new MultipartFormDataContent();'
- ''
- ' var fileStream = new FileStream("example.txt", FileMode.Open);'
- ' var streamContent = new StreamContent(fileStream);'
- ' streamContent.Headers.ContentType = new MediaTypeHeaderValue("multipart/form-data");'
- ''
- ' form.Add(streamContent, "file", "example.txt");'
- ''
- ' var response = await client.PostAsync("https://api.purecipher.com/base64/encode/", form);'
- ' Console.WriteLine(await response.Content.ReadAsStringAsync());'
- ' }'
- '}'
required: true
responses:
'200':
description: Successful Base64 Encoding
content:
application/json:
schema:
$ref: '#/components/schemas/EncodeToBase64Response'
properties:
base64:
type: string
title: Base64
file_name:
type: string
title: File Name
file_format:
type: string
title: File Format
file_size:
type: integer
title: File Size
type: object
required:
- base64
- file_name
- file_format
- file_size
title: EncodeToBase64Response
'400':
description: Bad Request - File too large or invalid
content:
application/json:
schema:
properties:
detail:
type: string
type: object
example:
detail: File size exceeds the maximum limit of 10 MB.
'500':
description: Internal Server Error
content:
application/json:
schema:
properties:
detail:
type: string
type: object
example:
detail: An error occurred during encoding.
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
/api/v1/base64/decode/:
post:
tags:
- Base64
summary: Decode Base64 to File
description: Decodes a Base64 string back into a file and streams the file as a response.
operationId: decode_from_base64_api_v1_base64_decode__post
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/DecodeFromBase64Request'
examples:
Curl:
summary: Curl Example
value:
- curl -X POST "https://api.purecipher.com/base64/decode/" \
- '-H "accept: application/octet-stream" \'
- '-H "Content-Type: application/json" \'
- -d '{"base64_string":"<Base64 content>", "file_name":"example.txt", "file_format":"text/plain"}'
Python:
summary: Python Example
value:
- import requests
- ''
- data = {
- ' "base64_string": "<Base64 content>",'
- ' "file_name": "example.txt",'
- ' "file_format": "text/plain"'
- '}'
- response = requests.post("https://api.purecipher.com/base64/decode/", json=data)
- 'if response.status_code == 200:'
- ' with open("example.txt", "wb") as f:'
- ' f.write(response.content)'
JavaScript (Node.js):
summary: JavaScript Example
value:
- const https = require('https');
- ''
- const data = JSON.stringify({
- ' base64_string: ''<Base64 content>'','
- ' file_name: ''example.txt'','
- ' file_format: ''text/plain'''
- '});'
- ''
- const options = {
- ' hostname: ''api.purecipher.com'','
- ' path: ''/decode/'','
- ' method: ''POST'','
- ' headers: {'
- ' ''Content-Type'': ''application/json'','
- ' ''Content-Length'': data.length'
- ' }'
- '};'
- ''
- const req = https.request(options, (res) => {
- ' let fileData = '''';'
- ' res.on(''data'', (chunk) => {'
- ' fileData += chunk;'
- ' });'
- ' res.on(''end'', () => {'
- ' require(''fs'').writeFileSync(''example.txt'', fileData, ''binary'');'
- ' });'
- '});'
- ''
- req.write(data);
- req.end();
Go:
summary: Go Example
value:
- package main
- ''
- import (
- ' "bytes"'
- ' "fmt"'
- ' "io/ioutil"'
- ' "net/http"'
- )
- ''
- func main() {
- ' data := `{"base64_string": "<Base64 content>", "file_name": "example.txt", "file_format": "text/plain"}`'
- ''
- ' resp, err := http.Post('
- ' "https://api.purecipher.com/base64/decode/",'
- ' "application/json",'
- ' bytes.NewBuffer([]byte(data))'
- ' )'
- ' if err != nil {'
- ' panic(err)'
- ' }'
- ' defer resp.Body.Close()'
- ''
- ' content, _ := ioutil.ReadAll(resp.Body)'
- ' err = ioutil.WriteFile("example.txt", content, 0644)'
- ' if err != nil {'
- ' panic(err)'
- ' }'
- ' fmt.Println("File written to example.txt")'
- '}'
.NET (C#):
summary: .NET (C#) Example
value:
- using System;
- using System.IO;
- using System.Net.Http;
- using System.Text;
- using System.Threading.Tasks;
- ''
- class Program {
- ' static async Task Main() {'
- ' using var client = new HttpClient();'
- ' var content = new StringContent('
- ' "{\"base64_string\": \"<Base64 content>\", \"file_name\": \"example.txt\", \"file_format\": \"text/plain\"}",'
- ' Encoding.UTF8, "application/json"'
- ' );'
- ''
- ' var response = await client.PostAsync("https://api.purecipher.com/base64/decode/", content);'
- ' if (response.IsSuccessStatusCode) {'
- ' using var fileStream = new FileStream("example.txt", FileMode.Create);'
- ' await response.Content.CopyToAsync(fileStream);'
- ' Console.WriteLine("File saved to example.txt");'
- ' } else {'
- ' Console.WriteLine($"Failed: {response.StatusCode}");'
- ' }'
- ' }'
- '}'
required: true
responses:
'200':
description: File streamed successfully
content:
application/json:
schema: {}
application/octet-stream:
schema:
type: string
format: binary
'400':
description: Bad Request - Invalid or Excessive File Size
content:
application/json:
schema:
properties:
detail:
type: string
type: object
example:
detail: Decoded file size exceeds the maximum limit of 10 MB.
'500':
description: Internal Server Error
content:
application/json:
schema:
properties:
detail:
type: string
type: object
example:
detail: An error occurred during decoding.
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
components:
schemas:
EncodeToBase64Response:
properties:
base64:
type: string
title: Base64
file_name:
type: string
title: File Name
file_format:
type: string
title: File Format
file_size:
type: integer
title: File Size
type: object
required:
- base64
- file_name
- file_format
- file_size
title: EncodeToBase64Response
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
type: object
required:
- loc
- msg
- type
title: ValidationError
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
DecodeFromBase64Request:
properties:
base64_string:
type: string
title: Base64 String
file_name:
type: string
title: File Name
file_format:
type: string
title: File Format
charset:
type: string
title: Charset
default: utf-8
type: object
required:
- base64_string
- file_name
- file_format
title: DecodeFromBase64Request
Body_encode_to_base64_api_v1_base64_encode__post:
properties:
file:
type: string
format: binary
title: File
type: object
required:
- file
title: Body_encode_to_base64_api_v1_base64_encode__post
securitySchemes:
APIKeyHeader:
type: apiKey
in: header
name: api_token
x-tagGroups:
- name: General
tags:
- Registration
- Health and Readiness
- name: Release 3
tags:
- Audio
- Video
- name: Release 2
tags:
- Unified API
- Edix12
- Data Lineage
- Data Provenance
- Base64
- name: Release 1
tags:
- Signature
- Encryption
- Hash
- Steganography