Komplet VoxScriber API-dokumentation for udviklere. Endpoints, autentificering og kodeeksempler.
Komplet VoxScriber REST API-dokumentation for udviklere. Lær om autentificering, hovedendpoints, webhooks, og hvordan du integrerer automatisk transkription i dine systemer.
Sikkert autentificeringssystem via API-tokens.
Automatisk filindsendelse til transkription.
Automatiske meddelelser om fremskridt.
Del aldrig din API-nøgle offentligt. Gem den i miljøvariabler og aldrig i versionsstyret kildekode.
Inkluder din API-nøgle i Authorization-headeren for alle forespørgsler:
curl -X POST https://api.vozparatexto.com.br/v1/transcribe \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: multipart/form-data" \
-F "file=@audio.mp3"
POST /v1/upload
Content-Type: multipart/form-data
Parametre:
file (påkrævet) - Lyd-/videofillanguage (valgfri) - Sprogkode (f.eks. "en-US")engine (valgfri) - Transkriptionsmotor ("ASSEMBLYAI", "WHISPER", "ELEVENLABS")speaker_detection (valgfri) - Aktivér taleridentifikation (boolean)Svar:
{
"id": "upload_abc123",
"status": "UPLOADED",
"duration": 120.5,
"fileSize": 2048000
}
POST /v1/transcribe
Content-Type: application/json
Body:
{
"uploadId": "upload_abc123",
"engine": "ASSEMBLYAI",
"speakerDetection": true,
"language": "en-US"
}
GET /v1/transcription/{id}/status
Svar:
{
"id": "trans_xyz789",
"status": "COMPLETED",
"progress": 100,
"text": "Transcribed text...",
"duration": 120.5,
"creditsUsed": 8
}
GET /v1/transcription/{id}/export?format=json
Tilgængelige formater: json, txt, srt, vtt, docx, pdf
| Endpoint | Grænse | Vindue | |---|---|---| | Upload | 10 anmodninger | 60 sekunder | | Transkription | 10 anmodninger | 60 sekunder | | Forespørgsel | 60 anmodninger | 60 sekunder | | Eksport | 30 anmodninger | 60 sekunder |
Brug webhooks i stedet for polling til at spore transkriptionsstatus. Dette reducerer antallet af forespørgsler drastisk og forbedrer integrationseffektiviteten.
const FormData = require('form-data');
const fs = require('fs');
const axios = require('axios');
const API_KEY = process.env.VOXSCRIBER_API_KEY;
const BASE_URL = 'https://api.vozparatexto.com.br/v1';
async function transcribeFile(filePath) {
// 1. Upload
const form = new FormData();
form.append('file', fs.createReadStream(filePath));
const upload = await axios.post(`${BASE_URL}/upload`, form, {
headers: {
'Authorization': `Bearer ${API_KEY}`,
...form.getHeaders()
}
});
// 2. Transcribe
const transcription = await axios.post(`${BASE_URL}/transcribe`, {
uploadId: upload.data.id,
engine: 'ASSEMBLYAI',
speakerDetection: true
}, {
headers: { 'Authorization': `Bearer ${API_KEY}` }
});
return transcription.data;
}
import requests
import os
API_KEY = os.environ['VOXSCRIBER_API_KEY']
BASE_URL = 'https://api.vozparatexto.com.br/v1'
def transcribe_file(file_path):
headers = {'Authorization': f'Bearer {API_KEY}'}
# 1. Upload
with open(file_path, 'rb') as f:
upload = requests.post(
f'{BASE_URL}/upload',
headers=headers,
files={'file': f}
)
# 2. Transcribe
transcription = requests.post(
f'{BASE_URL}/transcribe',
headers=headers,
json={
'uploadId': upload.json()['id'],
'engine': 'ASSEMBLYAI',
'speakerDetection': True
}
)
return transcription.json()
| Kode | Betydning | Anbefalet handling | |---|---|---| | 400 | Ugyldig anmodning | Tjek parametre | | 401 | Ikke autentificeret | Tjek din API-nøgle | | 403 | Adgang nægtet | Tjek token-tilladelser | | 429 | Hastighedsgrænse overskredet | Vent og prøv igen | | 500 | Intern fejl | Prøv igen efter 30 sekunder |