Developer API
Reliable file conversion in a single HTTP call. Every format pair Filum supports is available via the API. Same engine, same fidelity, same 60-minute deletion guarantee.
https://filum.se/api/v1Quick Start
All requests are multipart/form-data POST requests. Include your API key in the Authorization header and the file as the file field. The response is the same structure on every endpoint.
const form = new FormData();
form.append('file', fileInput.files[0]);
form.append('output_format', 'pdf');
const response = await fetch('https://filum.se/api/v1/convert', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
},
body: form,
});
const result = await response.json();
if (result.success) {
const { download_url, expires_at } = result.data;
// download_url is a signed URL valid until expires_at
window.location.assign(download_url);
} else {
throw new Error(result.error.human_readable_message);
}import requests
with open('document.docx', 'rb') as f:
response = requests.post(
'https://filum.se/api/v1/convert',
headers={'Authorization': 'Bearer YOUR_API_KEY'},
files={'file': ('document.docx', f, 'application/octet-stream')},
data={'output_format': 'pdf'},
)
result = response.json()
if result['success']:
print('Download:', result['data']['download_url'])
print('Expires:', result['data']['expires_at'])
else:
print('Error:', result['error']['human_readable_message'])<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => 'https://filum.se/api/v1/convert',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY'],
CURLOPT_POSTFIELDS => [
'file' => new CURLFile('/path/to/document.docx'),
'output_format' => 'pdf',
],
]);
$response = curl_exec($curl);
curl_close($curl);
$result = json_decode($response, true);
if ($result['success']) {
echo 'Download: ' . $result['data']['download_url'];
} else {
echo 'Error: ' . $result['error']['human_readable_message'];
}package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"mime/multipart"
"net/http"
"os"
"path/filepath"
)
func main() {
f, err := os.Open("document.docx")
if err != nil {
panic(err)
}
defer f.Close()
var body bytes.Buffer
w := multipart.NewWriter(&body)
fw, _ := w.CreateFormFile("file", filepath.Base(f.Name()))
io.Copy(fw, f)
w.WriteField("output_format", "pdf")
w.Close()
req, _ := http.NewRequest("POST", "https://filum.se/api/v1/convert", &body)
req.Header.Set("Authorization", "Bearer YOUR_API_KEY")
req.Header.Set("Content-Type", w.FormDataContentType())
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
var result map[string]any
json.NewDecoder(resp.Body).Decode(&result)
if result["success"] == true {
data := result["data"].(map[string]any)
fmt.Printf("Download: %s\n", data["download_url"])
}
}curl -X POST https://filum.se/api/v1/convert \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@document.docx" \
-F "output_format=pdf"Authentication
Every request requires an API key passed as a Bearer token. API keys are created and revoked in your account settings. A revoked key stops working immediately with no grace period.
Authorization: Bearer YOUR_API_KEYPlayground
Sends a real conversion request with no quota consumed. The playground bypasses rate limiting via an internal header. Production calls require an API key and return the full JSON response shown below.
API Reference
/v1/convertConvert a file to another format. Returns the converted file with metadata headers. All request fields are sent as multipart/form-data.
Request fields
| Field | Type | Required | Description |
|---|---|---|---|
| file | File | Yes | The file to convert. Maximum 25 MB on free tier, 100 MB on Pro. |
| output_format | string | Yes | Target format. One of: pdf docx xlsx pptx txt png jpg webp |
Response headers
| Header | Value |
|---|---|
| X-Processing-Time-Ms | Conversion duration in milliseconds |
| X-Engine-Version | Gotenberg version used for conversion |
| X-File-Size-In | Input file size in bytes |
| X-RateLimit-Limit | Your tier's hourly conversion limit |
| X-RateLimit-Remaining | Conversions remaining in current window |
| X-RateLimit-Reset | Unix timestamp when the current window resets |
Supported Formats
| Input | Output |
|---|---|
| DOCX, DOC, RTF, ODT | |
| XLSX, XLS, ODS, CSV | |
| PPTX, PPT, ODP | |
| DOCX | |
| XLSX | |
| PPTX | |
| TXT | |
| PNG, JPG | |
| PNG, JPG, WEBP |
Rate Limits
Rate limits are applied per API key on a sliding hourly window. Every response includes X-RateLimit-* headers so you can track consumption without a separate call. Requests exceeding the limit receive a 429 with a rate_limit_exceeded error code and the exact reset timestamp.
| Tier | Limit | X-RateLimit-Limit header |
|---|---|---|
| Free | 10 / hour | 10 |
| Pro | 1,000 / hour | 1000 |
| Teams | 10,000 / hour | 10000 |
Error Codes
Every error response follows the same structure. The code field is machine-readable and stable across API versions. human_readable_message is safe to surface directly to end users.
| HTTP | code | Description | Recovery |
|---|---|---|---|
| 400 | missing_file | No file included in request. | Add a 'file' field to your multipart/form-data body. |
| 400 | invalid_request | Request body is not multipart/form-data. | Set Content-Type: multipart/form-data. |
| 400 | invalid_output_format | output_format is missing or not a supported value. | Use one of: pdf, docx, xlsx, pptx, txt, png, jpg, webp. |
| 429 | rate_limit_exceeded | Hourly conversion limit reached. | Wait for the window to reset or upgrade to a higher tier. |
| 422 | conversion_error | File could not be converted. | Verify the file is not corrupted and the format pair is supported. |
| 502 | service_unreachable | Conversion service could not be reached. | Retry with exponential backoff. Check status.filum.se. |
| 503 | service_unavailable | Conversion service is temporarily unavailable. | Retry after a short delay. Check status.filum.se. |
SDKs
Official JavaScript and Python SDKs are available. Both follow semver and are tested against the API on every deployment.
JavaScript / TypeScript
npm install @filum/sdkNode.js 18+ and browser
Python
pip install filumPython 3.9+
SDK documentation and source code are linked from your account settings.