Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Documents 0G Compute Network SDK, CLI, and inference patterns for decentralized GPU AI inference and fine-tuning.
32% 100%+68 ptsof test cases passed
Passed 22 of 22 test cases with the skill, and 7 of 22 without it.
3 of 3 safety checks passed
Not used yet
Complete guide for using 0G Compute Network inference services.
import { ethers } from "ethers";
import { createZGComputeNetworkBroker } from "@0glabs/0g-serving-broker";
const RPC_URL = process.env.NODE_ENV === 'production'
? "https://evmrpc.0g.ai" // Mainnet
: "https://evmrpc-testnet.0g.ai"; // Testnet
const provider = new ethers.JsonRpcProvider(RPC_URL);
const wallet = new ethers.Wallet(process.env.PRIVATE_KEY!, provider);
const broker = await createZGComputeNetworkBroker(wallet);
import { BrowserProvider } from "ethers";
import { createZGComputeNetworkBroker } from "@0glabs/0g-serving-broker";
// Check if MetaMask is installed
if (typeof window.ethereum === "undefined") {
throw new Error("Please install MetaMask");
}
const provider = new BrowserProvider(window.ethereum);
const signer = await provider.getSigner();
const broker = await createZGComputeNetworkBroker(signer);
Next to this one in the catalogue, plus more from the same author.