[{"data":1,"prerenderedAt":462},["ShallowReactive",2],{"navigation_docs_en":3,"-en-api-image-to-base64":77,"-en-api-image-to-base64-surround":457},[4,26,40,61],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":25},"Getting Started","i-lucide-rocket","\u002Fen\u002Fgetting-started","en\u002F1.getting-started",[10,15,20],{"title":11,"path":12,"stem":13,"icon":14},"Introduction","\u002Fen\u002Fgetting-started\u002Fintroduction","en\u002F1.getting-started\u002F2.introduction","i-lucide-house",{"title":16,"path":17,"stem":18,"icon":19},"API & Interface","\u002Fen\u002Fgetting-started\u002Fapi","en\u002F1.getting-started\u002F3.api","i-lucide-braces",{"title":21,"path":22,"stem":23,"icon":24},"Application","\u002Fen\u002Fgetting-started\u002Fapplication","en\u002F1.getting-started\u002F4.application","i-lucide-boxes",false,{"title":27,"icon":19,"path":28,"stem":29,"children":30,"page":25},"API & Interfaces","\u002Fen\u002Fapi","en\u002F2.api",[31,36],{"title":32,"path":33,"stem":34,"icon":35},"Image URL to Base64","\u002Fen\u002Fapi\u002Fimage-to-base64","en\u002F2.api\u002F201.image-to-base64","i-lucide-brain",{"title":37,"path":38,"stem":39,"icon":35},"Random 6657 Meme","\u002Fen\u002Fapi\u002Frandom-6657-meme","en\u002F2.api\u002F202.random-6657-meme",{"title":21,"icon":24,"path":41,"stem":42,"children":43,"page":25},"\u002Fen\u002Fapplication","en\u002F3.application",[44,49,53,57],{"title":45,"path":46,"stem":47,"icon":48},"MokuMoku","\u002Fen\u002Fapplication\u002Fmokumoku","en\u002F3.application\u002F201.mokumoku","i-lucide-app-window",{"title":50,"path":51,"stem":52,"icon":48},"Telegram Sticker Transcoding Tool","\u002Fen\u002Fapplication\u002Ftg-sticker","en\u002F3.application\u002F202.tg-sticker",{"title":54,"path":55,"stem":56,"icon":48},"Sshwifty Plus","\u002Fen\u002Fapplication\u002Fsshwifty-plus","en\u002F3.application\u002F203.sshwifty-plus",{"title":58,"path":59,"stem":60,"icon":48},"Cloud Clipboard","\u002Fen\u002Fapplication\u002Fcloud-clipboard","en\u002F3.application\u002F204.cloud-clipboard",{"title":62,"icon":63,"path":64,"stem":65,"children":66,"page":25},"Advanced","i-lucide-ellipsis","\u002Fen\u002Fadvanced","en\u002F4.advanced",[67,72],{"title":68,"path":69,"stem":70,"icon":71},"Privacy Policy","\u002Fen\u002Fadvanced\u002Fprivacy-policy","en\u002F4.advanced\u002F1.privacy-policy","i-lucide-shield-check",{"title":73,"path":74,"stem":75,"icon":76},"Changelog","\u002Fen\u002Fadvanced\u002Fchangelog","en\u002F4.advanced\u002F2.changelog","i-lucide-logs",{"id":78,"title":32,"body":79,"description":449,"extension":450,"links":451,"meta":452,"navigation":453,"path":33,"seo":454,"stem":34,"__hash__":456},"docs_en\u002Fen\u002F2.api\u002F201.image-to-base64.md",{"type":80,"value":81,"toc":441},"minimark",[82,87,94,99,150,154,174,216,219,227,231,291,294,335,339,437],[83,84,86],"h2",{"id":85},"request","Request",[88,89],"api-playground",{":fields":90,":proxy":91,"endpoint":92,"method":93},"[{\"name\":\"url\",\"label\":\"url\",\"location\":\"query\",\"type\":\"url\",\"required\":true,\"defaultValue\":\"https:\u002F\u002Fzh.wikipedia.org\u002Fstatic\u002Fimages\u002Ficons\u002Fwikipedia.png\",\"placeholder\":\"https:\u002F\u002Fexample.com\u002Fimage.png\",\"description\":\"A publicly accessible image URL. Only http \u002F https URLs are supported.\"}]","true","https:\u002F\u002Fapi.krab.cn\u002Fapi\u002Fimage-to-base64","GET",[95,96,98],"h3",{"id":97},"query-parameters","Query Parameters",[100,101,102,121],"table",{},[103,104,105],"thead",{},[106,107,108,112,115,118],"tr",{},[109,110,111],"th",{},"Parameter",[109,113,114],{},"Type",[109,116,117],{},"Required",[109,119,120],{},"Description",[122,123,124],"tbody",{},[106,125,126,133,136,139],{},[127,128,129],"td",{},[130,131,132],"code",{},"url",[127,134,135],{},"string",[127,137,138],{},"Yes",[127,140,141,142,145,146,149],{},"Publicly accessible image URL. Only ",[130,143,144],{},"http"," \u002F ",[130,147,148],{},"https"," are supported.",[95,151,153],{"id":152},"curl-example","curl Example",[155,156,157,158,161,162,165,166,169,170,173],"p",{},"It is recommended to use ",[130,159,160],{},"--data-urlencode"," to avoid incorrect parsing of characters such as ",[130,163,164],{},"?",", ",[130,167,168],{},"&",", and ",[130,171,172],{},"="," inside the image URL.",[175,176,181],"pre",{"className":177,"code":178,"language":179,"meta":180,"style":180},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","curl -G 'https:\u002F\u002Fapi.krab.cn\u002Fapi\u002Fimage-to-base64' --data-urlencode 'url=https:\u002F\u002Fzh.wikipedia.org\u002Fstatic\u002Fimages\u002Ficons\u002Fwikipedia.png'\n","bash","",[130,182,183],{"__ignoreMap":180},[184,185,188,192,196,200,202,205,208,210,213],"span",{"class":186,"line":187},"line",1,[184,189,191],{"class":190},"sBMFI","curl",[184,193,195],{"class":194},"sfazB"," -G",[184,197,199],{"class":198},"sMK4o"," '",[184,201,92],{"class":194},[184,203,204],{"class":198},"'",[184,206,207],{"class":194}," --data-urlencode",[184,209,199],{"class":198},[184,211,212],{"class":194},"url=https:\u002F\u002Fzh.wikipedia.org\u002Fstatic\u002Fimages\u002Ficons\u002Fwikipedia.png",[184,214,215],{"class":198},"'\n",[155,217,218],{},"You can also directly access the URL-encoded address:",[175,220,225],{"className":221,"code":223,"language":224,"meta":180},[222],"language-text","https:\u002F\u002Fapi.krab.cn\u002Fapi\u002Fimage-to-base64?url=https%3A%2F%2Fzh.wikipedia.org%2Fstatic%2Fimages%2Ficons%2Fwikipedia.png\n","text",[130,226,223],{"__ignoreMap":180},[95,228,230],{"id":229},"successful-response","Successful Response",[175,232,236],{"className":233,"code":234,"language":235,"meta":180,"style":180},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"base64\": \"data:image\u002Fpng;base64,iVBORw0KGgoAAAANSUhEUgAA...\",\n  \"success\": true\n}\n","json",[130,237,238,243,270,285],{"__ignoreMap":180},[184,239,240],{"class":186,"line":187},[184,241,242],{"class":198},"{\n",[184,244,246,249,253,256,259,262,265,267],{"class":186,"line":245},2,[184,247,248],{"class":198},"  \"",[184,250,252],{"class":251},"spNyl","base64",[184,254,255],{"class":198},"\"",[184,257,258],{"class":198},":",[184,260,261],{"class":198}," \"",[184,263,264],{"class":194},"data:image\u002Fpng;base64,iVBORw0KGgoAAAANSUhEUgAA...",[184,266,255],{"class":198},[184,268,269],{"class":198},",\n",[184,271,273,275,278,280,282],{"class":186,"line":272},3,[184,274,248],{"class":198},[184,276,277],{"class":251},"success",[184,279,255],{"class":198},[184,281,258],{"class":198},[184,283,284],{"class":198}," true\n",[184,286,288],{"class":186,"line":287},4,[184,289,290],{"class":198},"}\n",[155,292,293],{},"Field descriptions:",[100,295,296,307],{},[103,297,298],{},[106,299,300,303,305],{},[109,301,302],{},"Field",[109,304,114],{},[109,306,120],{},[122,308,309,321],{},[106,310,311,315,318],{},[127,312,313],{},[130,314,277],{},[127,316,317],{},"boolean",[127,319,320],{},"Whether the request was successful",[106,322,323,327,329],{},[127,324,325],{},[130,326,252],{},[127,328,135],{},[127,330,331,332],{},"The image's Base64 Data URI, in the format ",[130,333,334],{},"data:\u003Cmime>;base64,\u003Cpayload>",[95,336,338],{"id":337},"common-error-codes","Common Error Codes",[100,340,341,353],{},[103,342,343],{},[106,344,345,349,351],{},[109,346,348],{"align":347},"right","HTTP Status Code",[109,350,130],{},[109,352,120],{},[122,354,355,373,385,398,411,424],{},[106,356,357,360,365],{},[127,358,359],{"align":347},"400",[127,361,362],{},[130,363,364],{},"INVALID_URL",[127,366,367,368,145,370,372],{},"The URL is empty, malformed, not ",[130,369,144],{},[130,371,148],{},", or the domain cannot be resolved",[106,374,375,377,382],{},[127,376,359],{"align":347},[127,378,379],{},[130,380,381],{},"BLOCKED_HOST",[127,383,384],{},"The URL points to a prohibited address such as localhost, a private-network IP, or a metadata IP",[106,386,387,390,395],{},[127,388,389],{"align":347},"408",[127,391,392],{},[130,393,394],{},"FETCH_TIMEOUT",[127,396,397],{},"Image download timed out",[106,399,400,403,408],{},[127,401,402],{"align":347},"413",[127,404,405],{},[130,406,407],{},"IMAGE_TOO_LARGE",[127,409,410],{},"The image exceeds the size limit",[106,412,413,416,421],{},[127,414,415],{"align":347},"415",[127,417,418],{},[130,419,420],{},"UNSUPPORTED_CONTENT_TYPE",[127,422,423],{},"The upstream returned content that is not an image",[106,425,426,429,434],{},[127,427,428],{"align":347},"502",[127,430,431],{},[130,432,433],{},"FETCH_FAILED",[127,435,436],{},"Upstream image download failed, the status code is not 2xx, redirect handling failed, or there were too many redirects",[438,439,440],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}",{"title":180,"searchDepth":245,"depth":245,"links":442},[443],{"id":85,"depth":245,"text":86,"children":444},[445,446,447,448],{"id":97,"depth":272,"text":98},{"id":152,"depth":272,"text":153},{"id":229,"depth":272,"text":230},{"id":337,"depth":272,"text":338},"Provide an accessible image URL and return it converted to a Base64 Data URI.","md",null,{},{"icon":35},{"description":455,"title":32},"A free API service that converts an accessible image URL into a Base64 Data URI and returns it.","UlfS3pr4zENrOB9__gLqcYwJ7REdIwaChMsf-cX85f4",[458,460],{"title":21,"path":22,"stem":23,"description":459,"icon":24,"children":-1},"Learn about applications on Krab.",{"title":37,"path":38,"stem":39,"description":461,"icon":35,"children":-1},"Get a random meme from 斗鱼玩机器烂梗库. Supports matching by keyword, label and length.",1788341494442]