개발자를 위한 VoxScriber API 전체 문서. 엔드포인트, 인증 및 코드 예제 포함.
개발자를 위한 완전한 VoxScriber REST API 문서입니다. 인증, 주요 엔드포인트, 웹훅, 그리고 시스템에 자동 전사를 통합하는 방법을 알아보세요.
API 토큰을 통한 안전한 인증 시스템.
전사를 위한 자동 파일 제출.
진행 상황에 대한 자동 알림.
API 키를 공개적으로 절대 공유하지 마세요. 환경 변수에 저장하고 버전 관리되는 소스 코드에는 절대 저장하지 마세요.
모든 요청의 Authorization 헤더에 API 키를 포함하세요:
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
매개변수:
file (필수) - 오디오/비디오 파일language (선택) - 언어 코드 (예: "en-US")engine (선택) - 전사 엔진 ("ASSEMBLYAI", "WHISPER", "ELEVENLABS")speaker_detection (선택) - 화자 식별 활성화 (boolean)응답:
{
"id": "upload_abc123",
"status": "UPLOADED",
"duration": 120.5,
"fileSize": 2048000
}
POST /v1/transcribe
Content-Type: application/json
본문:
{
"uploadId": "upload_abc123",
"engine": "ASSEMBLYAI",
"speakerDetection": true,
"language": "en-US"
}
GET /v1/transcription/{id}/status
응답:
{
"id": "trans_xyz789",
"status": "COMPLETED",
"progress": 100,
"text": "Transcribed text...",
"duration": 120.5,
"creditsUsed": 8
}
GET /v1/transcription/{id}/export?format=json
사용 가능한 형식: json, txt, srt, vtt, docx, pdf
| 엔드포인트 | 제한 | 시간 창 | |---|---|---| | 업로드 | 10개 요청 | 60초 | | 전사 | 10개 요청 | 60초 | | 조회 | 60개 요청 | 60초 | | 내보내기 | 30개 요청 | 60초 |
전사 상태를 추적하기 위해 폴링 대신 웹훅을 사용하세요. 요청 수를 크게 줄이고 통합 효율성을 높입니다.
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()
| 코드 | 의미 | 권장 조치 | |---|---|---| | 400 | 잘못된 요청 | 매개변수 확인 | | 401 | 인증되지 않음 | API 키 확인 | | 403 | 금지됨 | 토큰 권한 확인 | | 429 | 속도 제한 초과 | 잠시 기다린 후 다시 시도 | | 500 | 내부 오류 | 30초 후 다시 시도 |