CINXE.COM
API — ImgBB
<!DOCTYPE HTML> <html xml:lang="en" lang="en" dir="ltr" class="device-nonmobile tone-light no-js" prefix="og: http://ogp.me/ns#"> <head> <meta charset="utf-8"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="google" content="notranslate" /> <meta name="description" content="Free image hosting and sharing service, upload pictures, photo host. Offers integration solutions for uploading images to forums."> <meta name="keywords" content="free image hosting, image uploader, forum image hosting, image upload mod, image host, photo sharing, upload pictures"> <title>API — ImgBB</title> <link rel="preconnect" href="https://simgbb.com"> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;500&display=swap" rel="stylesheet"> <link rel="stylesheet" href="//simgbb.com/5286/ibb.css"> <script>document.documentElement.className+=" js";var devices=["phone","phablet","tablet","laptop","desktop","largescreen"],window_to_device=function(){for(var e=[480,768,992,1200,1880,2180],t=[],n="",d=document.documentElement.clientWidth||document.getElementsByTagName("body")[0].clientWidth||window.innerWidth,c=0;c<devices.length;++c)d>=e[c]&&t.push(devices[c]);for(0==t.length&&t.push(devices[0]),n=t[t.length-1],c=0;c<devices.length;++c)document.documentElement.className=document.documentElement.className.replace(devices[c],""),c==devices.length-1&&(document.documentElement.className+=" "+n),document.documentElement.className=document.documentElement.className.replace(/\s+/g," ");if("laptop"==n||"desktop"==n){var o=document.getElementById("pop-box-mask");null!==o&&o.parentNode.removeChild(o)}};window_to_device(),window.onresize=window_to_device;function jQueryLoaded(){!function(n,d){n.each(readyQ,function(d,e){n(e)}),n.each(bindReadyQ,function(e,i){n(d).bind("ready",i)})}(jQuery,document)}!function(n,d,e){function i(d,e){"ready"==d?n.bindReadyQ.push(e):n.readyQ.push(d)}n.readyQ=[],n.bindReadyQ=[];var u={ready:i,bind:i};n.$=n.jQuery=function(n){return n===d||void 0===n?u:void i(n)}}(window,document);</script><link rel="shortcut icon" href="//simgbb.com/images/favicon.png"> <link rel="icon" type="image/png" href="//simgbb.com/images/favicon.png" sizes="192x192"> <link rel="apple-touch-icon" href="//simgbb.com/images/favicon.png" sizes="180x180"> <meta property="og:type" content="website" /> <meta property="og:url" content="https://api.imgbb.com" /> <meta property="og:title" content="Upload Image — Free Image Hosting" /> <meta property="og:site_name" content="ImgBB" /> <meta property="og:description" content="Free image hosting and sharing service, upload pictures, photo host. Offers integration solutions for uploading images to forums." /> <meta name="twitter:card" content="summary"> <meta name="twitter:description" content="Free image hosting and sharing service, upload pictures, photo host. Offers integration solutions for uploading images to forums."> <meta name="twitter:title" content="API"> <meta name="twitter:site" content="@imgbb_com"> <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8808103598047484" crossorigin="anonymous"></script> </head> <body id="api"> <header id="top-bar" class="top-bar"> <div class="content-width"> <div id="logo" class="top-bar-logo"><a href="https://imgbb.com"><img width="116px" height="24px" src="//simgbb.com/images/logo.png" alt="ImgBB"></a></div> <ul class="top-bar-left float-left"> <li data-action="top-bar-menu-full" data-nav="mobile-menu" class="top-btn-el phone-show phablet-show hidden"> <span class="top-btn-text"><span class="icon icon-bars"></span></span> </li> <li data-nav="about" class="phone-hide phablet-hide pop-btn pop-keep-click"> <span class="top-btn-text"><span class="icon icon-circle-question"></span><span class="btn-text phone-hide phablet-hide">About</span><span class="arrow-down"></span></span> <div class="pop-box arrow-box arrow-box-top anchor-left"> <div class="pop-box-inner pop-box-menu"> <ul><li class="with-icon"><a href="https://imgbb.com/plugin"><span class="btn-icon icon-code"></span> Plugin</a></li><li class="with-icon"><a href="https://api.imgbb.com/"><span class="btn-icon icon-gear"></span> API</a></li><li class="with-icon"><a href="https://imgbb.com/tos"><span class="btn-icon icon-landmark"></span> Terms of service</a></li><li class="with-icon"><a href="https://imgbb.com/privacy"><span class="btn-icon icon-lock"></span> Privacy</a></li><li class="with-icon"><a href="https://imgbb.com/contact"><span class="btn-icon icon-at"></span> Contact</a></li></ul> </div> </div> </li> <li data-nav="language" class="phablet-hide phone-hide pop-btn"> <span class="top-btn-text"><span class="icon icon-language"></span><span class="btn-text">EN</span><span class="arrow-down"></span></span> <div class="pop-box pbcols5 arrow-box arrow-box-top anchor-left"> <div class="pop-box-inner pop-box-menu pop-box-menucols"> <ul> <li><a href="https://ar.imgbb.com/" onclick="changeLanguage('ar');">العربية</a></li><li><a href="https://bg-bg.imgbb.com/" onclick="changeLanguage('bg-bg');">Български</a></li><li><a href="https://cs.imgbb.com/" onclick="changeLanguage('cs');">Čeština</a></li><li><a href="https://da.imgbb.com/" onclick="changeLanguage('da');">Dansk</a></li><li><a href="https://de.imgbb.com/" onclick="changeLanguage('de');">Deutsch</a></li><li><a href="https://el.imgbb.com/" onclick="changeLanguage('el');">Ελληνικά</a></li><li class="current"><a href="https://imgbb.com/" onclick="changeLanguage('en');">English</a></li><li><a href="https://es.imgbb.com/" onclick="changeLanguage('es');">Español</a></li><li><a href="https://et-ee.imgbb.com/" onclick="changeLanguage('et-ee');">Eesti (Eesti)</a></li><li><a href="https://fa.imgbb.com/" onclick="changeLanguage('fa');">فارسی</a></li><li><a href="https://fi.imgbb.com/" onclick="changeLanguage('fi');">Suomi</a></li><li><a href="https://fr.imgbb.com/" onclick="changeLanguage('fr');">Français</a></li><li><a href="https://he.imgbb.com/" onclick="changeLanguage('he');">עברית</a></li><li><a href="https://hr.imgbb.com/" onclick="changeLanguage('hr');">Hrvatski</a></li><li><a href="https://hu.imgbb.com/" onclick="changeLanguage('hu');">Magyar</a></li><li><a href="https://id.imgbb.com/" onclick="changeLanguage('id');">Bahasa Indonesia</a></li><li><a href="https://it.imgbb.com/" onclick="changeLanguage('it');">Italiano</a></li><li><a href="https://ja.imgbb.com/" onclick="changeLanguage('ja');">日本語</a></li><li><a href="https://ko.imgbb.com/" onclick="changeLanguage('ko');">한국어</a></li><li><a href="https://lt-lt.imgbb.com/" onclick="changeLanguage('lt-lt');">Lietuvių (Lietuva)</a></li><li><a href="https://nb.imgbb.com/" onclick="changeLanguage('nb');">Norsk Bokmål</a></li><li><a href="https://nl.imgbb.com/" onclick="changeLanguage('nl');">Nederlands</a></li><li><a href="https://pl.imgbb.com/" onclick="changeLanguage('pl');">Polski</a></li><li><a href="https://pt.imgbb.com/" onclick="changeLanguage('pt');">Português</a></li><li><a href="https://pt-br.imgbb.com/" onclick="changeLanguage('pt-br');">Português (Brasil)</a></li><li><a href="https://ru.imgbb.com/" onclick="changeLanguage('ru');">Русский</a></li><li><a href="https://sk.imgbb.com/" onclick="changeLanguage('sk');">Slovenčina</a></li><li><a href="https://sr-rs.imgbb.com/" onclick="changeLanguage('sr-rs');">Српски</a></li><li><a href="https://sv.imgbb.com/" onclick="changeLanguage('sv');">Svenska</a></li><li><a href="https://th.imgbb.com/" onclick="changeLanguage('th');">ไทย</a></li><li><a href="https://tr.imgbb.com/" onclick="changeLanguage('tr');">Türkçe</a></li><li><a href="https://uk.imgbb.com/" onclick="changeLanguage('uk');">Українська</a></li><li><a href="https://vi.imgbb.com/" onclick="changeLanguage('vi');">Tiếng Việt</a></li><li><a href="https://zh-cn.imgbb.com/" onclick="changeLanguage('zh-cn');">简体中文</a></li><li><a href="https://zh-tw.imgbb.com/" onclick="changeLanguage('zh-tw');">繁體中文</a></li></ul> </div> </div> </li> </ul> <ul class="top-bar-right float-right keep-visible"> <li class="top-btn-el"><a href="https://imgbb.com/upload"><span class="top-btn-text"><span class="icon icon-cloud-arrow-up"></span><span class="btn-text phone-hide phablet-hide">Upload</span></span></a></li> <li id="top-bar-signin" data-nav="signin" class="top-btn-el"> <a href="https://imgbb.com/login" class="top-btn-text"><span class="icon icon-right-to-bracket"></span><span class="btn-text phone-hide phablet-hide">Sign in</span></a> </li> <li id="top-bar-signup" data-nav="signup" class="phone-hide top-btn-el"> <a href="https://imgbb.com/signup" class="top-btn-text top-btn-create-account btn blue text"><span class="icon icon-user-plus phablet-hide tablet-hide laptop-hide desktop-hide"></span>Create account</a> </li> </ul> </div> </header><div class="c24 center-box margin-top-40 margin-bottom-40"> <div class="content-width"> <div class="header default-margin-bottom"> <h1>API version 1</h1> </div> <div class="text-content"> <p>Imgbb's API v1 allows to upload pictures.</p> <form action="" method="POST"><input class="btn blue" type="submit" name="key" value="Get API key"></form> <h2>Request method</h2> <p>API v1 calls can be done using the POST or GET request methods but since GET request are limited by the maximum allowed length of an URL you should prefer the POST request method.</p> <h2>Image Upload</h2> <div class="panel-share-item"><div class="copy-hover-display"><div class="c24 grid-columns"> <input id="code" type="text" class="text-input" value="https://api.imgbb.com/1/upload" data-focus="select-all" autocomplete="off" spellcheck="false" readonly><button class="input-action" data-action="copy" data-action-target="#code">copy</button> </div></div></div> <br/> <h2>Parameters</h2> <div class="input-label"> <label>key (required)</label> <div class="input-below">The API key.</div> </div> <div class="input-label"> <label>image (required)</label> <div class="input-below">A binary file, base64 data, or a URL for an image. (up to 32 MB)</div> </div> <div class="input-label"> <label>name (optional)</label> <div class="input-below">The name of the file, this is automatically detected if uploading a file with a POST and multipart / form-data</div> </div> <div class="input-label"> <label>expiration (optional)</label> <div class="input-below">Enable this if you want to force uploads to be auto deleted after certain time (in seconds 60-15552000)</div> </div> <h2>Example call</h2> <p><textarea>curl --location --request POST "https://api.imgbb.com/1/upload?expiration=600&key=YOUR_CLIENT_API_KEY" --form "image=R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"</textarea></p> <p class="highlight padding-5">Note: Always use POST when uploading local files. Url encoding may alter the base64 source due to encoded characters or just by URL request length limit due to GET request.</p> <h2 id="api-response">API response</h2> <p>API v1 responses display all the image uploaded information in JSON format.</p> <p>JSON the response will have headers status codes to allow you to easily notice if the request was OK or not. It will also output the <code class="hint">status</code> properties.</p> <h2>Example response (JSON)</h2> <div class="code"> <textarea style="height:500px">{ "data": { "id": "2ndCYJK", "title": "c1f64245afb2", "url_viewer": "https://ibb.co/2ndCYJK", "url": "https://i.ibb.co/w04Prt6/c1f64245afb2.gif", "display_url": "https://i.ibb.co/98W13PY/c1f64245afb2.gif", "width":"1", "height":"1", "size": "42", "time": "1552042565", "expiration":"0", "image": { "filename": "c1f64245afb2.gif", "name": "c1f64245afb2", "mime": "image/gif", "extension": "gif", "url": "https://i.ibb.co/w04Prt6/c1f64245afb2.gif", }, "thumb": { "filename": "c1f64245afb2.gif", "name": "c1f64245afb2", "mime": "image/gif", "extension": "gif", "url": "https://i.ibb.co/2ndCYJK/c1f64245afb2.gif", }, "medium": { "filename": "c1f64245afb2.gif", "name": "c1f64245afb2", "mime": "image/gif", "extension": "gif", "url": "https://i.ibb.co/98W13PY/c1f64245afb2.gif", }, "delete_url": "https://ibb.co/2ndCYJK/670a7e48ddcb85ac340c717a41047e5c" }, "success": true, "status": 200 }</textarea> </div> </div> </div> </div> <div id="modal-share" class="hidden"> <span class="modal-box-title">Share</span> <div class="image-preview"></div> <p class="highlight margin-bottom-20 font-size-small text-align-center" data-content="privacy-private">__privacy_notes__</p> <ul class="panel-share-networks"> </ul> <div class="input-label margin-bottom-0"> <label for="modal-share-url">Link</label> <div class="position-relative"> <input type="text" name="modal-share-url" id="modal-share-url" class="text-input" value="__url__" data-focus="select-all" readonly> <button class="input-action" data-action="copy" data-action-target="#modal-share-url" value="">copy</button> </div> </div> </div> <script defer src="//simgbb.com/5286/jquery1.js" onload="jQueryLoaded(this, event)"></script> <script defer src="//simgbb.com/5286/ibb.js" id="ibbjs"></script><script> document.getElementById("ibbjs").addEventListener("load", function () { PF.obj.devices = window.devices; PF.fn.window_to_device = window.window_to_device; PF.obj.config.base_url="https://api.imgbb.com"; PF.obj.config.json_api="https://api.imgbb.com/json"; PF.obj.config.listing.items_per_page="32"; PF.obj.config.auth_token="a9fd4266c1d76c710343c95046c6b7f28f1bb0bc"; PF.obj.l10n=[]; CHV.obj.embed_tpl={"links":{"label":"Links","options":{"viewer-links":{"label":"Viewer links","template":"%URL_VIEWER%","size":"viewer"}}},"html-codes":{"label":"HTML Codes","options":{"html-embed-medium":{"label":"HTML full linked","template":"<a href=\"%URL_VIEWER_PREVIEW%\"><img src=\"%MEDIUM_URL%\" alt=\"%MEDIUM_NAME%\" border=\"0\"><\/a>","size":"medium"},"html-embed-thumbnail":{"label":"HTML thumbnail linked","template":"<a href=\"%URL_VIEWER_THUMB%\"><img src=\"%THUMB_URL%\" alt=\"%THUMB_NAME%\" border=\"0\"><\/a>","size":"thumb"}}},"bbcodes":{"label":"BBCodes","options":{"bbcode-embed-medium":{"label":"BBCode full linked","template":"[url=%URL_VIEWER_PREVIEW%][img]%MEDIUM_URL%[\/img][\/url]","size":"medium"},"bbcode-embed-thumbnail":{"label":"BBCode thumbnail linked","template":"[url=%URL_VIEWER_THUMB%][img]%THUMB_URL%[\/img][\/url]","size":"thumb"}}}}; CHV.obj.config={"image":{"max_filesize":32000000,"load_max_filesize":8000000},"upload":{"image_types":["jpg","png","bmp","gif","tif","webp","heic","avif","pdf","jpeg","tiff","heif"]},"listing":{"viewer":true}};ibb(); var aicp=setInterval(function(){var elem = document.activeElement;if(elem && elem.tagName == 'IFRAME'){clearInterval(aicp);$.post(PF.obj.config.json_api, {action: 'aicp', width: elem.offsetWidth, height: elem.offsetHeight});}}, 100);}); </script> </body> </html>