API dành cho nhà phát triển

Tự động hóa xử lý PDF bằng một yêu cầu HTTP đơn giản — các quy trình tương tự cung cấp năng lượng cho trang web.

Bắt đầu nhanh

Tạo khóa API trong bảng điều khiển, dưới Developer API. Sau đó gửi một tệp với khóa trong tiêu đề X-Api-Key:

curl -X POST https://makeitpdf.com/api/v1/compress/ \
  -H "X-Api-Key: mip_your_key_here" \
  -F "file=@document.pdf"

Phản hồi chứa các liên kết tải xuống cho các tệp đã xử lý:

{
  "success": true,
  "tool": "compress",
  "files": ["https://makeitpdf.com/media/temp/…/document_compressed.pdf"],
  "credits_remaining": 18
}

Điểm cuối

Tất cả các điểm cuối chấp nhận POST với multipart/form-data. Đính kèm tệp trong trường tệp (lặp lại cho nhiều tệp). Danh sách có thể đọc bằng máy có tại /api/v1/tools/.

Điểm cuối Đầu vào Trường bổ sung
POST /api/v1/merge/ PDF files (2+)
POST /api/v1/rotate/ PDF files; rotation: 90|180|270 (default 90) rotation
POST /api/v1/extract-pages/ One PDF; pages: e.g. "1-3,5" pages
POST /api/v1/compress/ PDF files; compression_level: low|recommended|high compression_level
POST /api/v1/repair/ One PDF
POST /api/v1/flatten/ One PDF
POST /api/v1/grayscale/ One PDF
POST /api/v1/word-to-pdf/ Word documents (.doc/.docx)
POST /api/v1/excel-to-pdf/ Excel workbooks (.xls/.xlsx)
POST /api/v1/powerpoint-to-pdf/ PowerPoint files (.ppt/.pptx)
POST /api/v1/image-to-pdf/ Images (JPG/PNG/WebP…); merge_images: true|false page_size, page_orientation, page_margin, merge_images
POST /api/v1/pdf-to-word/ PDF files
POST /api/v1/pdf-to-excel/ PDF files
POST /api/v1/pdf-to-powerpoint/ PDF files
POST /api/v1/pdf-to-jpg/ PDF files; image_quality: normal|high conversion_type, image_quality
POST /api/v1/pdf-to-text/ One PDF
POST /api/v1/pdf-to-pdfa/ PDF files pdfa_conformance
POST /api/v1/ocr/ Scanned PDFs; ocr_language: eng|deu|fra|… (default eng) ocr_language, ocr_quality
POST /api/v1/protect/ PDF files; password required password
POST /api/v1/unlock/ PDF files; password required password
POST /api/v1/translate/ One PDF; target_language required (e.g. "de"), source_language optional (default auto) target_language, source_language

Ví dụ: dịch một PDF sang tiếng Đức

curl -X POST https://makeitpdf.com/api/v1/translate/ \
  -H "X-Api-Key: mip_your_key_here" \
  -F "file=@report.pdf" \
  -F "target_language=de"

Giá cả và giới hạn

Yêu cầu API sử dụng cùng một hạn mức với tài khoản của bạn trên trang web: trước tiên là số tác vụ hàng ngày và hạn ngạch AI hàng tháng của gói của bạn, sau đó là số tín dụng của bạn (1 tín dụng cho mỗi tác vụ tiêu chuẩn, 5 tín dụng cho mỗi tài liệu AI). Không có gói đăng ký API riêng.

Xem các gói và gói tín dụng →

Lỗi

Lỗi trả về một phần thân JSON với mã lỗi và thông báo dễ đọc:

{ "success": false, "error": "daily_limit_reached",
  "message": "Daily task limit reached for your plan…", "credits_remaining": 0 }
Trạng thái Ý nghĩa
400Thiếu tệp hoặc trường bắt buộc — thông báo sẽ nêu tên trường đó
401Khóa API bị thiếu, không xác định hoặc bị thu hồi
403Đã đạt giới hạn gói hoặc tín dụng — mã lỗi sẽ nêu tên giới hạn
422Không thể xử lý tệp
429Đã vượt quá giới hạn tốc độ — thử lại sau một phút
500Lỗi máy chủ không mong muốn — thử lại, sau đó liên hệ với chúng tôi

API đang trong giai đoạn thử nghiệm. Bạn có câu hỏi hoặc cần một công cụ nào đó được hiển thị không?

Liên hệ với chúng tôi