Base URL
Authentication
All API requests require authentication using an API key in theAuthorization 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 allowedX-RateLimit-Remaining: Remaining requests in current windowX-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)
Endpoints Overview
Text-to-Speech
POST /tts-synthesize- Convert text to speech
Speech-to-Text
POST /stt- Transcribe audio to textGET /stt/languages- Get supported languages
Voices
GET /voices- List all voices
Music
POST /songs- Create a song (async)GET /songs- List songsGET /songs/{id}- Poll song statusPATCH /songs/{id}- Update flagsDELETE /songs/{id}- Move to trashGET /songs/{id}/download- Download MP3GET /songs/voices- List voicesPOST /songs/voices- Save custom voiceGET /songs/health- Service status
Dialer
GET /dialer/status- Account statusGET /dialer/pool- Search available numbersPOST /dialer/pool/allocate- Allocate a number ($6/month)GET /dialer/numbers- List rented numbersDELETE /dialer/numbers/{e164}- Release a numberPUT /dialer/caller-id- Set default caller IDGET /dialer/logs- Call history (CDR)POST /dialer/calls- Reserve a callGET /dialer/live- In-flight callsGET /dialer/calls/line-status- Carrier statusGET /dialer/recordings- List recordingsPOST /dialer/recordings/{id}/playback-url- Playback linkPOST /dialer/recordings/{id}/transcript- Get transcriptDELETE /dialer/recordings/{id}- Delete recordingPUT /dialer/recording- Toggle recording on/offGET /dialer/subscriptions- Number subscriptionsGET /dialer/usage- Billing and charges- Webhook endpoints (create, update, delete, rotate, test, deliveries)
Memory & RAG
POST /memory/ingest- Store a single memory (user/knowledge/hive)POST /memory/ingest/batch- Batch-store up to 100 memoriesPOST /memory/documents/extract- Upload a document (PDF, DOCX, XLSX, images) for extraction + OCR + chunked ingestPOST /memory/search- Hybrid semantic + keyword recallPOST /memory/context- Assemble an LLM-ready context string for RAGGET /memory/collections- List collections in the workspacePOST /memory/collections- Create a team/knowledge/hive collectionGET /memory/usage- Monthly spend breakdown and wallet balance
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 balanceGET /billing/topup/quote- Credits for a custom USD amountPOST /billing/add-funds- Start checkout for a top-upGET /billing/usage-logs- Per-operation deduction and top-up historyGET /billing/transactions- Payment history
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