Skip to content

Every API request is authenticated with an API key and paid from your account's prepaid API credit. This guide gets you both, then makes your first request. The API is open on every plan, the Free plan included: you don't need a subscription or a credit pack to use it.

​1. Open the Developer workspace

1

Sign up

Create an account at voice213.com with your email address or your Google account. You'll need an Algerian mobile number, such as 0661234567 or +213661234567.

2

Switch to the Developer workspace

Click the workspace switcher under the logo at the top of the sidebar (it reads Creative) and choose Developer. This workspace holds your API key, the API Playground, usage and your API credit.

API requests aren't paid from your plan's credits. They're paid from API credit, a separate balance in dinars. Even an Unlimited subscription pays for API requests from API credit, and the Free plan can use the API as soon as it has some.

​2. Add API credit

API voice-overs are priced per character, in Algerian dinars, by model: Voice213 Lite, the default, costs 9 DA per 1,000 characters, with a minimum of 100 characters per request. See API Pricing & Limits for every model.

1

Open the Developer Dashboard

In the Developer workspace, open the Developer Dashboard. Your balance is on the API credit card, and every model's price is under Endpoints & pricing.

2

Top up

Click Top up, choose 2,000, 5,000, 10,000 or 20,000 DA (or enter any amount from 1,000 to 200,000 DA), and pay with Edahabia or CIB, by Visa or Mastercard, or by bank transfer. Online payments are added a few moments after they go through.

1,000 DA covers about 111,000 characters with Voice213 Lite, or 50,000 with Voice213 Pro. API credit never expires.

​3. Create an API key

1

Open API Keys

In the Developer workspace, open API Keys and click Create key.

2

Name the key

Enter a Key name you'll recognize later, such as My Store Backend.

3

Copy it now

Your new key starts with sk_live_. Copy it and keep it somewhere safe, then click I've saved it: the key is shown only once. Afterwards the page shows only its last eight characters.

Treat your API key like a password. Never commit it to source control or ship it in browser or mobile app code. Anyone who has it can spend your API credit.

An account has one API key. To replace it, delete it on the API Keys page and create a new one. You can also switch it off and on again without deleting it.

​4. Set your API key

Keep the key in an environment variable so it never appears in your code:

export VOICE213_API_KEY="sk_live_your_key_here"

​5. Make your first request

This request turns a line of Algerian darija into speech with the Voice213 Lite model and the voice Nariman, then saves it as hello.mp3:

curl -s -X POST https://api.voice213.com/api/v1/tts \
  -H "Authorization: Bearer $VOICE213_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text": "مرحبا بيكم في Voice213", "model": "voice213-lite", "voice": "nariman"}' \
  | jq -r .audioUrl | xargs curl -s -o hello.mp3

Play hello.mp3 and you'll hear Nariman say "Welcome to Voice213" in Algerian darija. The text is 22 characters, so the request was billed the 100-character minimum: 0.90 DA. The voice-over is also in your History in the web app.

To hear the same line with another model or voice, change one word: "model": "voice213-pro-2", or "voice": "kenza".

Want to try it without writing code? The API Playground runs the same request from your browser with your key, and shows the matching cURL, JavaScript and Python.

​Next steps

Was this page helpful?