STL Converter
API / ドキュメント

STL Converter API

変換サービスで非同期ジョブを作成し、メッシュ統計を確認して生成ファイルをダウンロードできます。公開する場合は独自のアクセス制御の背後で運用してください。

ベース URL とアクセス

Use the same origin that serves this page as the API base URL. Each job returns a capability token in the JSON response; send it in the X-Job-Token header for status and cancellation. Bind jobs to an authenticated account and enforce plan quotas before sharing the service publicly.

const API_BASE = 'https://convertostl.com';

エンドポイント

  • GET /api/health checks availability and reports queue, upload, and in-process conversion metrics.
  • POST /api/jobs accepts multipart fields operation, outputFormat, options, and one or more file fields.
  • GET /api/jobs/:id returns queued, processing, completed, or failed status plus mesh analysis.
  • DELETE /api/jobs/:id cancels a queued job before processing starts.
  • GET /api/jobs/:id/download downloads the completed result.

変換ジョブを作成

JavaScript clients can send the same multipart fields with FormData:

curl -X POST https://convertostl.com/api/jobs -F operation=convert -F outputFormat=stl -F [email protected]
const form = new FormData();
form.append('operation', 'convert');
form.append('outputFormat', 'stl');
form.append('file', file);
const response = await fetch(`${API_BASE}/api/jobs`, { method: 'POST', body: form });
const job = await response.json();

Multipart フィールド

FieldRequiredValues and notes
operationYesconvert, analyze, repair, compress, reduce, split, or merge.
fileYesOne supported file up to 250 MB; merge accepts two or more STL/OBJ fields.
outputFormatFor convertstl, obj, glb, fbx, step, or 3mf.
optionsNoJSON object for image relief, SVG extrusion, STEP tessellation, or reduce/compress settings.

ポーリングとダウンロード

Poll the status URL with the X-Job-Token header until it returns completed or failed. A completed response includes a relative result.downloadUrl containing a separate download-only token that expires after 10 minutes. API clients can also download with the original capability in the header.

curl -H "X-Job-Token: JOB_TOKEN" https://convertostl.com/api/jobs/JOB_ID
# Use the result.downloadUrl returned by the completed response:
curl -L -o result.stl "https://convertostl.com/api/jobs/JOB_ID/download?download_token=DOWNLOAD_TOKEN"

エラーコード

HTTPCodeWhen it occurs
400MULTIPART_REQUIRED, FILE_REQUIRED, UPLOAD_LIMITRequest format, file field, or 250 MB upload limit is invalid.
403ORIGIN_NOT_ALLOWEDThe browser origin is not in the configured exact-origin allowlist.
415FORMAT_NOT_ALLOWEDThe uploaded extension is outside the supported input formats.
404JOB_NOT_FOUND, RESULT_MISSINGJob expired or its generated result is unavailable.
409RESULT_NOT_READY, JOB_NOT_ACTIVE, JOB_ALREADY_PROCESSINGThe result is not ready, or a job cannot be cancelled after processing starts.
429RATE_LIMITED, JOB_QUEUE_FULL, UPLOAD_CONCURRENCY_LIMITThe client or server queue capacity was reached.
500INTERNAL_ERRORUnexpected server failure; retry after checking service logs.

対応ワークフローと制限

Supported inputs include STL, OBJ, 3MF, GLB, FBX, STEP, IGES, DAE, PLY, BLEND, PNG, JPG, SVG, DXF, and ZIP. Reverse exports support OBJ, GLB, FBX, faceted STEP, and 3MF; ASCII STL can be normalized to Binary STL. Compress, reduce, split, and merge are real server operations: compression removes redundant geometry, reduction keeps a controlled triangle ratio, split returns connected components in a ZIP, and merge combines input surfaces into one STL without Boolean union. SCAD and STL to G-code remain guides because they require OpenSCAD or a printer-specific slicer. Uploads are limited to 250 MB; ZIP jobs also have file-count and decompressed-size limits.

ZIP archives accept up to 100 nested files and a 128 MB decompressed/output safety budget by default. Mesh processing also enforces vertex and face limits. The default rate limit is 20 job creations per client per minute, with one active conversion and two pending jobs on the reference deployment.

Jobs and temporary files are retained only for the one-hour cleanup window. Download URLs expire after 10 minutes. Add authentication, aggregate edge rate limiting, request timeouts, a persistent result store, and container-level memory limits before exposing the API to an untrusted public network.

STL Converter に戻る →