New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

Udhaykumar Balakrishnan I 0G SDK Walkthrough I ETHGlobal Cannes 2025

ETHGlobalThu, Oct 9, 2025, 12:00 AM

Learn how to integrate 0G Storage and 0G Compute into your applications with this ETHGlobal Cannes 2025 workshop led by Udhaykumar Balakrishnan. This walkthrough covers uploading/downloading files to 0G's decentralized storage network and leveraging AI models via 0G Compute's pay-per-use marketplace. Includes starter kits for TypeScript/Go, Swagger API documentation, and live demos of file storage/retrieval and LLM inference. Perfect for developers building scalable, decentralized applications with verifiable AI services. 00:00 - Introduction to 0G Storage (Decentralized, Fast, Scalable) 00:58 - Setting Up 0G Storage SDK (TypeScript/Go Starter Kits) 02:14 - Swagger vs CLI Implementation Options 02:49 - SDK Client Setup (RPC, Private Key, Indexer Configuration) 03:24 - File Upload Process (Merkle Tree, Root Hash Generation) 04:01 - File Download & Verification 04:35 - Live Demo: Uploading/Downloading Files (Panda Image Example) 06:52 - Conclusion & Advanced Usage 07:52 - Introduction to 0G Compute (Decentralized AI Marketplace) 08:15 - SDK Setup & Starter Kit (REST API vs CLI) 09:19 - Ledger Account Creation & Funding 09:51 - Listing Available AI Models (Llama 3.3, DeepSeek) 10:24 - Model Authentication & Metadata Retrieval 10:58 - Sending Queries & Verifying Responses 11:32 - Live Demo: Querying DeepSeek LLM via Swagger UI 13:49 - Balance Management & Refunds _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 🇫🇷 *ETHGlobal Cannes* This workshop is specifically for ETHGlobal Cannes, a 3-day hackathon held July 4-6, bringing together the most skilled web3 developers, designers and product builders from all around the globe for a weekend-long adventure to advance the Ethereum ecosystem! Watch the full ETHGlobal Cannes 2025 playlist here: https://youtube.com/playlist?list=PLXzKMXK2aHh5N2DCwhcEshNW9C8knZ1T-&si=Lc-WOyfkAVP2--R4 _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ✅ *Follow Udhaykumar Balakrishnan* X: https://x.com/udhaykumar_bala ✅ *Follow 0G* X: https://x.com/0G_labs ✅ *Follow ETHGlobal* X: https://x.com/ETHGlobal​ Warpcast: https://warpcast.com/ethglobal Website: https://ethglobal.com YouTube: https://www.youtube.com/c/ETHGlobal _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _Are you interested in Ethereum development and entrepreneurship?_ 👉 Sign up for the next ETHGlobal event: https://ethglobal.com/events 🎁 Get exclusive access and perks with ETHGlobal Plus! https://ethglobal.com/plus 📣 Want us to throw an event in your city? Tell us where! https://ethglobal.com/city _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Transcript

[Music] Hi everyone. Today let me show you how easy it is to integrate ZeroG storage into your existing application. Let's walk through the code and get familiarized about uploading and downloading processes using our starter kits. The links are in the description. For starters, zerog storage is like a decentralized storage network where your data is stored across different nodes across the globe.

It is fast, simple, secure, and also horizontally scalable. that provides the power to handle AI workloads that needs faster data output. Let's just dive into the code and check out how to integrate the zerog storage SDK. For that, we need to head on to the docs.0g.

ai and under this developer hub, you can able to find zerog storage. We do have SDKs and CLIs. If your use case needs CLI and if you are using a programming language that doesn't support the SDK, you can feel free to check into the CLI section. Now we are going to look into the SDKs. We are providing SDKs for Go and TypeScript.

Both of them we do have the starter kits. If you are preferring Go then please do check out Go starter kit. Now we are going to look into the TypeScript starter kit. When it comes to the starter kits, we just need to clone this. All the error handlings and the type checks, everything has been handled within the starter kits.

Since I have already cloned it, I'll be opening that for you. So, here is the folder where I cloned my repo. So, it does have two branches. One is a master branch and another one is CLI version branch. One version has swagger documentation and rest API implementation.

If you prefer to use it in a rest API way, you can check it out. Or else if you want it in a CLA version and that that is the need for your application means you can feel free to check it out to the CLA version of the branch. So currently we are in the master branch that means we are in the swag swagger documentation branch. Let's just walk through some of the code. First the client setup starts with the importing of the ZeroG SDK.

Once you import you will have two type things. One is ZG file. This one is specifically to import and upload a file. And this will help you calculate the gas cost and every stuff on the way. And this is the indexer that will help you chunk the file and store it in different nodes across the globe.

So you don't need to deal with it. The SDK already has all the stuffs that are emboded in it and ethers is the common library that if you are using the wallet and the private key stuffs. So first you need to add the RPC URLs and the private key things for creating the serer and once you need to add the indexer RPC into the indexer then that's it. You have already set up the zerog storage SDK. Now your only thing to do is upload and download.

For uploading you can use the ZG file to import any file from a path. Once it is imported it have already added functions to create Merkel tree and calculate root hash before the uploading. So you can use that function to create the tree. And if you want to upload that file you just need to call upload function with that file and the RPC URL and the ser that you have created previously. Once it is done you will get a root hash.

So this root hash will serve as a identifier for the file across the zerog storage. So whatever the file that you upload has unique root hash that will serve as an identifier. Once it is uploaded, if you want to download a file, you will be passing the same root hash on the download function and the output path that you want to store. And if you want to verify the file in the decentralized network, you can also do that by passing true here. So this will verify the file before the downloading.

Let's see it in action. So for that we have already cloned the repo and we just need to start by installing the dependencies. Yeah, now the dependencies has been installed. Once the dependencies are added, we need to go into the envample file. If you want to change the port, feel free to change it.

This is the RPC and we do support quicknote, third web and anchor as third party RPCs and add your private key and this key needs to have some of the zerog tokens. So please check the faucet to get more tokens for yourself and once it is added you are good to go then let's start the server. So now we get the swagger UI endpoint. So once we open we'll have two endpoints. One is for upload and another one is for download.

Let's test the upload one with an image. So we already have a cute panda that is lying here in our desktop. Let's just try him. So the uploading part will include a shanking process through the intexer and also a transaction committing on the zerog chain. This all will be handled with the help of the reg storage SDK.

Now if you see all the things has been completed and it has reverted with a root hash and also a transaction as if you check this transaction as on storage scan or a chain scan we can able to get the details of the file. So now this root hash is the identifier of the file. So we can use this root hash anytime to download this file. Let me use this root hash to check it out whether the file is exist on the cloud. So yeah, there it is.

It is available for download. So here is the downloaded file. Since it is not named, it is showing like this. Let me name it like cloud panda. PNG.

Yeah, here if you can see this is the uploaded one and the downloaded one. So that's it. This is how easy it is to integrate the zerog storage into your application and build more stuff with zerog storage. So the links are in the description. For more advanced usage, please do check out the docs.

zog.ai. Happy building. [Music] Hi everyone. Today let me show you how we are going to integrate decentralized inference using the zerog compute.

Let me walk you through how to connect the ZeroG comput SDK and also listing the models that are available in the decentralized space and using those models. Let's get started. Before that a quick intro. ZeroG compute is a decentralized marketplace for AI services. Think of it like Uber for AI services where provider can list their models and user can use it.

here. No API keys, no subscription, no hidden charges. Whatever you use, you will be paying for it. So, it is all pay per use. Let's dive into the code.

To start with, head on to the docs.0g.ai. And under this developer hub, you can find the zerog compute. So, under this, we do have two sections.

One is for developers. We do have SDKs and fine-tuning CLIs. And this one is for providers. If you want to provide your model as a service, you can use this. Currently, we are going to explore this SDK.

So to use this SDK, we have already created a starter kit that will be useful for you to start with. Let's explore the starter kit. In this starter kit, everything is already integrated like type checking and error handling. You can just clone it and get started. I have already cloned this repo.

Let me open that for you. If you have already visited our storage starter kit video like that we'll also have two separate branches in this. One branch is for the rest API and another one branch is for the CLI version. Right now we are going to explore the API version of the branch. So to get started with let's walk through the code to get better understanding of ZeroG comput SDK.

To start with we are going to install the dependencies that it needs. Starting from the SDK and the types it requires and cryptojs as a dependencies. Once everything is installed, we are going to start by importing the RPC and the private keys that it is needed. Once the broker is initiated, we are going to use this broker throughout our code for accessing the inferences. We need to create a ledger account within the broker to access the services.

This add ledger function will handle that for you. If the account is not there, it will automatically create the account and fund the account. If the account is there, it will trace the account and it will fund it for you. Once the account is ready, you can always check the balance using this get ledger function. Now, you can list the services that are available on the 0eroG marketplace.

Currently, we do have Llama 3.3 and Deepc Car 1 that is officially provided by Zerog. After selecting a model, we just need to copy their provider address. So this will be the identity to access those inferences. Before accessing the model, we need to acknowledge the provider.

This step helps you in the process of verifiability. After the successful acknowledgement of the model, we'll be getting the metadatas like endpoint and the model using the get service metadata function. Once we got the metadatas, we'll be getting the headers. These headers will act as the authentication. So make sure to call this before every request that you are making to the LLMs.

Once we got the headers and the endpoint, we can interact with the models whether using the fetch API or using the open SDK. We just need to pass the endpoint and the headers for the authentication and your prompt. You will get the completions. After getting the result from models, you can verify your response using the process response. This will help you verify the service and whether it is valid or not.

The fee settlement will be handled by the SDK in the background. Anytime if you want to get the balance, you can use this get ledger to get your balance. If you want to refund the balance from the ledger back to your wallet, you can always use the request refund method that is retrieve fund to get your balances back to your wallet. Now, let's see the Compute SDK in action. To start with, we are building this project and we are going to start this here.

If you can see, we already do have balances. We are going to open the swagger documentation. Here we do have different endpoints. The deposit is to deposit the amount to the ledger and the info endpoint is to get the balance and other details like inferences that previously made and refund endpoint it is to get the unused fund back to your wallet. List AI services will list all the service provider that are available and the query endpoint is the most important where you can give the service provider address and the query that you need to perform.

This will give you the results from the LLM with the process response. Let me start by testing the list. Here we are. We got the deepseek and llama that is available on the service marketplace. Let's use deepseek to test out by passing the provider address.

Yeah, here we got the answer and you can able to see it is valid via the TML. It is the verifiability layer that is giving this result. That's it. We have integrated the compute SDK. So that's how easy it is to integrate the computer SDK.

For more advanced use cases like fine-tuning, please do check out the docs.zog.ai. Check out the documentation and the starter kit link in the description. Happy building.

[Music]

Automatic transcript — names and jargon may be misspelled.