< Back

API & Integrations

Connect ASI Biont AI to any system — REST API, webhooks, and scheduled tasks

Public REST API

Full REST API at /api/v1/* with key-based authentication. Manage chat, missions, tasks, notes, integrations, and schedule from any HTTP client.

Generate an API key in the dashboard. Keys are prefixed with asb_ (64 hex chars, stored as SHA-256 hash). Pass the key in the X-API-Key header. Optional: set scope (full, chat, webhook) and expiration date.

Key Endpoints

POST /api/v1/chat — Chat with AI
GET /api/v1/missions — List / run missions
GET /api/v1/tasks — List tasks
GET /api/v1/notes — List notes
GET /api/v1/events — Event log
POST /api/v1/schedule — Manage scheduled tasks
POST /api/v1/keys/create — Manage API keys
POST /api/v1/webhooks/outgoing/register — Manage outgoing webhooks
Outgoing Webhooks

Subscribe to AI events and receive HTTP POST notifications to your URL. Every webhook payload is signed with HMAC-SHA256 — verify authenticity on your end.

Event Types

  • mission_created — New mission created
  • task_completed — Task completed
  • ai_message — AI message in chat
  • reminder_triggered — Reminder triggered
  • note_created — Note created
  • scheduled_trigger — Scheduled task executed
  • integration_connected — Integration connected

Each webhook includes the X-ASI-Signature header — HMAC-SHA256 of the body signed with your webhook's secret key. Delivery timeout is 15 seconds; if your server doesn't respond with HTTP 200, the delivery fails. No automatic retries — design your endpoint to be idempotent.

Scheduled Tasks (Cron)

Schedule AI prompt execution with cron expressions. Set a prompt and time — AI executes the task, saves results to notes, and sends a report.

Examples

0 * * * * — Every hour
0 9 * * 1-5 — Every weekday at 9 AM
0 8 * * 1 — Every Monday at 8 AM

The background worker checks for due tasks every 60 seconds. On trigger, AI executes the prompt, saves the response as a note, and emits a scheduled_trigger event (can be caught by webhooks).

Event System

The Event System is the core messaging bus that connects all components of ASI Biont. Built on an asyncio.Queue architecture, it ensures reliable, asynchronous event delivery across the platform.

Architecture

  • Events are pushed to an in-memory asyncio.Queue
  • A background worker processes events one by one
  • Each event is logged to the event_logs table for audit
  • Handlers are registered via the @EventSystem.on('event_type') decorator

Event Format

{
    "user_id": 42,
    "event_type": "task_completed",
    "payload": {
        "task_id": 123,
        "title": "Analyze sales data",
        "status": "completed"
    }
}

Built-in Handlers

  • Outgoing Webhooks — Delivers events to registered webhook URLs with HMAC-SHA256 signing
  • Event Logging — Saves every event to the database for audit and debugging

Ready to integrate AI into your workflow?

Generate your API key in one click and start building.

Go to Dashboard Ask a question