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.
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.
- 01 · ConvertUpload a Word document and retrieve a PDF.
- 02 · CompressUpload a PDF and choose a compression level.
- 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.
- Create a local collection in Bruno named pdfRest examples to save the requests you build.
- Create an environment named pdfRest Cloud. Add the variables below, using the US or EU address for
base_url. - Mark
api_keyas a secret and enter your key. Save and select the environment.
| Variable | Value |
|---|---|
base_url | https://api.pdfrest.comOr EU: https://eu-api.pdfrest.com |
api_key | Your pdfRest API key, stored as a Bruno secret |
converted_pdf_id | Leave 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
- 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. - In Body, select Multipart Form. Add a row named
file, set its type to File, and use its file picker to choose your.docx. - Send the request. A successful synchronous response returns HTTP
200and JSON containingoutputUrl,outputId, andinputId. - Open the returned
outputUrlin your browser to retrieve the PDF. Check the converted document.
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
| Field | Type | Value |
|---|---|---|
file | File | Your PDF |
compression_level | Text | medium |
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.
Upload the Word document once. Pass the converted PDF’s resource ID to the next operation.
- Return to the successful response from 01 Convert Word to PDF. Copy its
outputId. - Paste that value into
converted_pdf_idin your selected Bruno environment and save. - 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.
- Send the request. Open the new
outputUrlto retrieve the compressed PDF.
| Field | Type | Value |
|---|---|---|
id | Text | {{converted_pdf_id}} |
compression_level | Text | medium |
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.
