The API is in development. Version 0 works: a script sends files to Swage over HTTP and gets the result back, with no browser.
A script sends one or more files with a key in the Authorization header. It names a format, or sends a full pipeline description instead. The files go through the same queue, limits and verification as on the web page. The script asks for the job's status as JSON and downloads the result as one archive, which is kept for 24 hours.
POST /api/v0/jobs: send files with a format or a pipelineGET /api/v0/jobs/<id>: the job's status as JSONGET /api/v0/jobs/<id>/result: the result as one archiveGET /api/v0/formats: the formats the API writesGET /api/v0/info: the version and the limits in numbersOne drawing converted into GeoPackage:
curl -H "Authorization: Bearer $KEY" \
-F "file=@Roads_CAD.dwg" -F "format=GPKG" \
https://app.tryswage.com/api/v0/jobsKeys are issued by hand. Write to us what you want to convert, and we send you a key. Every call needs the key, even the list of formats and the limits.
The API grows together with the converter. News about Swage is on our site.