Getting Started
Go from a new workspace to a working API call and a live app.
-
1. Create a workspace
Open join.kapable.ai. Pick a plan and enter a card before you create the workspace.
You should see your new workspace and its console.
-
2. Make an API key
Open the console for your workspace. Create an API key with the
readscope. Copy the secret when the console shows it. It appears once.You should see a key that starts with
sk_live_. -
3. Install the SDK and set the key
Choose your language. Run the install command in your project folder. Set
KAPABLE_API_KEYin the same shell.echo '@kapable:registry=https://git.kapable.dev/api/packages/kapable/npm/' >> .npmrc bun add @kapable/sdk export KAPABLE_API_KEY='sk_live_...'# Add this to .cargo/config.toml [registries.kapable] index = "sparse+https://git.kapable.dev/api/packages/kapable/cargo/" # Add this to Cargo.toml [dependencies] kapable-sdk = { registry = "kapable", version = "0.2" } # Then set the key in your shell export KAPABLE_API_KEY='sk_live_...'You should see the SDK in your dependency file and the key in your shell environment.
-
4. Make the first call
Ask Kapable who you are. Save the TypeScript or Rust code as a small program, or run the curl command as written.
import { KapableClient } from '@kapable/sdk'; const client = new KapableClient({ baseUrl: 'https://api.kapable.ai', apiKey: process.env.KAPABLE_API_KEY!, }); const me = await client.auth.me(); console.log(me);use kapable_sdk::KapableClient; let client = KapableClient::new("https://api.kapable.ai") .api_key(std::env::var("KAPABLE_API_KEY")?) .build(); let me = client.auth().me().await?; println!("{:?}", me);curl -sS https://api.kapable.ai/v1/me \ -H "x-api-key: $KAPABLE_API_KEY"You should see your identity and workspace ID in the response.
-
5. Create and deploy an app
Use the installed CLI. The
blankstarter is in the live template catalog.kapable app templates kapable app create hello-kapable --template blank kapable app clone hello-kapable cd hello-kapable kapable app deploy hello-kapable kapable app open hello-kapable --printYou should see a deployment with status
liveand a URL that ends in.kapable.run.