Renamer API

AI Document Renaming with Custom Instructions

Tell the AI what you want in plain English. It reads document content, understands meaning, and applies your logic - things regex could never do.

  • Natural language instructions - not rigid patterns
  • Semantic extraction - reads vendors, amounts, dates from content
  • Conditional logic - "if amount > $10k, prefix HIGH-VALUE"
  • 20+ languages - reads German, outputs English filenames

Just need to rename a few files? Use the free web tool

Your instruction: "Read document in any language. Extract vendor, invoice number, amount. If amount > 10000 EUR, prefix HIGH-VALUE. Route to Invoices/Vendor/Year, add /priority if marked urgent."

Input

rechnung_scan_001.pdfGerman invoice

PDF containing: "Mueller GmbH... Rechnungsnummer: INV-98234... Gesamtbetrag: 12.450,00 EUR... DRINGEND"

AI Output

HIGH-VALUE_2025-01-15_Mueller-GmbH_INV-98234.pdf
Invoices/Mueller-GmbH/2025/priority/
HIGH-VALUE prefix (amount > 10k)/priority (DRINGEND = urgent)

Authentication

All API requests require authentication via Bearer token in the Authorization header.

API Token (recommended)

Generate API tokens from Settings → API Tokens. Tokens are prefixed with rt_ and provide full access to your account.

Authorization: Bearer rt_abc123def456...

OAuth 2.0

For apps that authenticate on behalf of users, use OAuth 2.0. After the OAuth flow completes, you receive an access token that works the same way:

Authorization: Bearer <oauth_access_token>

See API documentation for OAuth client registration and flow details.

Why AI instructions beat regex

Regex transforms filenames. AI reads documents and understands content.

Regex / pattern matching

Input:

scan_001.pdf

Pattern:

s/scan_(\\d+)/document_$1/

Output:

document_001.pdf

  • Cannot read document content
  • Cannot extract vendor, amount, date
  • Cannot apply conditional logic
  • Cannot understand multiple languages
AI with custom instructions

Input:

scan_001.pdf

(German invoice, 12,450 EUR)

Instruction:

"Extract vendor + amount, prefix HIGH-VALUE if >10k"

Output:

HIGH-VALUE_2025-01-15_Mueller-GmbH_INV-98234.pdf

  • Reads and understands document content
  • Extracts entities: vendors, amounts, dates, IDs
  • Applies conditional logic from natural language
  • Works with 20+ languages, outputs in your choice

Quickstart

Two endpoints: upload a file directly, or pass a URL and we'll fetch it. Use strategy=follow_custom_prompt with customTemplate to give the AI your instructions.

POST /api/v1/rename - multipart file upload

Shell
curl -X POST https://www.renamed.to/api/v1/rename \  -H "Authorization: Bearer YOUR_API_TOKEN" \  -F "file=@invoice.pdf" \  -F "strategy=follow_custom_prompt" \  -F "templateMode=custom" \  -F 'customTemplate=Extract vendor name and invoice number.If total amount exceeds $10,000, prefix with HIGH-VALUE_.Format: [prefix]YYYY-MM-DD_VendorName_INV-Number' \  -F "language=en"

POST /api/v1/rename-from-url - JSON body, server fetches the file

Shell
curl -X POST https://www.renamed.to/api/v1/rename-from-url \  -H "Authorization: Bearer YOUR_API_TOKEN" \  -H "Content-Type: application/json" \  -d '{    "url": "https://example.com/document.pdf",    "strategy": "follow_custom_prompt",    "templateMode": "custom",    "customTemplate": "Identify document type (contract/invoice/receipt).\nFor contracts include parties and effective date.\nFor invoices include vendor and amount.",    "language": "en"  }'

SDKs

Use our official SDKs for a better developer experience with type safety and error handling.

TypeScript SDK

TypeScript
import { RenamedClient } from '@renamed/sdk'const client = new RenamedClient({ apiKey: process.env.RENAMED_API_KEY })// AI reads the German invoice, understands it, creates English filenameconst result = await client.rename('./rechnung_001.pdf', {  strategy: 'follow_custom_prompt',  templateMode: 'custom',  customTemplate: `Read document in any language, output English filename.Extract: vendor, invoice number, total amount.If amount > 10000 EUR, prefix with HIGH-VALUE_`,  language: 'en'})console.log(result.suggestedFilename)// => "HIGH-VALUE_2025-01-15_Mueller-GmbH_INV-98234.pdf"console.log(result.folderPath)// => "Invoices/Mueller-GmbH/2025"

Response

JSON
{  "originalFilename": "rechnung_001.pdf",  "suggestedFilename": "HIGH-VALUE_2025-01-15_Mueller-GmbH_INV-98234.pdf",  "extractedInfo": {    "date": "2025-01-15",    "issuer": "Mueller GmbH",    "invoice_number": "INV-98234",    "document_type": "invoice"  },  "folderPath": "Invoices/Mueller-GmbH/2025",  "organizationStrategy": "follow_custom_prompt",  "templateUsed": "custom"}

SDKs on GitHub: github.com/renamed-to/renamed-sdk

API Parameters

Key parameters for controlling the AI's behavior.

ParameterValuesDescription
strategyfollow_custom_prompt
by_date, by_issuer, by_type
by_date_issuer, by_date_type
by_issuer_type, by_all, root
Use follow_custom_prompt for AI instructions via customTemplate
templateModeauto, predefined, customSet to custom when using customTemplate
customTemplatestringNatural language instructions for the AI
languageauto, source, en, de, fr, es
it, pt, pt-BR, nl, pl, sv
no, da, fi, cs, tr, zh-Hans
zh-Hant, ja, ko, ar, hi, id
Output filename language. auto detects, source uses document language

What your instructions can do

The AI interprets natural language and applies complex logic that would require custom code to build yourself.

Custom extraction + conditional logic
"Extract vendor name and invoice number. If total amount is over $10,000, prefix with HIGH-VALUE_. Format: [prefix]YYYY-MM-DD_VendorName_INV-Number"
Document type detection
"Identify document type (contract, invoice, receipt, statement). For contracts, include parties and effective date. For invoices, include vendor and amount."
Smart folder routing
Use predefined strategies like by_date_issuer or by_all to organize files into folder hierarchies based on extracted data.
Multilingual understanding
"Read document in any language. Extract key info. Output filename in English."
Relationship detection
"If this appears to be a response or amendment to another document, include RE_ or AMD_ prefix and reference the original document number if mentioned"

Built for production

Limits

  • File size: 25MB max
  • Formats: PDF only
  • Rate limit: 10,000/day per user
  • Response time: 3-10 seconds typical

Common errors

  • 401 Invalid or missing API key
  • 402 Insufficient credits
  • 413 File too large (over 25MB)
  • 415 Unsupported file type (must be PDF)
  • 429 Rate limited (check Retry-After header)

Security: All requests over TLS. The /rename-from-url endpoint blocks localhost and private IP ranges.

Pricing

50 free credits on signup. Then $9 per 1,000 documents ($0.009/file).

  • 1 credit = 1 rename
  • Credits valid for 12 months
  • 30-day money-back guarantee
View pricing details

Getting started

Three steps to integrate the Renamer API into your workflow.

1

Try in the API Playground

Test your instructions interactively before writing code.

2

Get your API token

Generate an API token from your dashboard. You get 50 free credits on signup.

3

Integrate

Use our SDK or call the REST API directly from your application.

FAQ

How is this different from regex-based renaming?
Regex operates on existing filenames. This API reads document content and understands meaning. It can extract vendor names from letterheads, detect document types, apply conditional logic based on amounts, and route files intelligently - tasks impossible with pattern matching.
What can I put in customTemplate instructions?
Natural language instructions describing what you want. Examples: "Extract vendor and invoice number, prefix HIGH-VALUE if over $10k", "Detect document type and include parties involved for contracts", "Read any language, output English filename with topic and date".
What file formats are supported?
PDF files up to 25MB. The AI understands content in 20+ languages.
How accurate is the AI understanding?
95%+ accuracy on standard business documents. The AI reads and comprehends document structure, extracts entities (names, dates, amounts, IDs), and applies your instructions contextually.
What are the rate limits?
10,000 renames per 24 hours per user. If exceeded, the API returns 429 with Retry-After and X-RateLimit headers.
How does pricing work?
50 free credits on signup. Then $9 per 1,000 documents ($0.009/file). 1 credit = 1 rename. Credits are valid for 12 months. 30-day money-back guarantee.