{"openapi":"3.1.0","info":{"title":"Data URI API","version":"1.0.0","description":"Encode content into a data: URI and decode a data: URI back to its content (RFC 2397). data: URIs inline a file directly into HTML, CSS, JSON or email — perfect for small images, SVG, fonts and icons that you want to embed without a separate HTTP request. The encode endpoint wraps your content (given as UTF-8 text, base64 or hex for binary) with a chosen media type and charset, in either base64 or URL (percent) encoding; the decode endpoint parses any data: URI and returns its media type, charset, whether it was base64, the byte size, and the payload as text and/or base64. Pure local computation — no key, no third-party service, instant; up to 4 MB via POST. Live, nothing stored. 3 endpoints. Distinct from a plain base64/hex encoder and from SVG-specific tooling.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/dataurl-api","description":"oanor gateway"}],"tags":[{"name":"Data URI"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/decode":{"get":{"operationId":"get_v1_decode","tags":["Data URI"],"summary":"Decode a data: URI","description":"","parameters":[{"name":"datauri","in":"query","required":true,"description":"A data: URI","schema":{"type":"string"},"example":"data:text/plain;base64,SGVsbG8sIFdvcmxkIQ=="}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"text":"Hello, World!","bytes":13,"base64":"SGVsbG8sIFdvcmxkIQ==","is_base64":true,"mediatype":"text/plain"},"meta":{"timestamp":"2026-06-03T01:09:46.415Z","request_id":"ecde316d-7238-4b90-b83a-fe42e942ce6e"},"status":"ok","message":"Decode a data: URI","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/encode":{"get":{"operationId":"get_v1_encode","tags":["Data URI"],"summary":"Encode content to a data: URI","description":"","parameters":[{"name":"text","in":"query","required":true,"description":"Content","schema":{"type":"string"},"example":"Hello, World!"},{"name":"mediatype","in":"query","required":false,"description":"e.g. image/png (default text/plain)","schema":{"type":"string"},"example":"text/plain"},{"name":"charset","in":"query","required":false,"description":"e.g. utf-8","schema":{"type":"string"},"example":"utf-8"},{"name":"encoding","in":"query","required":false,"description":"base64|url (default base64)","schema":{"type":"string"},"example":"base64"},{"name":"input_encoding","in":"query","required":false,"description":"utf8|base64|hex (how text is given)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"bytes":13,"length":57,"charset":"utf-8","datauri":"data:text/plain;charset=utf-8;base64,SGVsbG8sIFdvcmxkIQ==","encoding":"base64","mediatype":"text/plain"},"meta":{"timestamp":"2026-06-03T01:09:46.509Z","request_id":"b38b51e0-9a23-460f-995e-2e503eaee167"},"status":"ok","message":"Encode content to a data: URI","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"name":"Data URI API","notes":"Send binary content as base64 or hex via input_encoding. Max 4 MB. Nothing is stored.","version":"v1","endpoints":[{"path":"/v1/encode","params":{"text":"content (required)","charset":"e.g. utf-8","encoding":"base64|url (default base64)","mediatype":"e.g. image/png (default text/plain)","input_encoding":"utf8|base64|hex (how `text` is given)"},"returns":"the data: URI"},{"path":"/v1/decode","params":{"datauri":"a data: URI (required)"},"returns":"mediatype, charset, is_base64, the text and/or base64 payload"},{"path":"/v1/meta","params":[],"returns":"this document"}],"description":"Encode content into a data: URI (RFC 2397) and decode a data: URI back to its content — the inline format used to embed images, fonts, SVG and small files directly in HTML, CSS, JSON and email. Choose base64 or URL (percent) encoding, set the media type and charset. Pure local, no key."},"meta":{"timestamp":"2026-06-03T01:09:46.597Z","request_id":"bedbcd75-f21d-4ad7-a8e0-293c271976cd"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":580,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":20,"monthly_call_quota":4300,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1720,"monthly_call_quota":116000,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":5320,"monthly_call_quota":600000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/dataurl-api"}