Skip to main content

Get Your API Key

First, you’ll need an API key to authenticate your requests:
1

Sign Up

Create an account at app.60db.com
2

Navigate to API Keys

Go to Settings → API Keys in your dashboard
3

Create New Key

Click “Create API Key” and give it a descriptive name
4

Copy Your Key

Copy your API key and store it securely
Keep your API key secret! Never commit it to version control or expose it in client-side code.

Choose Your SDK

Installation

npm install 60db

Basic Usage

import { SixtyDBClient } from '@60db-own/60db-js';

// Initialize the client
const client = new SixtyDBClient('your-api-key');

// Text to Speech
const audio = await client.textToSpeech({
  text: 'Hello, world!',
  voice_id: 'default-voice'
});

// Get all voices
const voices = await client.getVoices();
console.log(voices);

Streaming Example

await client.textToSpeechStream(
  {
    text: 'This is streaming audio',
    voice_id: 'default-voice'
  },
  {
    onChunk: (chunk) => {
      // Handle audio chunk
      console.log('Received chunk:', chunk.length, 'bytes');
    },
    onComplete: () => {
      console.log('Streaming complete!');
    },
    onError: (error) => {
      console.error('Error:', error);
    }
  }
);

Next Steps