API Documentation

One base URL, one key. Pick a provider/model by name. Responses are unified across providers.

Authentication

Send your key as a Bearer token. Create keys in the dashboard.

Authorization: Bearer sk_live_...

Base URL

https://voxhubapi.datavonix.com/v1

POST /v1/transcribe

Speech-to-Text. Send a file (multipart) or an audio_url (JSON). Billed per audio second.

cURL

curl https://voxhubapi.datavonix.com/v1/transcribe \
  -H "Authorization: Bearer sk_live_..." \
  -F "model=deepgram/nova-3" \
  -F "file=@meeting.mp3"

Python

import requests

r = requests.post(
    "https://voxhubapi.datavonix.com/v1/transcribe",
    headers={"Authorization": "Bearer sk_live_..."},
    data={"model": "assemblyai/universal-2"},
    files={"file": open("meeting.mp3", "rb")},
)
print(r.json()["text"])

Response

{
  "request_id": "req_8f2k...",
  "text": "Hi everyone, thanks for joining...",
  "duration_seconds": 612,
  "model": "deepgram/nova-3",
  "credits_charged": 81600,
  "balance_remaining": 4918400
}

POST /v1/speech

Text-to-Speech. Returns audio bytes; credits in response headers. Billed per character.

cURL

curl https://voxhubapi.datavonix.com/v1/speech \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{"model":"openai/tts-1","voice":"alloy","input":"Hello world"}' \
  --output hello.mp3

Node

const res = await fetch("https://voxhubapi.datavonix.com/v1/speech", {
  method: "POST",
  headers: {
    Authorization: "Bearer sk_live_...",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ model: "openai/tts-1", voice: "alloy", input: "Hello world" }),
});
const audio = Buffer.from(await res.arrayBuffer());

Headers

  • Idempotency-Key — safe retries; a duplicate isn't double-charged.
  • Response: x-request-id, x-credits-charged, x-balance-remaining.

Errors

{ "error": { "code": "insufficient_credits", "message": "..." } }

Codes: invalid_api_key, rate_limited, model_not_found, insufficient_credits, provider_unavailable.

Full machine-readable spec: /api/openapi.json