개발자를 위한 API 및 MCP
웹사이트와 동일한 도구를 스크립트, 앱, AI 에이전트(Claude, ChatGPT, Cursor)에서 사용하세요. 하나의 키, 하나의 크레딧 잔액.
1. 키
계정 → “API 및 MCP”에서 키를 만드세요. Authorization 헤더로 전송합니다. 키는 한 번만 표시되므로 코드가 아닌 시크릿에 보관하세요.
Authorization: Bearer x2_live_…
2. 작업 시작
파일을 POST(multipart)로 전송합니다. 변환기는 /api/jobs, AI 도구는 /api/ai/jobs. 도구 옵션은 opts 필드에 JSON으로 전달합니다.
3. 결과 받기
상태가 done 또는 failed가 될 때까지 폴링한 다음, 같은 키로 파일을 다운로드하세요. 파일은 2시간 동안 보관됩니다.
cURL
curl -s -H "Authorization: Bearer $X2_KEY" \ -F "[email protected]" \ "https://x2tool.com/api/jobs?tool=pdf-to-word" # → {"id":"7f3c…","status":"queued"} curl -s "https://x2tool.com/api/jobs/7f3c…" # → {"status":"done","files":[{"name":"report.docx","url":"/api/files/7f3c…/report.docx"}]} curl -s -H "Authorization: Bearer $X2_KEY" -o report.docx \ "https://x2tool.com/api/files/7f3c…/report.docx"
Python
import os, time, requests
KEY = os.environ["X2_KEY"]
H = {"Authorization": f"Bearer {KEY}"}
# ШІ / AI tool with options (no file)
job = requests.post("https://x2tool.com/api/ai/jobs?tool=translate-text", headers=H,
data={"opts": '{"text": "Hello!", "to": "uk"}'}).json()
while True:
st = requests.get(f"https://x2tool.com/api/ai/jobs/{job['id']}").json()
if st["status"] in ("done", "failed"): break
time.sleep(1)
for f in st["files"]:
open(f["name"], "wb").write(requests.get("https://x2tool.com" + f["url"], headers=H).content)AI 에이전트용 MCP
X2TOOL을 MCP 서버로 연결하세요. 에이전트가 알맞은 도구를 찾아 실행하고 결과 링크를 반환합니다.
https://x2tool.com/mcp · Streamable HTTP · Bearer
Claude Desktop / Cursor — mcp.json
{
"mcpServers": {
"x2tool": {
"type": "http",
"url": "https://x2tool.com/mcp",
"headers": { "Authorization": "Bearer x2_live_…" }
}
}
}Claude Code
claude mcp add --transport http x2tool https://x2tool.com/mcp \ --header "Authorization: Bearer x2_live_…"
MCP 도구
search_tools- 작업 또는 파일 형식으로 도구 찾기
run_tool- 실행: file_url 또는 file_base64, 옵션, 결과 대기
get_job- 오래 걸리는 작업의 상태
get_balance- 요금제 및 남은 크레딧
한도 및 요금제
- API와 MCP는 Business 요금제에 포함됩니다. Free와 Pro는 하루 20회 체험 호출을 제공합니다.
- 변환기는 크레딧이 들지 않으며, AI 도구는 성공한 실행당 1크레딧부터입니다.
- 파일 크기는 요금제 한도를 따르며, MCP는 최대 100MB 파일을 허용합니다.
- 결과는 2시간 동안 제공된 후 영구 삭제됩니다.
오류 코드
401 bad_api_key- 잘못되었거나 취소된 키
402 no_credits- 크레딧 부족 — 충전하세요
403 api_plan_required- 오늘의 체험 호출 소진 — Business 필요
413 plan_file_too_large- 파일이 요금제 한도를 초과함
429 rate_limited / daily_limit- 요청이 너무 많음 — 잠시 기다리세요
415 unsupported_type- 도구가 이 형식을 지원하지 않음
API로 사용 가능한 도구
서버 및 AI 도구 893개. slug는 도구 페이지 주소입니다.
pdf-to-wordword-to-pdfpdf-to-jpgcompress-pdfpdf-to-pngpowerpoint-to-pdfpdf-to-exceldjvu-to-pdfepub-to-pdfexcel-to-pdftranslate-pdfAIchat-pdfAIdelete-pdf-pagesocr-pdfAIscan-to-excelAIscan-to-wordAIsummarize-pdfAIfb2-to-pdfhtml-to-pdfpdf-to-epubpdf-to-txtextract-images-pdfextract-pdf-pagesheic-to-pdforganize-pdfpdf-extract-dataAIpdf-page-numberspdf-to-pdfapdf-to-powerpointpdf-to-quizAIpdf-to-svgprotect-pdfredact-pdfrepair-pdftxt-to-pdfunlock-pdfurl-to-pdfwatermark-pdfwebp-to-pdfazw3-to-pdfcrop-pdfflatten-pdfgrayscale-pdfmarkdown-to-pdfmobi-to-pdfodt-to-pdfpdf-n-uppdf-to-azw3pdf-to-bookletpdf-to-fb2pdf-to-htmlpdf-to-markdownpdf-to-mobipdf-to-odtpdf-to-rtfpdf-to-tiffpdf-to-webpremove-pdf-metadatartf-to-pdftiff-to-pdfxps-to-pdfdoc-to-docxfb2-to-epubepub-to-fb2epub-to-mobimobi-to-epubazw3-to-epubazw3-to-fb2azw3-to-mobidocx-to-epubdocx-to-txtepub-to-azw3fb2-to-azw3fb2-to-mobimarkdown-to-docxmobi-to-azw3mobi-to-fb2odt-to-docxppt-to-pptxpptx-to-jpgcompress-pptxdjvu-to-epubdjvu-to-jpgdoc-to-odtdoc-to-rtfdoc-to-txtdocx-to-docdocx-to-htmldocx-to-jpgdocx-to-markdowndocx-to-odtdocx-to-rtfepub-to-docxepub-to-txtfb2-to-txthtml-to-docxkeynote-to-pptxmerge-wordodp-to-pptxodt-to-docodt-to-rtfodt-to-txtpages-to-docxpptx-to-videortf-to-docrtf-to-docxrtf-to-odtrtf-to-txttxt-to-doctxt-to-docxtxt-to-odttxt-to-rtfremove-backgroundAIupscale-imageAIheic-to-jpgcompress-image-to-sizetext-to-imageAIimage-to-textAIpng-to-icoavif-to-jpg아이디어가 있나요?
필요한 도구가 없거나 개선할 점이 있나요? 모든 메시지를 읽고 있습니다.