org:files:write
groupId
import { PinataSDK } from "pinata"; const pinata = new PinataSDK({ pinataJwt: process.env.PINATA_JWT!, pinataGateway: "example.mypinata.cloud", }); const update = await pinata.files.private.queryVectors({ groupId: "52681e41-86f4-407b-8f79-33a7e7e5df68", query: "Hello World" })
type VectorizeQueryResponse = { count: number; matches: VectorQueryMatch[]; }; type VectorQueryMatch = { file_id: string; cid: string; score: number; }; // If using returnFile type GetCIDResponse = { data?: JSON | string | Blob | null; contentType: ContentType; };
string
const results = await pinata.files.private.queryVectors({ groupId: "52681e41-86f4-407b-8f79-33a7e7e5df68", query: "Hello World" })
boolean
const { data, contentType } = await pinata.files.private.queryVectors({ groupId: "52681e41-86f4-407b-8f79-33a7e7e5df68", query: "Hello World", returnFile: true })