{"uid":"cap_0Jh0fMC1a2zh_W-uEgJDe","slug":"api-strale-io-2ff678b8","name":"URL to Base64 Encoder","description":"Fetch a URL and return content as base64. Useful for embedding images, PDFs in API calls. Returns base64, content type, data URI.","url":"https://api.strale.io/x402/base64-encode-url","method":"GET","headers":{},"bodySchema":{"type":"object","required":["url"],"properties":{"url":{"type":"string","description":"URL to fetch and encode"}}},"responseSchema":{"base64":{"type":"string"},"data_uri":{"type":"string"},"size_bytes":{"type":"integer"},"content_type":{"type":"string"}},"example":{"request":{"url":"https://www.example.com/"},"response":{"url":"https://www.example.com/","_meta":{"payment":{"method":"x402","price_usd":0.0216,"settlement_id":"0x255e6077f11aff8249e194f3c67f95d4cd90d6c1a2a898a20a56befd1797d99a"},"capability":"base64-encode-url","latency_ms":21,"provenance":{"source":"http-get","fetched_at":"2026-06-17T04:11:46.187Z"}},"base64":"PCFkb2N0eXBlIGh0bWw+PGh0bWwgbGFuZz0iZW4iPjxoZWFkPjx0aXRsZT5FeGFtcGxlIERvbWFpbjwvdGl0bGU+PGxpbmsgcmVsPSJpY29uIiBocmVmPSJkYXRhOiwiPjxtZXRhIG5hbWU9InZpZXdwb3J0IiBjb250ZW50PSJ3aWR0aD1kZXZpY2Utd2lkdGgsIGluaXRpYWwtc2NhbGU9MSI+PHN0eWxlPmJvZHl7YmFja2dyb3VuZDojZWVlO3dpZHRoOjYwdnc7bWFyZ2luOjE1dmggYXV0bztmb250LWZhbWlseTpzeXN0ZW0tdWksc2Fucy1zZXJpZn1oMXtmb250LXNpemU6MS41ZW19ZGl2e29wYWNpdHk6MC44fWE6bGluayxhOnZpc2l0ZWR7Y29sb3I6IzM0OH08L3N0eWxlPjwvaGVhZD48Ym9keT48ZGl2PjxoMT5FeGFtcGxlIERvbWFpbjwvaDE+PHA+VGhpcyBkb21haW4gaXMgZm9yIHVzZSBpbiBkb2N1bWVudGF0aW9uIGV4YW1wbGVzIHdpdGhvdXQgbmVlZGluZyBwZXJtaXNzaW9uLiBBdm9pZCB1c2UgaW4gb3BlcmF0aW9ucy48L3A+PHA+PGEgaHJlZj0iaHR0cHM6Ly9pYW5hLm9yZy9kb21haW5zL2V4YW1wbGUiPkxlYXJuIG1vcmU8L2E+PC9wPjwvZGl2PjwvYm9keT48L2h0bWw+Cg==","data_uri":"data:text/html;base64,PCFkb2N0eXBlIGh0bWw+PGh0bWwgbGFuZz0iZW4iPjxoZWFkPjx0aXRsZT5FeGFtcGxlIERvbWFpbjwvdGl0bGU+PGxpbmsgcmVsPSJpY29uIiBocmVmPSJkYXRhOiwiPjxtZXRhIG5hbWU9InZpZXdwb3J0IiBjb250ZW50PSJ3aWR0aD1kZXZpY2Utd2lkdGgsIGluaXRpYWwtc2NhbGU9MSI+PHN0eWxlPmJvZHl7YmFja2dyb3VuZDojZWVlO3dpZHRoOjYwdnc7bWFyZ2luOjE1dmggYXV0bztmb250LWZhbWlseTpzeXN0ZW0tdWksc2Fucy1zZXJpZn1oMXtmb250LXNpemU6MS41ZW19ZGl2e29wYWNpdHk6MC44fWE6bGluayxhOnZpc2l0ZWR7Y29sb3I6IzM0OH08L3N0eWxlPjwvaGVhZD48Ym9keT48ZGl2PjxoMT5FeGFtcGxlIERvbWFpbjwvaDE+PHA+VGhpcyBkb21haW4gaXMgZm9yIHVzZSBpbiBkb2N1bWVudGF0aW9uIGV4YW1wbGVzIHdpdGhvdXQgbmVlZGluZyBwZXJtaXNzaW9uLiBBdm9pZCB1c2UgaW4gb3BlcmF0aW9ucy48L3A+PHA+PGEgaHJlZj0iaHR0cHM6Ly9pYW5hLm9yZy9kb21haW5zL2V4YW1wbGUiPkxlYXJuIG1vcmU8L2E+PC9wPjwvZGl2PjwvYm9keT48L2h0bWw+Cg==","size_bytes":559,"content_type":"text/html"}},"exampleRequest":{"url":"https://www.example.com/"},"tags":["x402"],"displayCostAmount":"0.0216","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.0216/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0216","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0216","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_GqQximnYMVc6fy34ysWlx","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0216","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fetches a URL and returns its content encoded as base64, along with content type and data URI","exampleAgentPrompt":"Fetch this image and give me its base64-encoded content and data URI so I can embed it inline: https://example.com/logo.png","exampleUseCases":null,"resultDescription":"Returns the base64-encoded content of the fetched URL, the content type (e.g. image/png, application/pdf), and a ready-to-use data URI string (e.g. data:image/png;base64,...).","failureModes":["URL is unreachable or returns non-200 status — endpoint may return an error or empty result","URL points to very large file — may time out or fail to encode","URL requires authentication — content cannot be fetched","Invalid or malformed URL provided — validation error returned"],"whenToPreferThis":"Use this endpoint when you need to fetch a remote resource (image, PDF, document) and embed it inline as base64 or as a data URI in an API call, HTML, or JSON payload. Ideal when the downstream system cannot accept a URL reference and requires the raw content encoded as base64.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":2,"lastUsedAt":"2026-06-26T17:09:14.552Z","lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:55:51.186Z","isFirstParty":false}