Get Test Files API
All 25 file generators are available as a REST API. POST a JSON body, receive a streaming file response. No signup required. Rate limited to 20 requests/day per IP on the free tier.
Base URL
https://gettestfiles-api.fly.devAll endpoints are prefixed with this base URL.
Authentication
No API key required for the free tier.
The free tier requires no authentication. Requests are rate-limited by hashed IP address. Simply send a POST request with a JSON body — no Authorization header needed.
Auth required
None
Rate limit
20 req / day
Reset
Midnight UTC
Rate limit exceeded (429)
HTTP/2 429
Content-Type: application/json
{
"detail": "Rate limit exceeded. 20 requests per day per IP. Resets at midnight UTC.",
"retry_after": "2026-05-21T00:00:00Z"
}📄 Documents
PDF, DOCX, XLSX, and PPTX generators.
POST /generate/pdfGenerate a multi-page PDF document with headings, body text, tables, and image placeholders. Streamed directly — no temp file.
Parameters
| Parameter | Type | Default |
|---|---|---|
| pages | integer | 5 |
| paper_size | string | "A4" |
| orientation | string | "portrait" |
| include_table | boolean | true |
| include_image | boolean | true |
| font | string | "Helvetica" |
Example request
curl -X POST https://gettestfiles-api.fly.dev/generate/pdf \
-H "Content-Type: application/json" \
-d '{"pages": 10, "paper_size": "A4", "orientation": "portrait"}' \
--output document.pdfSuccess response headers
HTTP/2 200 Content-Type: application/pdf Content-Disposition: attachment; filename="TestFile-pdf-custom.pdf" X-Generated-In: 284ms
Validation error (422)
HTTP/2 422
Content-Type: application/json
{
"detail": [
{
"loc": ["body", "pages"],
"msg": "ensure this value is less than or equal to 500",
"type": "value_error.number.not_le",
"ctx": {"limit_value": 500}
}
]
}POST /generate/docxGenerate a Word-compatible DOCX document with configurable heading depth, tables, and bulleted lists.
Parameters
| Parameter | Type | Default |
|---|---|---|
| pages | integer | 5 |
| paper_size | string | "A4" |
| include_table | boolean | true |
| include_list | boolean | true |
| heading_depth | string | "h1_h2" |
Example request
curl -X POST https://gettestfiles-api.fly.dev/generate/docx \
-H "Content-Type: application/json" \
-d '{"pages": 5, "heading_depth": "h1_h2_h3", "include_table": true}' \
--output document.docxSuccess response headers
HTTP/2 200 Content-Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document Content-Disposition: attachment; filename="TestFile-docx-custom.docx" X-Generated-In: 190ms
Validation error (422)
HTTP/2 422
Content-Type: application/json
{
"detail": [
{
"loc": ["body", "heading_depth"],
"msg": "value is not a valid enumeration member; permitted: 'h1', 'h1_h2', 'h1_h2_h3'",
"type": "type_error.enum"
}
]
}POST /generate/xlsxGenerate an Excel workbook with Faker-populated data rows, optional formulas, and multiple sheets.
Parameters
| Parameter | Type | Default |
|---|---|---|
| rows | integer | 100 |
| sheets | integer | 2 |
| schema | string | "generic" |
| include_formulas | boolean | true |
| include_header | boolean | true |
Example request
curl -X POST https://gettestfiles-api.fly.dev/generate/xlsx \
-H "Content-Type: application/json" \
-d '{"rows": 5000, "schema": "financial", "include_formulas": true}' \
--output data.xlsxSuccess response headers
HTTP/2 200 Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet Content-Disposition: attachment; filename="TestFile-xlsx-custom.xlsx" X-Generated-In: 430ms
Validation error (422)
HTTP/2 422
Content-Type: application/json
{
"detail": [
{
"loc": ["body", "rows"],
"msg": "ensure this value is less than or equal to 100000",
"type": "value_error.number.not_le",
"ctx": {"limit_value": 100000}
}
]
}POST /generate/pptxGenerate a PowerPoint presentation with a title slide and content slides containing headings, bullet points, and placeholder charts.
Parameters
| Parameter | Type | Default |
|---|---|---|
| slides | integer | 10 |
| include_chart | boolean | true |
| theme_color | string | "neutral" |
Example request
curl -X POST https://gettestfiles-api.fly.dev/generate/pptx \
-H "Content-Type: application/json" \
-d '{"slides": 20, "theme_color": "blue", "include_chart": true}' \
--output presentation.pptxSuccess response headers
HTTP/2 200 Content-Type: application/vnd.openxmlformats-officedocument.presentationml.presentation Content-Disposition: attachment; filename="TestFile-pptx-custom.pptx" X-Generated-In: 610ms
Validation error (422)
HTTP/2 422
Content-Type: application/json
{
"detail": [
{
"loc": ["body", "slides"],
"msg": "ensure this value is greater than or equal to 2",
"type": "value_error.number.not_ge",
"ctx": {"limit_value": 2}
}
]
}🖼️ Images
JPG, PNG, WEBP, GIF, SVG, TIFF, and HEIC generators.
POST /generate/jpgGenerate a JPEG image with a test-card overlay (format name, dimensions, file size). Optionally includes realistic EXIF metadata.
Parameters
| Parameter | Type | Default |
|---|---|---|
| width | integer | 1920 |
| height | integer | 1080 |
| quality | integer | 85 |
| color_mode | string | "rgb" |
| include_exif | boolean | true |
Example request
curl -X POST https://gettestfiles-api.fly.dev/generate/jpg \
-H "Content-Type: application/json" \
-d '{"width": 3840, "height": 2160, "quality": 90, "include_exif": true}' \
--output image.jpgSuccess response headers
HTTP/2 200 Content-Type: image/jpeg Content-Disposition: attachment; filename="TestFile-jpg-custom.jpg" X-Generated-In: 95ms
Validation error (422)
HTTP/2 422
Content-Type: application/json
{
"detail": [
{
"loc": ["body", "width"],
"msg": "ensure this value is less than or equal to 8000",
"type": "value_error.number.not_le",
"ctx": {"limit_value": 8000}
}
]
}POST /generate/pngGenerate a PNG image with optional alpha channel (RGBA). Lossless compression, ideal for UI testing and transparency pipeline testing.
Parameters
| Parameter | Type | Default |
|---|---|---|
| width | integer | 1920 |
| height | integer | 1080 |
| color_mode | string | "rgb" |
Example request
curl -X POST https://gettestfiles-api.fly.dev/generate/png \
-H "Content-Type: application/json" \
-d '{"width": 1920, "height": 1080, "color_mode": "rgba"}' \
--output image.pngSuccess response headers
HTTP/2 200 Content-Type: image/png Content-Disposition: attachment; filename="TestFile-png-custom.png" X-Generated-In: 78ms
Validation error (422)
HTTP/2 422
Content-Type: application/json
{
"detail": [
{
"loc": ["body", "color_mode"],
"msg": "value is not a valid enumeration member; permitted: 'rgb', 'rgba', 'grayscale'",
"type": "type_error.enum"
}
]
}POST /generate/webpGenerate a WebP image in lossy or lossless mode. Useful for testing modern image pipeline support.
Parameters
| Parameter | Type | Default |
|---|---|---|
| width | integer | 1920 |
| height | integer | 1080 |
| quality | integer | 85 |
| lossless | boolean | false |
Example request
curl -X POST https://gettestfiles-api.fly.dev/generate/webp \
-H "Content-Type: application/json" \
-d '{"width": 1280, "height": 720, "lossless": true}' \
--output image.webpSuccess response headers
HTTP/2 200 Content-Type: image/webp Content-Disposition: attachment; filename="TestFile-webp-custom.webp" X-Generated-In: 62ms
Validation error (422)
HTTP/2 422
Content-Type: application/json
{
"detail": [
{
"loc": ["body", "quality"],
"msg": "ensure this value is greater than or equal to 10",
"type": "value_error.number.not_ge",
"ctx": {"limit_value": 10}
}
]
}POST /generate/gifGenerate an animated GIF cycling through color blocks. Verifies animation decode handling in image processing pipelines.
Parameters
| Parameter | Type | Default |
|---|---|---|
| width | integer | 640 |
| height | integer | 480 |
| frames | integer | 4 |
| loop | boolean | true |
Example request
curl -X POST https://gettestfiles-api.fly.dev/generate/gif \
-H "Content-Type: application/json" \
-d '{"width": 640, "height": 480, "frames": 8, "loop": true}' \
--output animation.gifSuccess response headers
HTTP/2 200 Content-Type: image/gif Content-Disposition: attachment; filename="TestFile-gif-custom.gif" X-Generated-In: 44ms
Validation error (422)
HTTP/2 422
Content-Type: application/json
{
"detail": [
{
"loc": ["body", "frames"],
"msg": "ensure this value is less than or equal to 20",
"type": "value_error.number.not_le",
"ctx": {"limit_value": 20}
}
]
}POST /generate/svgGenerate an SVG vector file with geometric shapes, path elements, and a text label. Complexity controls path count.
Parameters
| Parameter | Type | Default |
|---|---|---|
| width | integer | 800 |
| height | integer | 600 |
| complexity | string | "medium" |
Example request
curl -X POST https://gettestfiles-api.fly.dev/generate/svg \
-H "Content-Type: application/json" \
-d '{"width": 1200, "height": 800, "complexity": "complex"}' \
--output graphic.svgSuccess response headers
HTTP/2 200 Content-Type: image/svg+xml Content-Disposition: attachment; filename="TestFile-svg-custom.svg" X-Generated-In: 18ms
Validation error (422)
HTTP/2 422
Content-Type: application/json
{
"detail": [
{
"loc": ["body", "complexity"],
"msg": "value is not a valid enumeration member; permitted: 'simple', 'medium', 'complex'",
"type": "type_error.enum"
}
]
}POST /generate/tiffGenerate a TIFF image with configurable color space and compression. Useful for print/publishing pipeline and scanner software testing.
Parameters
| Parameter | Type | Default |
|---|---|---|
| width | integer | 1920 |
| height | integer | 1080 |
| color_mode | string | "rgb" |
| compression | string | "lzw" |
Example request
curl -X POST https://gettestfiles-api.fly.dev/generate/tiff \
-H "Content-Type: application/json" \
-d '{"width": 2480, "height": 3508, "color_mode": "cmyk", "compression": "lzw"}' \
--output image.tiffSuccess response headers
HTTP/2 200 Content-Type: image/tiff Content-Disposition: attachment; filename="TestFile-tiff-custom.tiff" X-Generated-In: 140ms
Validation error (422)
HTTP/2 422
Content-Type: application/json
{
"detail": [
{
"loc": ["body", "color_mode"],
"msg": "value is not a valid enumeration member; permitted: 'rgb', 'grayscale', 'cmyk'",
"type": "type_error.enum"
}
]
}POST /generate/heicGenerate a HEIC image (High Efficiency Image Container), the default format for iPhone photos. Tests HEIC decode support in upload pipelines.
Parameters
| Parameter | Type | Default |
|---|---|---|
| width | integer | 1920 |
| height | integer | 1080 |
| quality | integer | 85 |
Example request
curl -X POST https://gettestfiles-api.fly.dev/generate/heic \
-H "Content-Type: application/json" \
-d '{"width": 4032, "height": 3024, "quality": 85}' \
--output photo.heicSuccess response headers
HTTP/2 200 Content-Type: image/heic Content-Disposition: attachment; filename="TestFile-heic-custom.heic" X-Generated-In: 210ms
Validation error (422)
HTTP/2 422
Content-Type: application/json
{
"detail": [
{
"loc": ["body", "width"],
"msg": "ensure this value is less than or equal to 4000",
"type": "value_error.number.not_le",
"ctx": {"limit_value": 4000}
}
]
}🎬 Video
MP4, MKV, MOV, AVI, and WEBM generators — all share the same parameter set.
POST /generate/mp4POST /generate/mkvPOST /generate/movPOST /generate/aviPOST /generate/webmAll video endpoints generate SMPTE-style colour bars with a text overlay (format, resolution, duration, codec) and a 440 Hz sine audio track. Generated via ffmpeg. Duration controls file size — longer duration = larger file.
Parameters (all video formats)
| Parameter | Type | Default |
|---|---|---|
| duration | integer | 30 |
| resolution | string | "720p" |
| fps | integer | 30 |
| include_audio | boolean | true |
| audio_tone | string | "440hz" |
Example request
curl -X POST https://gettestfiles-api.fly.dev/generate/mp4 \
-H "Content-Type: application/json" \
-d '{"duration": 60, "resolution": "1080p", "fps": 30, "include_audio": true}' \
--output video.mp4Success response headers
HTTP/2 200 Content-Type: video/mp4 Content-Disposition: attachment; filename="TestFile-mp4-custom.mp4" X-Generated-In: 4230ms
Validation error (422)
HTTP/2 422
Content-Type: application/json
{
"detail": [
{
"loc": ["body", "duration"],
"msg": "ensure this value is less than or equal to 600",
"type": "value_error.number.not_le",
"ctx": {"limit_value": 600}
}
]
}⏱ Generation time: Video files are generated synchronously via ffmpeg. Expect 2–15 seconds depending on duration and resolution. 4K at 60 fps is intentionally not supported to keep response times reasonable on the free tier.
🎵 Audio
MP3, WAV, FLAC, and AAC generators — all share the same parameter set.
POST /generate/mp3POST /generate/wavPOST /generate/flacPOST /generate/aacAll audio endpoints generate a sine tone (440 Hz by default), frequency sweep, white noise, or silence. Standard tags are embedded: Title = "Get Test Files Test Audio", Artist = "GetTestFiles.com". Generated via ffmpeg.
Parameters (all audio formats)
| Parameter | Type | Default |
|---|---|---|
| duration | integer | 30 |
| sample_rate | integer | 44100 |
| channels | string | "stereo" |
| tone | string | "440hz" |
Example request
curl -X POST https://gettestfiles-api.fly.dev/generate/mp3 \
-H "Content-Type: application/json" \
-d '{"duration": 120, "sample_rate": 44100, "channels": "stereo", "tone": "sweep"}' \
--output audio.mp3Success response headers
HTTP/2 200 Content-Type: audio/mpeg Content-Disposition: attachment; filename="TestFile-mp3-custom.mp3" X-Generated-In: 890ms
Validation error (422)
HTTP/2 422
Content-Type: application/json
{
"detail": [
{
"loc": ["body", "duration"],
"msg": "ensure this value is less than or equal to 3600",
"type": "value_error.number.not_le",
"ctx": {"limit_value": 3600}
}
]
}📊 Data
CSV, JSON, XML, and TXT generators.
POST /generate/csvGenerate a CSV file with Faker-populated rows. Schema presets include contact, financial, e-commerce, and server log column sets.
Parameters
| Parameter | Type | Default |
|---|---|---|
| rows | integer | 100 |
| schema | string | "generic" |
| delimiter | string | "comma" |
| encoding | string | "utf-8" |
| include_header | boolean | true |
Example request
curl -X POST https://gettestfiles-api.fly.dev/generate/csv \
-H "Content-Type: application/json" \
-d '{
"rows": 10000,
"schema": "contact",
"delimiter": "comma",
"encoding": "utf-8",
"include_header": true
}' \
--output data.csvSuccess response headers
HTTP/2 200 Content-Type: text/csv; charset=utf-8 Content-Disposition: attachment; filename="TestFile-csv-custom.csv" X-Generated-In: 312ms
Validation error (422)
HTTP/2 422
Content-Type: application/json
{
"detail": [
{
"loc": ["body", "rows"],
"msg": "ensure this value is less than or equal to 500000",
"type": "value_error.number.not_le",
"ctx": {"limit_value": 500000}
}
]
}POST /generate/jsonGenerate a JSON array of records using the same Faker-backed schema presets as CSV. Nested structures add address sub-objects and tags arrays.
Parameters
| Parameter | Type | Default |
|---|---|---|
| records | integer | 100 |
| schema | string | "generic" |
| structure | string | "flat" |
| pretty_print | boolean | true |
Example request
curl -X POST https://gettestfiles-api.fly.dev/generate/json \
-H "Content-Type: application/json" \
-d '{"records": 500, "schema": "ecommerce", "structure": "nested_1", "pretty_print": false}' \
--output data.jsonSuccess response headers
HTTP/2 200 Content-Type: application/json; charset=utf-8 Content-Disposition: attachment; filename="TestFile-json-custom.json" X-Generated-In: 198ms
Validation error (422)
HTTP/2 422
Content-Type: application/json
{
"detail": [
{
"loc": ["body", "structure"],
"msg": "value is not a valid enumeration member; permitted: 'flat', 'nested_1', 'nested_2'",
"type": "type_error.enum"
}
]
}POST /generate/xmlGenerate an XML document with a configurable root element wrapping record elements. Same schema presets as CSV and JSON.
Parameters
| Parameter | Type | Default |
|---|---|---|
| records | integer | 100 |
| schema | string | "generic" |
| root_element | string | "records" |
Example request
curl -X POST https://gettestfiles-api.fly.dev/generate/xml \
-H "Content-Type: application/json" \
-d '{"records": 1000, "schema": "contact", "root_element": "contacts"}' \
--output data.xmlSuccess response headers
HTTP/2 200 Content-Type: application/xml; charset=utf-8 Content-Disposition: attachment; filename="TestFile-xml-custom.xml" X-Generated-In: 220ms
Validation error (422)
HTTP/2 422
Content-Type: application/json
{
"detail": [
{
"loc": ["body", "records"],
"msg": "ensure this value is less than or equal to 100000",
"type": "value_error.number.not_le",
"ctx": {"limit_value": 100000}
}
]
}POST /generate/txtGenerate a plain text file. The server_log variant produces timestamped log lines useful for log parser and ingestion pipeline testing.
Parameters
| Parameter | Type | Default |
|---|---|---|
| lines | integer | 500 |
| variant | string | "lorem" |
| encoding | string | "utf-8" |
| line_endings | string | "lf" |
Example request
curl -X POST https://gettestfiles-api.fly.dev/generate/txt \
-H "Content-Type: application/json" \
-d '{"lines": 50000, "variant": "server_log", "encoding": "utf-8", "line_endings": "lf"}' \
--output logfile.txtSuccess response headers
HTTP/2 200 Content-Type: text/plain; charset=utf-8 Content-Disposition: attachment; filename="TestFile-txt-custom.txt" X-Generated-In: 145ms
Validation error (422)
HTTP/2 422
Content-Type: application/json
{
"detail": [
{
"loc": ["body", "variant"],
"msg": "value is not a valid enumeration member; permitted: 'lorem', 'server_log', 'chat_log'",
"type": "type_error.enum"
}
]
}📦 Archives
ZIP generator.
POST /generate/zipGenerate a ZIP archive containing a realistic mix of files (PDFs, CSVs, images, TXT). Not padding — actual content files drawn from the static library.
Parameters
| Parameter | Type | Default |
|---|---|---|
| target_size | string | "1mb" |
| contents | string | "mixed" |
| compression | string | "fast" |
Example request
curl -X POST https://gettestfiles-api.fly.dev/generate/zip \
-H "Content-Type: application/json" \
-d '{"target_size": "10mb", "contents": "mixed", "compression": "fast"}' \
--output archive.zipSuccess response headers
HTTP/2 200 Content-Type: application/zip Content-Disposition: attachment; filename="TestFile-zip-custom.zip" X-Generated-In: 520ms
Validation error (422)
HTTP/2 422
Content-Type: application/json
{
"detail": [
{
"loc": ["body", "target_size"],
"msg": "value is not a valid enumeration member; permitted: '100kb', '1mb', '5mb', '10mb', '50mb'",
"type": "type_error.enum"
}
]
}Rate Limiting
Rate limiting is enforced per IP address using a Redis counter. The limit is 20 requests per day, resetting at midnight UTC. No account or API key is involved — it is purely IP-based.
Every response includes rate limit headers so you can track your remaining budget:
HTTP/2 200 X-RateLimit-Limit: 20 X-RateLimit-Remaining: 14 X-RateLimit-Reset: 1748217600 # Unix timestamp of next reset (midnight UTC)
If you exceed the limit, you receive a 429 Too Many Requests response:
HTTP/2 429
Content-Type: application/json
Retry-After: 36000
{
"detail": "Rate limit exceeded. 20 requests per day per IP. Resets at midnight UTC.",
"retry_after": "2026-05-21T00:00:00Z"
}ℹ Need more requests? API keys with higher daily limits are planned for a future paid tier. See Coming Soon below.
Code Examples
Using the CSV generator as the example format.
Python (requests)
import requests
response = requests.post(
"https://gettestfiles-api.fly.dev/generate/csv",
json={
"rows": 1000,
"schema": "contact",
"delimiter": "comma",
"encoding": "utf-8",
"include_header": True,
},
timeout=30,
)
response.raise_for_status() # raises on 4xx/5xx
with open("test.csv", "wb") as f:
f.write(response.content)
print(f"Downloaded {len(response.content):,} bytes")
print(f"Generated in: {response.headers.get('X-Generated-In')}")JavaScript / TypeScript (fetch)
const response = await fetch("https://gettestfiles-api.fly.dev/generate/csv", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
rows: 1000,
schema: "contact",
delimiter: "comma",
encoding: "utf-8",
include_header: true,
}),
});
if (!response.ok) {
const err = await response.json();
throw new Error(`HTTP ${response.status}: ${JSON.stringify(err)}`);
}
// Save as file in the browser
const blob = await response.blob();
const url = URL.createObjectURL(blob);
const a = document.createElement("a");
a.href = url;
a.download = "test.csv";
a.click();
URL.revokeObjectURL(url);Node.js (native fetch, v18+)
import { writeFile } from "fs/promises";
const res = await fetch("https://gettestfiles-api.fly.dev/generate/csv", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ rows: 5000, schema: "financial" }),
});
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const buffer = Buffer.from(await res.arrayBuffer());
await writeFile("financial-data.csv", buffer);
console.log(`Wrote ${buffer.length.toLocaleString()} bytes`);API keys and higher rate limits — coming soon
The free tier (20 req/day, no auth) is live now. A paid tier with API keys, 500–5,000 requests/day, priority generation, and usage analytics is planned for a future update.
Free
$0
20 req / day
Live now
Pro
$9 / mo
500 req / day
Coming soon
Team
$29 / mo
5,000 req / day
Coming soon