Quickstart
From an empty account to a working API call.
1. Create a project
Sign up at app.kethosbase.com,
confirm your e-mail, and create a project. Provisioning takes under a
minute; the project's Overview page then shows its API
URL and two keys: a publishable key (kbp_…, the
anon role) and a secret key (kbs_…, the
service_role role).
2. Create a table
In the project's SQL tab, run:
create table todos (
id bigint generated always as identity primary key,
task text not null,
done boolean not null default false
);
-- The anon key can only see what you allow. For this demo, allow reads.
-- Replace <project-ref> with your ref (roles are named p<ref>_anon
-- and p<ref>_authed; the Tables tab shows the exact names):
grant select on todos to p<project-ref>_anon;
alter table todos enable row level security;
create policy todos_read on todos for select using (true);
The dashboard's Tables tab shows the
exact role names for your project and warns you when a table is exposed
without Row-Level Security.
3. Insert a row
Use the secret key (kbs_…) from your backend (or the SQL
editor) to write:
curl -X POST "https://<project-ref>.kethosbase.com/rest/v1/todos" \
-H "Authorization: Bearer kbs_<your-secret-key>" \
-H "Content-Type: application/json" \
-d '{"task": "ship it"}'
4. Read it with the publishable key
curl "https://<project-ref>.kethosbase.com/rest/v1/todos?done=is.false" \
-H "Authorization: Bearer kbp_<your-publishable-key>"
Response:
[
{ "id": 1, "task": "ship it", "done": false }
]
5. Or use the JavaScript SDK
The same read from JavaScript or TypeScript with
@kethosbase/client — one client covers the database, auth,
storage, and realtime:
import { createClient } from "@kethosbase/client";
const kb = createClient(
"https://<project-ref>.kethosbase.com",
"kbp_<your-publishable-key>"
);
const { data, error } = await kb
.from("todos")
.select("*")
.eq("done", false);
// data → [ { id: 1, task: "ship it", done: false } ]
Next steps
- JavaScript SDK — the full client: query builder, auth, storage, and realtime.
- CLI — link a project, run migrations, and generate types for the SDK.
- REST data API — filters, ordering, pagination, updates, and deletes.
- Authentication — give your app real user accounts and write RLS policies against them.
- Storage and Realtime — files and live messages.