{"uid":"cap_dUHp2yN9qLFHnGpSSrXQ_","slug":"strale-api-base64-encode-url-c69a6b1d","name":"Strale API — Base64 Encode URL","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/v2/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":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0216","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","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_TvrtKF2BAWEZ4jFZQ-6lP","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 via GET and returns its content encoded as a Base64 string, with a cryptographic audit record.","exampleAgentPrompt":"Fetch the content at https://example.com/logo.png and give me the Base64-encoded version of it.","exampleUseCases":[{"title":"Embed remote image as Base64","prompt":"Can you fetch the image at https://cdn.mybrand.com/assets/hero.jpg and return its Base64-encoded content so I can embed it inline in an HTML email?"},{"title":"Encode API response for storage","prompt":"Grab the JSON response from https://api.opendata.gov/v1/records?id=12345 and Base64 encode it so I can safely store it as a string in our database."},{"title":"Verify and encode a remote document","prompt":"Fetch the PDF at https://docs.partner.com/contract_v3.pdf and give me the Base64 string — I need to attach it to our records system."}],"resultDescription":"A Base64-encoded string representing the full body content fetched from the provided URL, along with a Strale audit record containing a cryptographic chain hash for provenance verification.","failureModes":["Target URL is unreachable or returns a non-200 status — fetch fails and an error is returned","URL is malformed or missing — request rejected with a validation error","Target server blocks the fetcher's IP — content cannot be retrieved","Response body is too large — may time out or be truncated","URL points to a redirect loop — fetch may fail or return unexpected content"],"whenToPreferThis":"Choose this endpoint when you need to fetch arbitrary web content and receive it as a Base64-encoded string in one step, especially when an audit trail with cryptographic chain hashing is required for compliance or trust purposes. Prefer it over rolling your own fetch-and-encode logic when you need tamper-evident provenance records alongside the encoded output.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T01:01:03.475Z","isFirstParty":false}