Skip to main content
The superglue SDK provides programmatic access to the superglue API for executing and managing tools. Available in TypeScript/JavaScript and Python.

Installation

npm install @superglue/client

Quick start

import { configure, listTools, runTool, getRun } from "@superglue/client";

// Configure before making any API calls
configure({
  baseUrl: "http://localhost:4000/api/v1",
  apiKey: "your-api-key",
});

// List available tools
const response = await listTools({ limit: 10 });
console.log(response.data.data);

// Run a tool
const runResponse = await runTool("my-tool-id", {
  inputs: {
    userId: "user_123",
  },
});

console.log(`Run ID: ${runResponse.data.runId}`);
console.log(`Status: ${runResponse.data.status}`);

// Get run results
const resultResponse = await getRun(runResponse.data.runId);
if (resultResponse.data.status === "success") {
  console.log("Result:", resultResponse.data.data);
}

Authentication

Get your API key from the superglue dashboard under Settings → API Keys.
import { configure } from '@superglue/client';

configure({
  baseUrl: 'https://api.superglue.com/v1',
  apiKey: 'your-api-key'
});

TypeScript support

The SDK is fully typed with TypeScript. All types are auto-generated from the OpenAPI specification.
import { getTool } from "@superglue/client";
import type { Tool, Run, RunRequest } from "@superglue/client";

// Assumes configure() has been called (see Quick start above)
const response = await getTool("my-tool-id");
const tool: Tool = response.data;

Next steps