API Reference

API Reference

Complete reference for the Oblien API. Use SDK or REST API to access all features.

Getting Started

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. Never expose credentials in frontend code.

2. Make Your First Request

npm install oblien
import { OblienClient } from 'oblien';
import { OblienChat } from 'oblien/chat';

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

const chat = new OblienChat(client);

const session = await chat.createSession({
  agentId: 'your-agent-id',
  namespace: 'production',
  endUserId: 'user-123'
});

console.log(session);
const response = await fetch('https://api.oblien.com/ai/session/create', {
  method: 'POST',
  headers: {
    'X-Client-ID': process.env.OBLIEN_CLIENT_ID,
    'X-Client-Secret': process.env.OBLIEN_CLIENT_SECRET,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    agent_id: 'your-agent-id',
    namespace: 'production',
    end_user_id: 'user-123'
  })
});

const session = await response.json();
console.log(session);
curl -X POST https://api.oblien.com/ai/session/create \
  -H "X-Client-ID: $OBLIEN_CLIENT_ID" \
  -H "X-Client-Secret: $OBLIEN_CLIENT_SECRET" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_id": "your-agent-id",
    "namespace": "production",
    "end_user_id": "user-123"
  }'

Base URL

https://api.oblien.com

Authentication

All requests require headers:

X-Client-ID: your-client-id
X-Client-Secret: your-client-secret

Client-side: Use session tokens instead (Bearer token).

Rate Limits

PlanRequests/minTokens/day
Free60100K
Pro6001M
EnterpriseCustomCustom

See Pricing for details.

Endpoints

Sessions

EndpointMethodDescription
/ai/session/createPOSTCreate chat session
/ai/session/listGETList sessions
/ai/session/:idGETGet session
/ai/session/:id/historyGETGet session history
/ai/session/:id/token/createPOSTCreate session token
/ai/session/token/refreshPOSTRefresh token

Chat

EndpointMethodDescription
/ai/chat/sendPOSTSend message
/ai/chat/uploadPOSTUpload files
/ai/session/historyGETGet history (client-side)
/ai/session/preparePOSTPrepare session

Agents

EndpointMethodDescription
/ai/agentsGETList agents
/ai/agentsPOSTCreate agent
/ai/agents/:idGETGet agent
/ai/agents/:idPUTUpdate agent
/ai/agents/:idDELETEDelete agent
/ai/agents/:id/settingsGET/PUTAgent settings

Sandbox

EndpointMethodDescription
/sandboxGETList sandboxes
/sandboxPOSTCreate sandbox
/sandbox/:idGETGet sandbox
/sandbox/:idDELETEDelete sandbox
/sandbox/:id/startPOSTStart sandbox
/sandbox/:id/stopPOSTStop sandbox
/sandbox/:id/restartPOSTRestart sandbox
/sandbox/:id/metricsGETGet metrics
EndpointMethodDescription
/searchPOSTSearch web
/search/extractPOSTExtract content
/search/crawlPOSTCrawl website

Credits

EndpointMethodDescription
/credits/balanceGETGet balance
/credits/namespace-quotaGET/POSTNamespace quotas
/credits/end-users/quotaGET/POSTEnd user quotas
/credits/historyGETUsage history
/credits/pricing-infoGETGet pricing

Namespaces

EndpointMethodDescription
/namespacesGETList namespaces
/namespacesPOSTCreate namespace
/namespaces/:idGETGet namespace
/namespaces/:idDELETEDelete namespace

Icons

EndpointMethodDescription
/icons/searchGETSearch icons
/icons/resourcesGETGet resources

Deploy

EndpointMethodDescription
/deployGETList deployments
/deployPOSTCreate deployment
/deploy/:idGETGet deployment
/deploy/:id/logsGETGet logs

Projects

EndpointMethodDescription
/projectsGETList projects
/projectsPOSTCreate project
/projects/:idGETGet project
/projects/:idPUTUpdate project
/projects/:idDELETEDelete project

Response Format

Success:

{
  "success": true,
  "data": { ... }
}

Error:

{
  "success": false,
  "error": "Error message"
}

SDKs

LanguagePackageStatus
Node.jsnpm install oblien✅ Available
Pythonpip install oblien🔜 Coming Soon
Gogo get oblien🔜 Coming Soon

Next Steps