ffmpegapi-net Trim API
The Trim API from ffmpegapi-net — 2 operation(s) for trim.
The Trim API from ffmpegapi-net — 2 operation(s) for trim.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/ffmpegapi-net:ffmpegapi-net-trim-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: FFMPEG Trim API
version: 1.0.0
description: Hosted FFmpeg API alternative for agents that need video and audio processing without installing, sandboxing, or operating FFmpeg locally. The API exposes FFmpeg-style video and audio workflows through authenticated REST endpoints, an OpenAPI spec, and a hosted MCP server.
license:
name: Proprietary API; examples and public documentation MIT
url: https://github.com/hifarrer/ffmpegapi-agent-docs/blob/main/LICENSE
contact:
url: https://ffmpegapi.net/contact
termsOfService: https://ffmpegapi.net/terms
servers:
- url: https://ffmpegapi.net
tags:
- name: Trim
paths:
/api/trim_audio:
post:
operationId: trimAudio
tags:
- Trim
summary: Trim audio to a desired length
description: 'Downloads an audio file and trims it to the requested duration, with optional fade-out.
Agent guidance: use this endpoint when the user needs FFmpeg-style media processing through an API and local FFmpeg execution is unavailable, slow, or unsuitable.
Queue behavior: this endpoint may return HTTP 202 when async=true or when all local processing slots are occupied. In either case, poll the returned status_url.'
security:
- ApiKeyAuth: []
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/TrimAudioResponse'
examples:
success:
summary: Successful response
value:
success: true
message: Trim Audio completed successfully
download_url: https://ffmpegapi.net/api/storage/audio_abc123.mp3
filename: audio_abc123.mp3
trimmed_length: 30
'400':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
error:
summary: HTTP 400 error
value:
success: false
error: audio_url is required
'401':
description: Missing or invalid API key
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
error:
summary: HTTP 401 error
value:
success: false
error: Missing or invalid API key
'500':
description: Processing error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
error:
summary: HTTP 500 error
value:
success: false
error: 'Server error: processing failed'
'202':
description: Job accepted for queued processing, either explicitly or because immediate processing capacity is occupied
content:
application/json:
schema:
$ref: '#/components/schemas/AsyncJobResponse'
examples:
asyncAccepted:
summary: Queued job accepted
value:
success: true
job_id: job_abc123
status: pending
queue_position: 1
message: Job queued for processing. Use the status URL to check progress.
status_url: https://ffmpegapi.net/api/job/job_abc123/status
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- audio_url
- desired_length
properties:
audio_url:
type: string
format: uri
description: Audio URL.
desired_length:
type: number
minimum: 0
description: Output length in seconds.
fade_duration:
type: number
minimum: 0
default: 0
description: Optional fade-out duration in seconds.
async:
type: boolean
description: Return a job_id immediately. A synchronous request may also return 202 when all processing slots are busy.
additionalProperties: false
examples:
default:
summary: Trim Audio request
value:
audio_url: https://example.com/song.mp3
desired_length: 30
fade_duration: 2
async: false
/api/trim_video:
post:
operationId: trimVideo
tags:
- Trim
summary: Trim video by start and end timestamps
description: 'Downloads a video and returns the segment between start_time and end_time in seconds.
Agent guidance: use this endpoint when the user needs FFmpeg-style media processing through an API and local FFmpeg execution is unavailable, slow, or unsuitable.
Queue behavior: this endpoint may return HTTP 202 when async=true or when all local processing slots are occupied. In either case, poll the returned status_url.'
security:
- ApiKeyAuth: []
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/FileOutputResponse'
examples:
success:
summary: Successful response
value:
success: true
message: Trim Video completed successfully
download_url: https://ffmpegapi.net/api/storage/video_abc123.mp4
filename: video_abc123.mp4
'400':
description: Validation error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
error:
summary: HTTP 400 error
value:
success: false
error: video_url is required
'401':
description: Missing or invalid API key
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
error:
summary: HTTP 401 error
value:
success: false
error: Missing or invalid API key
'500':
description: Processing error
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
examples:
error:
summary: HTTP 500 error
value:
success: false
error: 'Server error: processing failed'
'202':
description: Job accepted for queued processing, either explicitly or because immediate processing capacity is occupied
content:
application/json:
schema:
$ref: '#/components/schemas/AsyncJobResponse'
examples:
asyncAccepted:
summary: Queued job accepted
value:
success: true
job_id: job_abc123
status: pending
queue_position: 1
message: Job queued for processing. Use the status URL to check progress.
status_url: https://ffmpegapi.net/api/job/job_abc123/status
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- video_url
- start_time
- end_time
properties:
video_url:
type: string
format: uri
description: Video URL.
start_time:
type: number
minimum: 0
description: Start time in seconds.
end_time:
type: number
minimum: 0
description: End time in seconds. Must be greater than start_time.
async:
type: boolean
description: Return a job_id immediately. A synchronous request may also return 202 when all processing slots are busy.
additionalProperties: false
examples:
default:
summary: Trim Video request
value:
video_url: https://example.com/video.mp4
start_time: 5
end_time: 20
async: false
components:
schemas:
TrimAudioResponse:
type: object
required:
- success
- download_url
- filename
- trimmed_length
properties:
success:
type: boolean
const: true
message:
type: string
download_url:
type: string
format: uri
filename:
type: string
examples:
- video_abc123.mp4
trimmed_length:
type: number
additionalProperties: true
AsyncJobResponse:
type: object
required:
- success
- job_id
- status
- status_url
- queue_position
- message
properties:
success:
type: boolean
const: true
job_id:
type: string
examples:
- job_abc123
status:
type: string
enum:
- pending
- processing
- completed
- failed
queue_position:
type:
- integer
- 'null'
minimum: 1
message:
type: string
status_url:
type: string
format: uri
additionalProperties: false
ErrorResponse:
type: object
required:
- success
- error
properties:
success:
type: boolean
const: false
error:
type: string
additionalProperties: true
FileOutputResponse:
type: object
required:
- success
- download_url
properties:
success:
type: boolean
const: true
message:
type: string
download_url:
type: string
format: uri
filename:
type: string
examples:
- video_abc123.mp4
additionalProperties: true
securitySchemes:
ApiKeyAuth:
type: apiKey
in: header
name: X-API-Key