Fetch data and analyse it
Use one GalliunClient with both wallets to pull marketplace data and run inference on it.
import {
GalliunClient,
createSuiWalletAdapter,
createInferenceSuiWalletAdapter,
} from "galliun";
const client = new GalliunClient({
baseUrl: "https://api.galliun.com",
chain: "sui",
wallet: createSuiWalletAdapter(suiSigner),
inferenceWallet: createInferenceSuiWalletAdapter(suiSigner),
});
const tokenData = await client.marketplace.call({
path: "/p/demo-api/token-price",
method: "POST",
body: { address: tokenAddress, chain: "solana" },
});
const analysis = await client.inference.chat({
model: "openai:gpt-4o-mini",
messages: [
{
role: "user",
content: `Analyse this token data: ${JSON.stringify(tokenData)}`,
},
],
});
console.log(analysis.choices[0]?.message.content);
Each call pays independently (marketplace exact_split, then inference exact). Replace paths and models with values from the directory and models.list().
Related: Marketplace, Inference.