SDKs
Vibedasher ships official, fully-typed SDKs for TypeScript and Python, generated from the API's OpenAPI spec so they stay in lockstep with the platform.
| Language | Package | Client |
|---|---|---|
| TypeScript | @vibedasher/client | fetch (@hey-api/openapi-ts) |
| Python | vibedasher | httpx (openapi-python-client) |
Both authenticate with an API key in the X-Api-Key header. Mint one via
POST /v1/api-keys (from the app or the API) — see Authentication.
The base URL is region-routed: https://api.{region}.vibedasher.com (currently eu-central-1).
Looking for a specific endpoint? Browse the full API Reference — every operation grouped by resource, with curl / Python / TypeScript request samples.
TypeScript
npm install @vibedasher/client
The primary entry point is the resource-grouped Vibedasher client. Construct it once
with your API key and region, then call methods grouped by resource. Every method returns
{ data, error } — no exceptions are thrown on non-2xx responses.
import { Vibedasher } from '@vibedasher/client';
const client = new Vibedasher({
apiKey: process.env.VIBEDASHER_API_KEY!,
region: 'eu-central-1',
});
// List datasets
const { data, error } = await client.datasets.list();
if (error) throw error;
console.log(data);
// Create a dataset
const created = await client.datasets.create({
body: { name: 'Sales', type: 'flat_file' },
});
// Fetch one by id (path params go under `path`)
const one = await client.datasets.get({ path: { dataset_id: 1 } });
Resources are camelCase properties on the client:
accounts, aiProviders, apiKeys, chats, connections, dashboardSubscriptions,
datasets, dbt, folders, groups, images, questions, refreshes, sql,
subscriptions, tasks, templates, tools, upload, users, and viz. Each exposes
snake_case methods (list, create, get, update, delete, plus per-resource actions)
that take { path?, query?, body? } and return { data, error }.
You can mint additional API keys programmatically with client.apiKeys.create_api({ body: ... }).
Low-level / escape hatch (TypeScript)
The generated flat operations and the shared fetch client are still exported for power
users who want interceptors, a custom fetch, or per-call client overrides. Configure the
shared client once, then call any operation directly:
import { client, readDatasets } from '@vibedasher/client';
client.setConfig({
baseUrl: 'https://api.eu-central-1.vibedasher.com',
auth: process.env.VIBEDASHER_API_KEY!, // sent as X-Api-Key
});
const { data, error } = await readDatasets();
Python
pip install vibedasher
The primary entry point is the resource-grouped Vibedasher client. Construct it once with
your API key and region, then call methods grouped by resource. Each method returns the
parsed response body.
from vibedasher import Vibedasher
from vibedasher.models import DatasetCreate
client = Vibedasher(api_key="<your-api-key>", region="eu-central-1")
# List datasets
datasets = client.datasets.list()
print(datasets)
# Create a dataset (request models live in vibedasher.models)
created = client.datasets.create(body=DatasetCreate(name="Sales", type_="flat_file"))
# Fetch one by id (path params are named kwargs)
one = client.datasets.get(dataset_id=1)
Resource attributes are snake_case on the client: client.datasets, client.connections,
client.api_keys, client.ai_providers, client.dashboard_subscriptions, client.viz,
and so on (mirroring the TypeScript resource list). Methods are snake_case and pass keyword
arguments straight through to the underlying operation, so path params are named kwargs
(client.datasets.get(dataset_id=1)) and request bodies go under body=.
The Python facade omits a handful of operations that openapi-python-client can't generate
(roughly ten, e.g. tasks.create). Those exist on the TypeScript client only — for them,
drop to the flat module (see below).
Low-level / escape hatch (Python)
The flat operation modules under vibedasher.api.<tag> are still available. Build a raw
client with create_client and call .sync(), .sync_detailed(), .asyncio(), or
.asyncio_detailed() directly:
from vibedasher import create_client
from vibedasher.api.datasets import read_datasets
client = create_client(api_key="<your-api-key>", region="eu-central-1")
datasets = read_datasets.sync(client=client)
Error handling
The SDKs surface HTTP errors as values, not thrown network exceptions — you check the result rather than wrapping every call in try/catch.
TypeScript — every facade method returns { data, error, request, response }. On a
non-2xx response, error is populated and data is undefined:
const { data, error, response } = await client.datasets.list();
if (error) {
console.error(`Request failed (${response.status})`, error);
} else {
console.log(data);
}
Python — facade methods (client.datasets.list(), etc.) return the parsed response
body, and None when the body can't be parsed. To inspect the HTTP status code, drop to the
flat module's .sync_detailed() (or .asyncio_detailed()), which returns a response wrapper
with .status_code, .content, and .parsed:
from vibedasher import create_client
from vibedasher.api.datasets import read_datasets
client = create_client(api_key="<your-api-key>", region="eu-central-1")
res = read_datasets.sync_detailed(client=client)
if res.status_code >= 400:
raise RuntimeError(f"Request failed ({res.status_code}): {res.content!r}")
print(res.parsed)
Common status codes: 401/403 (missing or invalid API key), 404 (not found, or a viz that isn't published), 422 (request validation error). Each endpoint's reference page lists the exact responses it can return.
Pagination
List endpoints return a page of results plus a nextKey cursor. To fetch the next page,
pass that value back as exclusiveStartKey; when nextKey is null/absent, you've reached
the end. (Exact parameter names are on each endpoint's reference page.)
TypeScript:
let cursor: number | null | undefined = undefined;
do {
const { data, error } = await client.datasets.list({
query: { limit: 100, exclusiveStartKey: cursor },
});
if (error) throw error;
for (const ds of data.datasets ?? []) handle(ds);
cursor = data.nextKey;
} while (cursor != null);
Python:
cursor = None
while True:
page = client.datasets.list(limit=100, exclusive_start_key=cursor)
for ds in page.datasets or []:
handle(ds)
cursor = page.next_key
if cursor is None:
break
Response typing caveat
Some API routes currently return loosely-typed responses (object / Any) because they
declare a generic response shape on the backend. Request bodies, query/path params, and an
increasing set of responses are fully typed. Response types are being hardened
module-by-module — upgrade the SDK to pick up improvements.
The SDKs are generated, never hand-edited. If you spot a gap, it's almost always upstream in the API's OpenAPI spec — reach out via the chat widget on vibedasher.com.