Learn > Browser plugins (plugin.js) > The api object OVERVIEW - api.name: Your plugin's folder name, e.g. "my-plugin" - api.dir: Your installed folder, e.g. "/plugins/my-plugin" or "/.crosspoint/plugins/my-plugin". Always build paths from this; never hard-code the root. - api.relay(method, url, headers?, body?): Outbound HTTP(S) through the reader -> {status, headers, body} - api.fetchToSd(url, dest, headers?, options?): Download a URL straight to an SD path -> {status, bytes, complete, total} - api.writeFile(path, base64): Write a small file (<= 256 KB) to SD -> {ok, bytes} - api.crypto(op, fields): Device crypto primitives - api.pluginFile(file): URL of a file in your plugin folder, for fetch, ,