Create Split Job
Create a new asynchronous audio splitting job.
POST /api/v1/splits
Authentication
API Key required via X-API-Key header.
Request Headers
| Header | Required | Description |
|---|---|---|
X-API-Key | Yes | Your API key |
Content-Type | Yes | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
sourceUrl | string | Yes | URL of the audio file to split |
splitMode | string | Yes | "duration" or "fileSize" |
segmentDuration | integer | Conditional | Segment length in seconds (required if splitMode is "duration") |
maxFileSize | integer | Conditional | Max segment size in bytes (required if splitMode is "fileSize") |
outputFormat | string | No | Output format: mp3, wav, flac, ogg, aac. Defaults to source format. |
webhookUrl | string | No | URL to receive job status notifications |
metadata | object | No | Arbitrary key-value pairs attached to the job |
Example Request
{
"sourceUrl": "https://example.com/podcast-episode-42.mp3",
"splitMode": "duration",
"segmentDuration": 600,
"outputFormat": "mp3",
"webhookUrl": "https://your-app.com/webhooks/audiospliter",
"metadata": {
"episodeId": "42",
"show": "My Podcast"
}
}
Response
201 Created
{
"id": "job_abc123def456",
"status": "queued",
"splitMode": "duration",
"segmentDuration": 600,
"outputFormat": "mp3",
"webhookUrl": "https://your-app.com/webhooks/audiospliter",
"metadata": {
"episodeId": "42",
"show": "My Podcast"
},
"createdAt": "2026-03-29T10:00:00Z"
}
400 Bad Request
{
"error": {
"code": "INVALID_PARAMS",
"message": "sourceUrl is required",
"status": 400
}
}
401 Unauthorized
{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key",
"status": 401
}
}
413 Payload Too Large
{
"error": {
"code": "FILE_TOO_LARGE",
"message": "File exceeds maximum size of 2 GB for your plan",
"status": 413
}
}
Code Examples
cURL
curl -X POST https://api.audiospliter.com/api/v1/splits \
-H "X-API-Key: as_live_abc123" \
-H "Content-Type: application/json" \
-d '{
"sourceUrl": "https://example.com/audio.mp3",
"splitMode": "duration",
"segmentDuration": 600,
"outputFormat": "mp3"
}'
Node.js
const response = await fetch('https://api.audiospliter.com/api/v1/splits', {
method: 'POST',
headers: {
'X-API-Key': process.env.AUDIOSPLITER_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
sourceUrl: 'https://example.com/audio.mp3',
splitMode: 'duration',
segmentDuration: 600,
outputFormat: 'mp3',
}),
});
const job = await response.json();
console.log(`Job created: ${job.id}`);
Python
import requests
import os
response = requests.post(
'https://api.audiospliter.com/api/v1/splits',
headers={
'X-API-Key': os.environ['AUDIOSPLITER_API_KEY'],
'Content-Type': 'application/json',
},
json={
'sourceUrl': 'https://example.com/audio.mp3',
'splitMode': 'duration',
'segmentDuration': 600,
'outputFormat': 'mp3',
},
)
job = response.json()
print(f"Job created: {job['id']}")
Rate Limiting
This endpoint counts toward your per-minute rate limit. See Rate Limits.