Skip to content
GasketDocs

SDKs

Official client libraries: not yet.

PlannedOfficial SDKs for TypeScript and Python. They'll wrap the same HTTP endpoints these docs describe.

Today, use HTTP directly. Every endpoint takes and returns JSON, authenticates with one header, and returns errors as { error: { code, message }, request_id }. A thin wrapper is a few lines:

gasket.js
export async function gasket(path, body) {
  const res = await fetch("https://usegasket.xyz/api/v1" + path, {
    method: body ? "POST" : "GET",
    headers: { Authorization: `Bearer ${process.env.GASKET_API_KEY}`, "Content-Type": "application/json" },
    body: body ? JSON.stringify(body) : undefined,
  });
  const data = await res.json();
  if (!res.ok) throw Object.assign(new Error(data.error.message), { code: data.error.code, requestId: data.request_id });
  return data;
}

// const run = await gasket(`/agents/${agentId}/runs`, { message: "Hi" });

Something wrong or missing? Tell us · Stuck? Help center