> For the complete documentation index, see [llms.txt](https://theblockchainchief.gitbook.io/web3stash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://theblockchainchief.gitbook.io/web3stash/services/lighthouse-ipfs.md).

# LightHouse(IPFS)

Dive into the specifics of connecting and using LIGHTHOUSE with web3stash

## Initialization

To use LIGHTHOUSE  "LIGHTHOUSE" as the service name. No other name will work!

```javascript
const lighthouseService = Web3Stash("LIGHTHOUSE",{lighthouseApiKey:""},{LIGHTHOUSE APIconfig options})
```

## Configuration&#x20;

To use LIGHTHOUSE in web3stash, you need one thing:

* lighthouseApiKey- API Key to connect to lighthouse.storage

Note: Use these names only while passing keys in object i.e, {lighthouseApiKey:"",}

#### Optional Config Options

There are no configOptions for this service

## Methods Available

The following methods are available for this service, More will be added soon

* Uploading JSON data&#x20;

```javascript
lighthouseService.uploadJson({name:"example", url:"abc.com"}, {lighthouseOptions}).then().catch()
```

* Uploading Image

```javascript
lighthouseService.uploadImage("./image.png", {lighthouseOptions}).then().catch()
```

* Uploading Video

```javascript
lighthouseService.uploadVideo("./video.mp4", {lighthouseOptions}).then().catch()
```

* Uploading File

<pre class="language-javascript"><code class="lang-javascript"><strong>lighthouseService.uploadFile("./data.txt", {lighthouseOptions}).then().catch()
</strong></code></pre>

## Output

All the functions return id (cid) and metadata (data returned by the service on upload)

<pre class="language-javascript"><code class="lang-javascript"><strong>{id:"dewfnlpweurmwknrwiojhgcbxczz", metadata:{}}
</strong></code></pre>
