Skip to main content

Base URL

Authentication

All API requests require authentication using an API key in the Authorization header:

Response Format

All API responses are returned in JSON format unless otherwise specified.

Success Response

Error Response

HTTP Status Codes

Billing Error Codes

Rate Limiting

API requests are rate-limited based on your subscription plan. Rate limit information is included in response headers:
  • X-RateLimit-Limit: Maximum requests allowed
  • X-RateLimit-Remaining: Remaining requests in current window
  • X-RateLimit-Reset: Time when the rate limit resets (Unix timestamp)

Pagination

List endpoints support pagination using query parameters:
  • page: Page number (default: 1)
  • limit: Items per page (default: 20, max: 100)
Response includes pagination metadata:

Endpoints Overview

Text-to-Speech

  • POST /tts-synthesize - Convert text to speech

Speech-to-Text

  • POST /stt - Transcribe audio to text
  • GET /stt/languages - Get supported languages

Voices

  • GET /voices - List all voices

Music

  • POST /songs - Create a song (async)
  • GET /songs - List songs
  • GET /songs/{id} - Poll song status
  • PATCH /songs/{id} - Update flags
  • DELETE /songs/{id} - Move to trash
  • GET /songs/{id}/download - Download MP3
  • GET /songs/voices - List voices
  • POST /songs/voices - Save custom voice
  • GET /songs/health - Service status
Music is free during beta. No wallet deduction occurs. Generation takes ~1.5–2.5 min per song. Only one song generates at a time per workspace.

Dialer

  • GET /dialer/status - Account status
  • GET /dialer/pool - Search available numbers
  • POST /dialer/pool/allocate - Allocate a number ($6/month)
  • GET /dialer/numbers - List rented numbers
  • DELETE /dialer/numbers/{e164} - Release a number
  • PUT /dialer/caller-id - Set default caller ID
  • GET /dialer/logs - Call history (CDR)
  • POST /dialer/calls - Reserve a call
  • GET /dialer/live - In-flight calls
  • GET /dialer/calls/line-status - Carrier status
  • GET /dialer/recordings - List recordings
  • POST /dialer/recordings/{id}/playback-url - Playback link
  • POST /dialer/recordings/{id}/transcript - Get transcript
  • DELETE /dialer/recordings/{id} - Delete recording
  • PUT /dialer/recording - Toggle recording on/off
  • GET /dialer/subscriptions - Number subscriptions
  • GET /dialer/usage - Billing and charges
  • Webhook endpoints (create, update, delete, rotate, test, deliveries)
Dialer is billed through the workspace wallet. Numbers cost ₹600/month ($6/month); calls cost ₹0.30/min ($0.003/min) inbound/outbound, prorated per second. Setup prerequisites (trunk and KYC) are completed in the dashboard, not via API.

Memory & RAG

  • POST /memory/ingest - Store a single memory (user/knowledge/hive)
  • POST /memory/ingest/batch - Batch-store up to 100 memories
  • POST /memory/documents/extract - Upload a document (PDF, DOCX, XLSX, images) for extraction + OCR + chunked ingest
  • POST /memory/search - Hybrid semantic + keyword recall
  • POST /memory/context - Assemble an LLM-ready context string for RAG
  • GET /memory/collections - List collections in the workspace
  • POST /memory/collections - Create a team/knowledge/hive collection
  • GET /memory/usage - Monthly spend breakdown and wallet balance
Memory endpoints are billed per operation from your workspace credits (see Memory Pricing for rates). Every billable response includes x-credit-balance, x-credit-charged, and x-billing-tx headers so you can track spend in real time. When credits run out, billable endpoints return 402 with a structured details body so your client can prompt the user to top up or upgrade.

LLM Chat

  • POST /v1/chat/completions - OpenAI-compatible chat completions

Billing & Usage

Usage is paid from plan credits that renew monthly (Free 3,000, Starter 120,000, Creator 400,000, Pro 2,000,000). One credit equals one TTS character. Plan credits are used first. Then top-up credits are used. Top-up credits never expire. Creator and Pro workspaces can buy top-ups at their plan rate, from $10 to $1,000. Free and Starter workspaces can upgrade to a plan with more credits. See Plans, Credits & Top-ups for the rate formula and examples.
  • GET /billing/topup - Plan eligibility, presets and credit balance
  • GET /billing/topup/quote - Credits for a custom USD amount
  • POST /billing/add-funds - Start checkout for a top-up
  • GET /billing/usage-logs - Per-operation deduction and top-up history
  • GET /billing/transactions - Payment history
All billing endpoints require billing:manage permission (workspace owner only). Non-owners receive 403 Forbidden.

SDKs

We provide official SDKs for popular programming languages:

JavaScript/TypeScript

npm install 60db-service

Python

pip install sixtydb