ffmpegapi-net Compress API

The Compress API from ffmpegapi-net — 1 operation(s) for compress.

Operations 1

POST /api/compress_video Compress a video to a smaller H.264/AAC MP4 #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • 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.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/ffmpegapi-net:ffmpegapi-net-compress-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API 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. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

ffmpegapi-net-compress-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: FFMPEG Compress 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: Compress
paths:
  /api/compress_video:
    post:
      operationId: compressVideo
      tags:
      - Compress
      summary: Compress a video to a smaller H.264/AAC MP4
      description: 'Downloads a video and compresses it to MP4 using quality-first CRF settings by default. Optional max dimensions avoid upscaling and optional target_size_mb uses best-effort bitrate compression for upload limits. Use async=true for large videos; hosted defaults reject inputs over 500 MB and automatically queue known inputs over 100 MB for background processing.


        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/CompressVideoResponse'
              examples:
                success:
                  summary: Successful response
                  value:
                    success: true
                    message: Video compressed successfully
                    download_url: https://ffmpegapi.net/api/storage/video_abc123.mp4
                    filename: video_abc123.mp4
                    original_size_bytes: 52428800
                    compressed_size_bytes: 18874368
                    compression_ratio: 0.36
                    compression_mode: crf
        '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
              properties:
                video_url:
                  type: string
                  format: uri
                  description: Video URL to compress. Hosted default maximum input size is 500 MB.
                crf:
                  type: integer
                  minimum: 18
                  maximum: 35
                  default: 28
                  description: Quality value. Lower means higher quality and larger files.
                preset:
                  type: string
                  enum:
                  - ultrafast
                  - superfast
                  - veryfast
                  - faster
                  - fast
                  - medium
                  - slow
                  - slower
                  default: medium
                  description: H.264 encoding preset.
                max_width:
                  type: integer
                  minimum: 144
                  maximum: 3840
                  description: Optional maximum output width. The video is not upscaled.
                max_height:
                  type: integer
                  minimum: 144
                  maximum: 2160
                  description: Optional maximum output height. The video is not upscaled.
                audio_bitrate:
                  type: string
                  enum:
                  - 64k
                  - 96k
                  - 128k
                  - 192k
                  - 256k
                  - 320k
                  default: 128k
                  description: AAC audio bitrate.
                target_size_mb:
                  type: number
                  minimum: 1
                  description: Optional target output size in MiB.
                async:
                  type: boolean
                  description: Return a job_id immediately and process in the background. Recommended for compression jobs and large videos.
              additionalProperties: false
            examples:
              default:
                summary: Compress Video request
                value:
                  video_url: https://example.com/video.mp4
                  crf: 28
                  preset: medium
                  max_width: 1280
                  audio_bitrate: 128k
                  async: true
components:
  schemas:
    CompressVideoResponse:
      type: object
      required:
      - success
      - download_url
      - filename
      - original_size_bytes
      - compressed_size_bytes
      - compression_ratio
      - compression_mode
      properties:
        success:
          type: boolean
          const: true
        message:
          type: string
        download_url:
          type: string
          format: uri
        filename:
          type: string
          examples:
          - video_abc123.mp4
        original_size_bytes:
          type: integer
        compressed_size_bytes:
          type: integer
        compression_ratio:
          type: number
          description: compressed_size_bytes divided by original_size_bytes.
        compression_mode:
          type: string
          enum:
          - crf
          - target_size
      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
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key