API Reference

Core SDK

Backend SDK for all Oblien features. Use this in your server code to access agents, chat, sandbox, search, credits, namespaces, and more.

Language: Node.js / TypeScript
Coming Soon: Python, Go, Ruby, PHP

Installation

npm install oblien

Setup

1. Get API Credentials

  1. Go to DashboardSettingsAPI Credentials
  2. Click Create API Key
  3. Copy Client ID and Client Secret

⚠️ Secret is shown only once - save it immediately!

2. Initialize Client

import { OblienClient } from 'oblien';

const client = new OblienClient({
  clientId: process.env.OBLIEN_CLIENT_ID,
  clientSecret: process.env.OBLIEN_CLIENT_SECRET
});

Environment Variables:

OBLIEN_CLIENT_ID=oblien_xxx...
OBLIEN_CLIENT_SECRET=sk_xxx...

Available Modules

One client, all features:

  • Agents - Create and manage AI agents
  • Chat - Chat sessions and guest management
  • Sandbox - Code execution environments
  • Search - Web search and content extraction
  • Credits - Billing and quota management
  • Namespaces - Workspace and project management
  • Icons - Semantic icon and media search

Quick Example

import { OblienClient } from 'oblien';
import { OblienAgents } from 'oblien/agents';
import { OblienChat } from 'oblien/chat';
import { OblienCredits } from 'oblien/credits';

const client = new OblienClient({
  clientId: process.env.OBLIEN_CLIENT_ID,
  clientSecret: process.env.OBLIEN_CLIENT_SECRET
});

// Use any module
const agents = new OblienAgents(client);
const chat = new OblienChat(client);
const credits = new OblienCredits(client);

Tree-Shakeable Imports

Import only what you need:

// Recommended: Subpath imports
import { OblienClient } from 'oblien';
import { OblienAgents } from 'oblien/agents';
import { OblienChat } from 'oblien/chat';

// Or: Main entry (includes all modules)
import { OblienClient, OblienAgents, OblienChat } from 'oblien';

Documentation

Who Should Use This

Backend developers - Use in server code (Express, Next.js API routes, etc.)
Frontend developers - Use the Chat SDK instead
Full-stack - Use both SDKs together