REST APIFree tier

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.dev

All 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.

POSTPOST /generate/pdf

Generate a multi-page PDF document with headings, body text, tables, and image placeholders. Streamed directly — no temp file.

Parameters

ParameterTypeDefault
pagesinteger5
paper_sizestring"A4"
orientationstring"portrait"
include_tablebooleantrue
include_imagebooleantrue
fontstring"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.pdf

Success 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}
    }
  ]
}
POSTPOST /generate/docx

Generate a Word-compatible DOCX document with configurable heading depth, tables, and bulleted lists.

Parameters

ParameterTypeDefault
pagesinteger5
paper_sizestring"A4"
include_tablebooleantrue
include_listbooleantrue
heading_depthstring"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.docx

Success 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"
    }
  ]
}
POSTPOST /generate/xlsx

Generate an Excel workbook with Faker-populated data rows, optional formulas, and multiple sheets.

Parameters

ParameterTypeDefault
rowsinteger100
sheetsinteger2
schemastring"generic"
include_formulasbooleantrue
include_headerbooleantrue

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.xlsx

Success 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}
    }
  ]
}
POSTPOST /generate/pptx

Generate a PowerPoint presentation with a title slide and content slides containing headings, bullet points, and placeholder charts.

Parameters

ParameterTypeDefault
slidesinteger10
include_chartbooleantrue
theme_colorstring"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.pptx

Success 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.

POSTPOST /generate/jpg

Generate a JPEG image with a test-card overlay (format name, dimensions, file size). Optionally includes realistic EXIF metadata.

Parameters

ParameterTypeDefault
widthinteger1920
heightinteger1080
qualityinteger85
color_modestring"rgb"
include_exifbooleantrue

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.jpg

Success 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}
    }
  ]
}
POSTPOST /generate/png

Generate a PNG image with optional alpha channel (RGBA). Lossless compression, ideal for UI testing and transparency pipeline testing.

Parameters

ParameterTypeDefault
widthinteger1920
heightinteger1080
color_modestring"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.png

Success 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"
    }
  ]
}
POSTPOST /generate/webp

Generate a WebP image in lossy or lossless mode. Useful for testing modern image pipeline support.

Parameters

ParameterTypeDefault
widthinteger1920
heightinteger1080
qualityinteger85
losslessbooleanfalse

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.webp

Success 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}
    }
  ]
}
POSTPOST /generate/gif

Generate an animated GIF cycling through color blocks. Verifies animation decode handling in image processing pipelines.

Parameters

ParameterTypeDefault
widthinteger640
heightinteger480
framesinteger4
loopbooleantrue

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.gif

Success 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}
    }
  ]
}
POSTPOST /generate/svg

Generate an SVG vector file with geometric shapes, path elements, and a text label. Complexity controls path count.

Parameters

ParameterTypeDefault
widthinteger800
heightinteger600
complexitystring"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.svg

Success 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"
    }
  ]
}
POSTPOST /generate/tiff

Generate a TIFF image with configurable color space and compression. Useful for print/publishing pipeline and scanner software testing.

Parameters

ParameterTypeDefault
widthinteger1920
heightinteger1080
color_modestring"rgb"
compressionstring"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.tiff

Success 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"
    }
  ]
}
POSTPOST /generate/heic

Generate a HEIC image (High Efficiency Image Container), the default format for iPhone photos. Tests HEIC decode support in upload pipelines.

Parameters

ParameterTypeDefault
widthinteger1920
heightinteger1080
qualityinteger85

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.heic

Success 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.

POSTPOST /generate/mp4
POSTPOST /generate/mkv
POSTPOST /generate/mov
POSTPOST /generate/avi
POSTPOST /generate/webm

All 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)

ParameterTypeDefault
durationinteger30
resolutionstring"720p"
fpsinteger30
include_audiobooleantrue
audio_tonestring"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.mp4

Success 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.

POSTPOST /generate/mp3
POSTPOST /generate/wav
POSTPOST /generate/flac
POSTPOST /generate/aac

All 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)

ParameterTypeDefault
durationinteger30
sample_rateinteger44100
channelsstring"stereo"
tonestring"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.mp3

Success 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.

POSTPOST /generate/csv

Generate a CSV file with Faker-populated rows. Schema presets include contact, financial, e-commerce, and server log column sets.

Parameters

ParameterTypeDefault
rowsinteger100
schemastring"generic"
delimiterstring"comma"
encodingstring"utf-8"
include_headerbooleantrue

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.csv

Success 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}
    }
  ]
}
POSTPOST /generate/json

Generate a JSON array of records using the same Faker-backed schema presets as CSV. Nested structures add address sub-objects and tags arrays.

Parameters

ParameterTypeDefault
recordsinteger100
schemastring"generic"
structurestring"flat"
pretty_printbooleantrue

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.json

Success 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"
    }
  ]
}
POSTPOST /generate/xml

Generate an XML document with a configurable root element wrapping record elements. Same schema presets as CSV and JSON.

Parameters

ParameterTypeDefault
recordsinteger100
schemastring"generic"
root_elementstring"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.xml

Success 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}
    }
  ]
}
POSTPOST /generate/txt

Generate a plain text file. The server_log variant produces timestamped log lines useful for log parser and ingestion pipeline testing.

Parameters

ParameterTypeDefault
linesinteger500
variantstring"lorem"
encodingstring"utf-8"
line_endingsstring"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.txt

Success 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.

POSTPOST /generate/zip

Generate a ZIP archive containing a realistic mix of files (PDFs, CSVs, images, TXT). Not padding — actual content files drawn from the static library.

Parameters

ParameterTypeDefault
target_sizestring"1mb"
contentsstring"mixed"
compressionstring"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.zip

Success 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