Use case
個人番号、金額、顧客情報、社内メモを共有前に隠す場面で使います。手作業の確認はWebツール、安定したサーバー側処理はAPIに分ける設計です。
PDF Tools API
バックエンド、バッチ処理、プロダクト内のワークフローにPDFを墨消しを組み込み、PDF処理基盤の自前運用を減らします。
Credits
1 Credit / call
1 Credit per successful API request. Failed processing attempts are refunded automatically.
Pricing
1,000 Credits = $1
Every signed-in user receives 100 free API Credits each month.
Endpoint
/api/external/pdf-tools/pdf-redactionUse your API Key in the x-api-key header.
個人番号、金額、顧客情報、社内メモを共有前に隠す場面で使います。手作業の確認はWebツール、安定したサーバー側処理はAPIに分ける設計です。
curl -X POST https://itextmaster.com/api/external/pdf-tools/pdf-redaction \
-H 'x-api-key: YOUR_API_KEY' \
-F 'file=@input.pdf;type=application/pdf' \
-F 'options={"areas":[{"page":1,"x":72,"y":120,"width":180,"height":36,"replacementText":"REDACTED"}],"color":{"r":0,"g":0,"b":0}}' \
--output redacted.pdfcurl -X POST https://itextmaster.com/api/external/pdf-tools/pdf-redaction \
-H 'x-api-key: YOUR_API_KEY' \
-F 'file=@input.pdf;type=application/pdf' \
-F 'options={"areas":[{"page":1,"x":72,"y":120,"width":180,"height":36,"replacementText":"REDACTED"}],"color":{"r":0,"g":0,"b":0}}' \
--output redacted.pdfcurl -X POST https://itextmaster.com/api/external/pdf-tools/pdf-redaction \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY' \
-d '{
"file": { "name": "input.pdf", "dataBase64": "JVBERi0xLjcK..." },
"options": {"areas":[{"page":1,"x":72,"y":120,"width":180,"height":36,"replacementText":"REDACTED"}],"color":{"r":0,"g":0,"b":0}}
}' \
--output redacted.pdfimport { writeFile } from 'node:fs/promises';
const response = await fetch('https://itextmaster.com/api/external/pdf-tools/pdf-redaction', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': process.env.ITEXTMASTER_API_KEY
},
body: JSON.stringify({
file: { name: 'input.pdf', dataBase64: 'JVBERi0xLjcK...' },
options: {"areas":[{"page":1,"x":72,"y":120,"width":180,"height":36,"replacementText":"REDACTED"}],"color":{"r":0,"g":0,"b":0}}
})
});
if (!response.ok) {
throw new Error(await response.text());
}
await writeFile('redacted.pdf', Buffer.from(await response.arrayBuffer()));import os
import requests
response = requests.post(
'https://itextmaster.com/api/external/pdf-tools/pdf-redaction',
headers={
'Content-Type': 'application/json',
'x-api-key': os.environ['ITEXTMASTER_API_KEY'],
},
json={
'file': {'name': 'input.pdf', 'dataBase64': 'JVBERi0xLjcK...'},
'options': {'areas': [{'page': 1, 'x': 72, 'y': 120, 'width': 180, 'height': 36, 'replacementText': 'REDACTED'}], 'color': {'r': 0, 'g': 0, 'b': 0}}
},
)
response.raise_for_status()
with open('redacted.pdf', 'wb') as f:
f.write(response.content)invalid_api_keyx-api-keyがない、無効、またはローテーション済みです。
insufficient_creditsアカウントのAPI Creditsが不足しています。
pdf_tool_processing_failedファイル、オプション、PDF構造を処理できませんでした。失敗分のCreditsは自動で戻ります。
redacted.pdf とともに、使用Creditsと残高を示すレスポンスヘッダーが返ります。
Content-TypeContent-DispositionX-Credits-ChargedX-Credit-Balance成功したPDF墨消し APIリクエストはAPI Creditsを使います。処理に失敗した分は自動で返却されます。ログイン済みユーザーには毎月100 free API Creditsがあり、1,000 Credits = $1です。
ブラウザ内で処理するWebツールはAPI Creditsを使いません。API Keyを使う自動化リクエストだけが対象です。
推奨しません。API Keyはバックエンド、キュー、サーバー側ジョブに置いてください。
Create an API Key, test PDF墨消し API, and buy more Credits only when automation volume grows.