Open vDesign
Contents Import API

These docs follow the latest development version of vDesign.

Import API

The Import API turns PowerPoint (.pptx), PDF, Illustrator (.ai) and SVG files into editable vDesign documents, over HTTP, in a Docker image that you run yourself. Your files stay on your servers: the image does not store them and does not send them anywhere. It needs a licence key, which you get by starting a free trial or choosing a plan at getv.design/api/import.

The vDesign apps import these files too, for free. This is for running import as a service, inside your own network, from your own code.

What you need

  • A machine that runs Docker on x86-64 Linux.
  • About 4 GB of memory for the default settings: each import runs in its own process of up to 1 GB, and two run at once. A small deployment can lower both (see Settings).
  • Outbound HTTPS to license.getv.design, when the service starts and once a day. It is the only connection the service makes. See The licence.
  • A licence key.

Get a licence key

Go to getv.design/api/import and start the 7-day free trial, or subscribe monthly or yearly. Sign in with a vDesign account (or create one), and your key and the command that starts the service are on your licence page. A trial that you later buy keeps the same key, so there is nothing to change in your deployment.

Keep the key to yourself: anyone who has it can run the service on your plan.

Run it

docker run -d --name vdesign-import --restart unless-stopped \
  -p 8080:8080 \
  -v vdesign-licence:/var/lib/vdesign \
  -e VDESIGN_LICENSE_KEY=YOUR-KEY \
  public.ecr.aws/w0a0h7n1/import:1

The volume is not decoration. The service keeps the last answer from the licence server there, so it can restart and keep running while the licence server cannot be reached. Without it, a restart needs the network.

With Docker Compose:

services:
  import:
    image: public.ecr.aws/w0a0h7n1/import:1
    restart: unless-stopped
    ports:
      - '8080:8080'
    environment:
      VDESIGN_LICENSE_KEY: ${VDESIGN_LICENSE_KEY}
    volumes:
      - licence:/var/lib/vdesign
volumes:
  licence:

The image is public: you can pull it without an account, and it does nothing without a key. Use a version tag. 1 takes fixes and new features within version 1, 1.2 takes fixes only, and 1.2.3 never changes. There is no latest, so a pull never upgrades you by surprise.

Check that it works

curl http://localhost:8080/health
# {"ok":true}

curl http://localhost:8080/v1/license
# {"status":"valid","expiry":"2027-12-01T00:00:00.000Z","checkedAt":"…","cached":false}

/health answers while the process is up, whether or not the licence is good, so it is the address for a container health check. /v1/license says what the licence check found, and never shows the key. Imports answer 402 until the first check has finished, which takes a second or two after the service starts.

Import a file

Send the file as the request body, not as a form:

curl -X POST --data-binary @deck.pptx \
  -H 'X-Filename: deck.pptx' \
  http://localhost:8080/v1/import

Say which format it is in one of three ways, checked in this order:

  1. ?format=pptx (or pdf, ai, svg, svgz) on the address.
  2. The extension of an X-Filename header.
  3. The Content-Type: application/vnd.openxmlformats-officedocument.presentationml.presentation, application/pdf, application/illustrator or image/svg+xml.

?title=Quarterly review (or the X-Filename, without its extension) sets the document’s title.

The answer is JSON:

{
  "format": "pptx",
  "vd": "version 12\nkind slides\n…",
  "summary": {
    "kind": "deck",
    "slides": 24,
    "layouts": 3,
    "masters": 1,
    "pictures": 18,
    "notes": [{ "code": "import-chart", "message": "…", "page": "s4", "count": 1 }],
    "text": "24 slides, 3 layouts… 1 chart drawn approximately"
  },
  "problems": []
}
FieldWhat it is
vdThe whole .vd file as text, its images included. Save it as something.vd; see The .vd format.
summaryWhat was imported. kind is deck (a PowerPoint) or drawing (an SVG, an Illustrator file or a PDF), with slides (pages for a drawing), layouts, masters and pictures.
notesEverything the import approximated, flattened, left as a placeholder or dropped, once per kind of change and page. Nothing is lost without being listed.
textThe same notes in plain words, for a log or a person.
problemsProblems the document checker found in what was written. It should be empty; if it is not, please report it.

Errors

Every error is JSON, { "error": "<code>", "message": "<what to do>" }.

StatuserrorWhen
400emptyThe body is empty.
401unauthorisedVDESIGN_API_TOKEN is set and the request has no matching Authorization: Bearer.
402license_invalidThe licence is expired, suspended, unknown, or could not be verified. The message says which.
413too_largeThe file is over VDESIGN_MAX_UPLOAD_MB (100 by default).
415unsupported_formatIt could not tell the format. Say it with ?format=.
422import_failedThe file could not be read: not a real .pptx, encrypted, damaged, or too big to expand safely.
503busyAll workers are busy and the queue is full. Retry after the Retry-After header.
504timeoutThe import took longer than VDESIGN_IMPORT_TIMEOUT_SECONDS and was stopped.

A file that fails is never kept, and one bad file cannot take the service down: each import runs in a process of its own, with a time and a memory limit, and a .pptx whose directory says it would expand to an absurd size is refused before anything is unpacked.

Settings

All settings are environment variables. Only the key is required.

VariableDefaultWhat it does
VDESIGN_LICENSE_KEYnone, requiredYour licence key.
VDESIGN_API_TOKENnoneIf set, POST /v1/import needs Authorization: Bearer <token>.
VDESIGN_MAX_UPLOAD_MB100The largest file accepted.
VDESIGN_IMPORT_TIMEOUT_SECONDS120How long one import may run.
VDESIGN_CONCURRENCY2Imports running at once. Each may use up to the worker memory below.
VDESIGN_QUEUE_LIMIT16Imports allowed to wait. One more is refused with 503.
VDESIGN_WORKER_MEMORY_MB1024The most memory one import may use before it is stopped.
VDESIGN_LICENSE_GRACE_DAYS7How long the service runs on the last good answer when the licence server cannot be reached.
VDESIGN_LICENSE_CHECK_MINUTES1440How often the licence is checked. It retries every 15 minutes while it is failing.
PORT, HOST8080, 0.0.0.0Where it listens.

If a setting is wrong, the service prints every problem it found, as JSON on one line each, and exits with status 78 without starting.

The licence

The service checks its key with license.getv.design when it starts and once a day. The check sends your key and a random number, and nothing else; our server sees the address the request comes from. Nothing from your files is ever sent. The answer is signed, and the service believes only an answer that carries our signature, so a copied or edited file cannot make an expired licence valid.

  • Renewing changes nothing for you. Your key stays the same when a monthly or yearly plan renews, and the next daily check picks up the new date.
  • An outage does not stop you. If the licence server cannot be reached, the service keeps running on the last answer for 7 days, and checks again every 15 minutes. After 7 without an answer, imports return 402 until it can.
  • A lapsed, refunded or cancelled-and-ended plan stops within a day. Imports return 402 with the reason. A plan you have cancelled runs to the end of what you paid for.
  • A failed payment is given three days after the date it was due before the key stops.
  • Firewalls: allow outbound HTTPS to license.getv.design. If that is not possible, the service cannot be licensed today.

Putting it in production

  • Put TLS in front of it. The service speaks plain HTTP. Run it behind your reverse proxy or load balancer, or keep it on a private network.
  • Set VDESIGN_API_TOKEN if anything other than your own code can reach it.
  • Size it for your files. A large deck with many pictures is the heaviest import. If you see 504 or 422 for files that should be fine, raise VDESIGN_IMPORT_TIMEOUT_SECONDS or VDESIGN_WORKER_MEMORY_MB, and the machine’s memory with it.
  • Logs are one JSON object per line on standard output. They contain the method, the path, the status, the time and the size, never a file’s content, name or title.
  • Stop it gracefully. On SIGTERM it finishes imports that are running, for up to 30 seconds.

Troubleshooting

The container exits at once. Read its log: docker logs vdesign-import. Each line says what setting is missing or wrong. Status 78 always means settings.

Imports return 402 The licence could not be verified. The service has not had a signed answer yet, or has not had one for 7 days. Check that the container can reach https://license.getv.design (a proxy or a firewall is the usual cause), and look at GET /v1/license for the reason.

Imports return 402 EXPIRED or SUSPENDED. The licence has ended. Open your licence page to renew or to see why.

Imports return 402 and the licence server is reachable. Check the host’s clock. The service refuses a signed answer whose date is more than five minutes from its own clock, in either direction, so a machine without time synchronisation (NTP) never validates. Fix the clock and the next check passes; restarting the container forces one.

422 for a file PowerPoint opens fine. A file saved with a password, or one that is not really a .pptx (a renamed .ppt, the old binary format), cannot be read. Re-save it as .pptx.

Text in a picture looks wrong. Words inside Windows metafile pictures (EMF, WMF) are drawn with the fonts in the image: Liberation, Carlito and Caladea stand in for Arial, Calibri and Cambria. A deck’s own fonts are not needed to import it.

What it does not do

  • It does not enforce seats or limit how many copies run: the plan is for your own organisation, under the licence terms.
  • It does not take multipart uploads: the body is the file.
  • It does not run without a way to reach the licence server at least once a week.
  • It imports into vDesign documents. For exporting a document to PowerPoint, Illustrator or PDF on your own servers, see the Export API, which is sold apart with a key of its own: an Export API key is refused here, and an Import API key there.