Converting file...
Converting file...
Converting file...
Securely sync documents across all your devices.
/api/convertConverts input to Markdown or another target format. Optionally add save: true to automatically save the result to your account.
curl -X POST https://slim-down.nl/api/convert \
-H "Authorization: Bearer <JOUW_API_SLEUTEL>" \
-H "Content-Type: application/json" \
-d '{
"input": "Product,Prijs\nLaptop,999",
"source_format": "csv",
"target_format": "markdown"
}'/api/convert-fileUpload PDF, Word, or Excel files via multipart form-data for direct conversion to Markdown or CSV.
curl -X POST https://slim-down.nl/api/convert-file \
-H "X-API-Key: <JOUW_API_SLEUTEL>" \
-F "file=@document.docx"/api/documentsRetrieves all your saved documents in JSON format for sync across apps and devices.
curl -X GET https://slim-down.nl/api/documents \
-H "Authorization: Bearer <JOUW_API_SLEUTEL>"/api/auth/meChecks if your API key is valid and returns user profile information.
curl -X GET https://slim-down.nl/api/auth/me \
-H "Authorization: Bearer <JOUW_API_SLEUTEL>"Convert documents or raw data via slim-down to compact Markdown before sending them as context to an LLM to save tokens and costs.
Give Claude the skill/tool to automatically call the slim-down API when it needs to simplify a document, table, or JSON/HTML:
import requests
from anthropic import Anthropic
SLIM_DOWN_KEY = "JOUW_SLIM_DOWN_API_SLEUTEL"
SLIM_DOWN_URL = "https://slim-down.nl/api/convert"
# 1. Definieer de slim-down Skill / Tool voor Claude
tools = [
{
"name": "slim_down_convert",
"description": "Converteert HTML, JSON, YAML, CSV, Word of platte tekst naar compacte Markdown om tokens te besparen.",
"input_schema": {
"type": "object",
"properties": {
"content": {
"type": "string",
"description": "De ruwe tekst, html, json, yaml of csv content"
},
"target_format": {
"type": "string",
"enum": ["markdown", "json", "yaml", "csv", "excel", "text"],
"default": "markdown"
}
},
"required": ["content"]
}
}
]
# 2. Tool handler functie
def run_slim_down_tool(content: str, target_format: str = "markdown") -> str:
resp = requests.post(
SLIM_DOWN_URL,
headers={"Authorization": f"Bearer {SLIM_DOWN_KEY}"},
json={"input": content, "target_format": target_format}
)
return resp.json().get("result", "")
# 3. Claude aanroepen met de tool
client = Anthropic()
response = client.messages.create(
model="claude-3-7-sonnet-20250219",
max_tokens=1024,
tools=tools,
messages=[
{
"role": "user",
"content": "Kun je deze HTML tabel versimpelen naar Markdown?\n<table><tr><th>Naam</th><th>Score</th></tr><tr><td>Alex</td><td>95</td></tr></table>"
}
]
)
print("Tool calls:", response.content)Use this prompt in your Claude Project Custom Instructions, System Prompt, or .cursorrules:
### SYSTEM PROMPT / AI INSTRUCTION:
You have access to the slim-down conversion API at https://slim-down.nl.
When the user asks to analyze large HTML pages, Word files (.docx), Excel sheets (.xlsx), JSON data, or CSV:
1. Use the slim-down API endpoint (POST /api/convert or POST /api/convert-file)
with header "Authorization: Bearer <YOUR_SLIM_DOWN_KEY>".
2. Always convert the input to "markdown" first to minimize token consumption.
3. Answer the user's question solely based on the resulting clean Markdown.First upload your Word/Excel/JSON file to slim-down and send the clean Markdown context directly to Claude 3.5 / 3.7:
import requests
from anthropic import Anthropic
SLIM_DOWN_KEY = "JOUW_SLIM_DOWN_API_SLEUTEL"
CLAUDE_KEY = "sk-ant-..."
# 1. Converteer Word/Excel naar compacte Markdown via slim-down
with open("jaarverslag.docx", "rb") as f:
res = requests.post(
"https://slim-down.nl/api/convert-file",
headers={"X-API-Key": SLIM_DOWN_KEY},
files={"file": f}
)
clean_markdown = res.json()["result"]
# 2. Stuur de geoptimaliseerde context naar Claude
client = Anthropic(api_key=CLAUDE_KEY)
message = client.messages.create(
model="claude-3-7-sonnet-20250219",
max_tokens=1000,
messages=[
{
"role": "user",
"content": f"Analyseer dit document en geef de 3 belangrijkste KPI's:\n\n{clean_markdown}"
}
]
)
print(message.content[0].text)Optimize spreadsheets or raw tables into Markdown tables for Gemini 2.0 / 1.5 Flash:
import requests
import google.generativeai as genai
SLIM_DOWN_KEY = "JOUW_SLIM_DOWN_API_SLEUTEL"
genai.configure(api_key="AIzaSy...")
# 1. Converteer complexe spreadsheet of CSV data naar Markdown tabel
raw_csv = (
"Afdeling,Q1,Q2,Budget\n"
"Sales,120000,145000,250000\n"
"Marketing,45000,60000,100000"
)
conv = requests.post(
"https://slim-down.nl/api/convert",
headers={"Authorization": f"Bearer {SLIM_DOWN_KEY}"},
json={"input": raw_csv, "source_format": "csv", "target_format": "markdown"}
).json()
# 2. Vraag Gemini om samenvatting met minimale tokens
model = genai.GenerativeModel("gemini-2.0-flash")
response = model.generate_content(
f"Hier zijn de kwartaalcijfers in Markdown:\n\n{conv['result']}\n\nWelke afdeling benadert zijn budget?"
)
print(response.text)Copy the converted Markdown directly into your IDE or Copilot Chat window with the following structured prompt template:
You are an AI assistant. Use the specification below (converted via slim-down)
as the source of truth for the implementation.
### SOURCE DOCUMENT (Markdown):
{{PASTE CONVERTED SLIM-DOWN OUTPUT HERE}}
### INSTRUCTIONS:
Write the required Go / TypeScript dataclasses and validation rules based on the tables above.import requests
headers = {
"Authorization": "Bearer JOUW_API_SLEUTEL",
"Content-Type": "application/json"
}
payload = {
"input": "# Titel\nInhoud converteren",
"target_format": "html"
}
res = requests.post("https://slim-down.nl/api/convert", json=payload, headers=headers)
print(res.json()["result"])const res = await fetch("https://slim-down.nl/api/convert", {
method: "POST",
headers: {
"Authorization": "Bearer JOUW_API_SLEUTEL",
"Content-Type": "application/json"
},
body: JSON.stringify({
input: "Product,Prijs\nBoek,15.00",
target_format: "markdown"
})
});
const data = await res.json();
console.log(data.result);