BastosConvert API

Quickstart

Quickstart

Your first conversion takes one request — no signup required for the instant tools.

Convert an audio file

Send the file as multipart/form-data: a file part plus a target_format text field. The converted file streams back in the response.

curl -X POST https://bastosconvert.com/api/v1/media/convert_audio \
  -F file=@track.wav \
  -F target_format=mp3 \
  -o track.mp3

That's it — track.mp3 is your converted file. The same pattern works for video (/media/convert_video).

Merge two PDFs

PDF tools take numbered file_0, file_1, … parts (declared order is preserved):

curl -X POST https://bastosconvert.com/api/v1/pdf/merge \
  -F file_0=@cover.pdf \
  -F file_1=@body.pdf \
  -o merged.pdf

Handling the response

  • 2xx — the response body is the converted file (binary). Stream it to disk (-o) or pipe it onward.

  • 4xx/5xx — a JSON problem document. For example, a missing field:

    { "type": "https://bastos-cms.dev/errors/bad_request",
      "title": "bad_request", "status": 400, "code": "bad_request",
      "params": { "message": "missing `target_format` field" } }

What's next

  • The instant tools are public but rate-limited — see Rate limits.
  • For the asynchronous, history-tracked pipeline, see Conversions & jobs, which needs an API key.
  • Browse every endpoint's exact schema in the API reference (sidebar).

On this page