Test the pdfRest API in Bruno

Test pdfRest in Bruno with three focused requests: convert a Word document, compress a PDF, and connect the two operations using a resource ID.
Share this page

One upload. A PDF you can use.

Test pdfRest in Bruno with three focused requests: convert a Word document, compress a PDF, and connect the two operations using a resource ID.

Uses pdfRest Cloud. Bring your API key and a test file. Free Starter output includes watermarks or text redactions, removed on paid plans. Plan limits and API usage apply.

Moving from Postman? Start with a working PDF request.

Bruno is an API client that lets you send requests and inspect responses. Its file-based collections fit alongside your code. This tutorial starts directly in Bruno, so you do not need a Postman account, workspace, or export.

  1. 01 · ConvertUpload a Word document and retrieve a PDF.
  2. 02 · CompressUpload a PDF and choose a compression level.
  3. 03 · ConnectReuse the converted PDF by ID, without uploading it again.

You will build three requests directly in Bruno. Each one stays visible and editable as you work through the examples. No downloadable collection is needed.

Set up Bruno and add your API key

Have Bruno installed, your pdfRest API key, and a small .docx file ready. You can use the PDF created in the first example for the second.

  1. Create a local collection in Bruno named pdfRest examples to save the requests you build.
  2. Create an environment named pdfRest Cloud. Add the variables below, using the US or EU address for base_url.
  3. Mark api_key as a secret and enter your key. Save and select the environment.
Environment variables to add
VariableValue
base_urlhttps://api.pdfrest.com
Or EU: https://eu-api.pdfrest.com
api_keyYour pdfRest API key, stored as a Bruno secret
converted_pdf_idLeave blank until example three

Add these headers to each request. Leave Bruno’s authentication setting at No Auth because the key is sent in its own header.

Api-Key: {{api_key}}
Accept: application/json

Keep your key in the secret variable, not in shared request files. Let Bruno generate the multipart Content-Type header automatically.

1. Convert a Word document to PDF

Send your first request in about 60 seconds. With Bruno, your key, and a small file ready, select the file and send it. Installation, account setup, upload time, and processing time can take longer.

POST {{base_url}}/pdf
  1. In your collection, create a new HTTP request named 01 Convert Word to PDF. Set the method to POST and the URL to {{base_url}}/pdf. Add the two headers shown above.
  2. In Body, select Multipart Form. Add a row named file, set its type to File, and use its file picker to choose your .docx.
  3. Send the request. A successful synchronous response returns HTTP 200 and JSON containing outputUrl, outputId, and inputId.
  4. Open the returned outputUrl in your browser to retrieve the PDF. Check the converted document.
Bruno multipart file upload example: the file field must contain the file itself, not a text string containing its path. Let Bruno generate the Content-Type header and multipart boundary.

Read the response

{
  "outputUrl": "",
  "outputId": "",
  "inputId": ""
}

Illustrative response only. Your request returns actual URLs and IDs.

The response is JSON describing the result. The PDF is available at outputUrl; it is not the JSON response body. Keep the conversion response handy for example three.

2. Compress a PDF with one option

Create a second HTTP request named 02 Compress PDF upload. Set the method to POST, use the URL below, and add the same two headers. Choose Body → Multipart Form and add these fields. You can use the PDF you just downloaded.

POST {{base_url}}/compressed-pdf
Multipart fields for compression
FieldTypeValue
fileFileYour PDF
compression_levelTextmedium

Send the request and open its outputUrl. Compare the result with your input. Use low for lighter compression or high for stronger compression, with a possible tradeoff in output quality.

File-size reduction depends on the document. An already optimized PDF may not become smaller. The uploaded file on your computer remains unchanged.

3. Convert, then compress without a second upload

Example two uploads a PDF from your computer. This example uses the PDF that pdfRest already created in example one.

Word file → Convert to PDF → outputId → Compress PDF
Upload the Word document once. Pass the converted PDF’s resource ID to the next operation.
  1. Return to the successful response from 01 Convert Word to PDF. Copy its outputId.
  2. Paste that value into converted_pdf_id in your selected Bruno environment and save.
  3. Create a third HTTP request named 03 Compress converted PDF by ID. Set it to POST {{base_url}}/compressed-pdf, add the same two headers, and add the multipart text fields shown below. Keep the same environment, region, and API key used for conversion.
  4. Send the request. Open the new outputUrl to retrieve the compressed PDF.
Multipart fields for the resource-ID request
FieldTypeValue
idText{{converted_pdf_id}}
compression_levelTextmedium

Use outputId, not inputId. The conversion input is a Word document; its output is the PDF that Compress PDF needs. Use id instead of a file field in this request.

You have connected two processing steps with an API resource ID. The same pattern lets you build a PDF workflow without moving each intermediate file back through your application.

If a request does not work

My API key is not being accepted

Confirm that the intended environment is selected and its api_key secret has a value. Check that the request sends the Api-Key header without a Bearer prefix. Read the API’s response for the specific authentication error.

The file is missing or the multipart body is invalid

Select an actual local file in the request’s file picker. A pasted path in a text field does not upload a file. Keep the field name file, use the File type, and remove any manually added Content-Type header so Bruno can generate the boundary.

The ID-based request fails

Use the conversion response’s outputId, save it as converted_pdf_id, and keep the same region and key. If the resource is no longer available, rerun conversion and use its new ID. Resource storage is subject to pdfRest’s retention rules.

Why does the output have a watermark?

Cloud Starter output is watermarked. Review pdfRest plans for production output, operation access, and usage allowances.

Does running Bruno locally keep my document local?

No. These requests send the document to the selected pdfRest Cloud endpoint. A local API client does not make Cloud processing local. If processing must stay in your infrastructure, review pdfRest’s self-hosted deployment options and their configuration separately.

Take the next request into API Lab.

This tutorial stops at three requests on purpose. For any other endpoint, build the request in API Lab, copy the cURL it generates, and import it into Bruno as a new request.

In Bruno’s New Request dialog, choose from cURL and paste the command. Check the imported headers and multipart fields, select your local file if needed, and replace any pasted API key with {{api_key}} before saving.

Generate a self-service API Key now!
Create your FREE API Key to start processing PDFs in seconds, only possible with pdfRest.