Encode Watermark
Watermark your audio/video files with a unique OrigID for content authenticity and provenance tracking.
Endpoint
POST /api/watermark/encode
Authentication
Required: Bearer token (API key)
Authorization: Bearer origid_xxxxxxxxxxxxxxxx
Request
Headers
| Header | Value | Required |
|---|---|---|
Authorization | Bearer {api_key} | Yes |
Content-Type | multipart/form-data | Yes |
Body Parameters
Send as multipart/form-data:
| Parameter | Type | Description | Required |
|---|---|---|---|
file | File | Audio or video file to watermark | Yes |
Supported File Types
- Audio:
.wav,.mp3,.m4a,.flac - Video:
.mp4,.mov,.avi,.mkv
File Size Limits
- Maximum file size: 500MB
Response
Success Response (200 OK)
{
"task_id": "9171cdcb49e640c5b2d6d22d04456f7a"
}
| Field | Type | Description |
|---|---|---|
task_id | string | Unique identifier for tracking the encoding progress |
Error Responses
400 Bad Request
{
"error": "File is required"
}
401 Unauthorized
{
"error": "Authentication required"
}
500 Internal Server Error
{
"error": "Watermark service not configured"
}
Usage Examples
cURL
curl -X POST https://origid.ai/api/watermark/encode \
-H "Authorization: Bearer origid_xxxxxxxxxxxxxxxx" \
-F "file=@/path/to/audio.wav"
JavaScript/TypeScript
const file = document.querySelector('input[type="file"]').files[0];
const formData = new FormData();
formData.append('file', file);
const response = await fetch('https://origid.ai/api/watermark/encode', {
method: 'POST',
headers: {
'Authorization': 'Bearer origid_xxxxxxxxxxxxxxxx',
},
body: formData,
});
const data = await response.json();
console.log('Task ID:', data.task_id);
Python
import requests
headers = {
'Authorization': 'Bearer origid_xxxxxxxxxxxxxxxx',
}
files = {
'file': open('/path/to/audio.wav', 'rb'),
}
response = requests.post(
'https://origid.ai/api/watermark/encode',
headers=headers,
files=files
)
result = response.json()
print(f"Task ID: {result['task_id']}")
Workflow
After uploading a file for encoding:
- Upload File → Receive
task_id - Poll Progress → Use
GET /api/watermark/progress/{task_id}to check encoding status - Download Result → When progress reaches 100%, download the watermarked file
Processing Time
Encoding time depends on file size and duration:
- Audio files: ~5-10 seconds per minute of audio
- Video files: ~30-60 seconds per minute of video
Rate Limiting
- Default limit: 100 requests per hour per API key
- Concurrent jobs: Maximum 5 active encoding jobs per account
Notes
Asynchronous Processing
Encoding is processed asynchronously. You'll receive a task_id immediately, then poll for progress using the Progress endpoint.
File Retention
Processed files are retained for 7 days after completion. Download them within this period.
Original Quality
The watermarking process preserves the original quality of your audio/video files. The watermark is imperceptible to human perception.