---
title: "Overview"
description: "Quick start with the superglue SDK"
---
The superglue SDK provides programmatic access to the superglue API for executing and managing tools. Available in TypeScript/JavaScript and Python.
## Installation
<CodeGroup>
```bash npm
npm install @superglue/client
```
```bash pip
pip install superglue-client
```
</CodeGroup>
## Quick start
<CodeGroup>
```typescript TypeScript
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);
}
```
```python Python
from superglue_client import SuperglueClient
from superglue_client.api.tools import list_tools, run_tool
from superglue_client.api.runs import get_run
from superglue_client.models import RunRequest, RunRequestInputs
# Initialize client
client = SuperglueClient(
base_url="http://localhost:4000/api/v1",
token="your-api-key"
)
# List available tools
tools = list_tools.sync(client=client, limit=10)
print(tools.data)
# Run a tool
inputs = RunRequestInputs.from_dict({"user_id": "user_123"})
body = RunRequest(inputs=inputs)
run = run_tool.sync(
tool_id="my-tool-id",
client=client,
body=body
)
print(f"Run ID: {run.run_id}")
print(f"Status: {run.status.value}")
# Get run results
result = get_run.sync(run_id=run.run_id, client=client)
if result.status.value == "success":
print("Result:", result.data)
```
</CodeGroup>
## Authentication
<Tabs>
<Tab title="Cloud Platform">
Get your API key from the superglue dashboard under Settings → API Keys.
<CodeGroup>
```typescript TypeScript
import { configure } from '@superglue/client';
configure({
baseUrl: 'https://api.superglue.com/v1',
apiKey: 'your-api-key'
});
```
```python Python
client = SuperglueClient(
base_url="https://api.superglue.com/v1",
token="your-api-key"
)
```
</CodeGroup>
</Tab>
<Tab title="Self-Hosted">
Use the `AUTH_TOKEN` environment variable from your `.env` file.
<CodeGroup>
```typescript TypeScript
import { configure } from '@superglue/client';
configure({
baseUrl: 'https://your-instance.com/api/v1',
apiKey: process.env.AUTH_TOKEN
});
```
```python Python
import os
client = SuperglueClient(
base_url="https://your-instance.com/api/v1",
token=os.getenv("AUTH_TOKEN")
)
```
</CodeGroup>
</Tab>
</Tabs>
## TypeScript support
The SDK is fully typed with TypeScript. All types are auto-generated from the OpenAPI specification.
<CodeGroup>
```typescript TypeScript
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;
```
```python Python
from superglue_client.api.tools import get_tool
from superglue_client.models import Tool, Run, RunRequest
tool: Tool = get_tool.sync(tool_id="my-tool-id", client=client)
```
</CodeGroup>
## Next steps
<CardGroup cols={1}>
<Card title="Methods Reference" icon="code" href="/sdk/methods">
Complete API reference for all SDK methods
</Card>
<Card title="Types Reference" icon="brackets-curly" href="/sdk/types">
TypeScript and Python type definitions
</Card>
</CardGroup>