← HomeProductsSecurity

Build with SANSA AI APIs

Integrate AI-powered creative, productivity, and business tools into your applications with our comprehensive REST APIs.

API Documentation OpenAPI Spec

Quick Start

Get started with SANSA AI API in under 5 minutes.

curl -X POST https://api.sansaa.world/api/ai/generate-image \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"prompt": "A sunset over mountains"}'

Authentication

Secure API access with JWT tokens or API keys.

const response = await fetch('/api/auth/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ email, password })
});

AI Image Generation

Generate images from text with multiple models.

POST /api/studio/ai/run
{
"prompt": "Professional product photo",
"model": "sansa-vision-ultra",
"size": "1024x1024",
"style": "cinematic"
}

AI Chat / Assistant

Stream AI responses with conversation memory.

POST /api/chat/stream
{
"message": "Explain quantum computing",
"model": "sansa-gpt-ultra",
"thread_id": "optional-thread-id"
}

Webhooks

Receive real-time notifications for events.

POST /api/webhooks/register
{
"url": "https://your-app.com/hook",
"events": ["generation.complete",
"payment.success"]
}

SDKs (Coming Soon)

Official client libraries for popular languages.

// npm install @sansa-ai/sdk
import { SansaAI } from '@sansa-ai/sdk';
const sansa = new SansaAI('YOUR_KEY');
const image = await sansa.image.generate({
prompt: 'A beautiful landscape'
});

Core API Endpoints

POST/api/auth/loginUser login
POST/api/auth/registerUser registration
GET/api/auth/meCurrent user
POST/api/studio/ai/runAI image generation
POST/api/chat/streamAI chat streaming
GET/api/credits/balanceCredit balance
GET/api/productsList products
GET/api/plansPricing plans
POST/api/ai-tools/writeAI writing
POST/api/ai-tools/codeAI code assistant
GET/api/hrms/employeesHRMS employees
GET/api/crm/contactsCRM contacts
GET/api/pm/boardsProject boards
GET/api/lms/coursesLMS courses
GET/healthHealth check
GET/api/statusPlatform status