Skip to Content
Developer docs

Quickstart

Create, upload, submit and print your first hologram with the Meishi API.

You need a Meishi organization on a plan that includes the API (Enterprise or Partner), a short video of a person (up to 60 seconds) and an image to print it on.

Create an API key

In the Meishi portal, open Partner › API and webhooks and create a key. It is shown once: copy it into an environment variable on your server.

export MEISHI_API_KEY="msk_live_…"

Check the connection

curl https://api.meishi.cards/v1/me -H "Authorization: Bearer $MEISHI_API_KEY"

A 200 answer proves the key works and says how many experiences you can still publish:

{
  "key": { "id": "efcc63b7", "name": "Shop server", "hint": "x9Qa" },
  "organization": { "id": "bddf4b25-…", "name": "Your company" },
  "experiences": { "available": 48, "refillsAt": 1764547200 }
}

Start a hologram

Say what you will upload, with the exact size of each file in bytes:

curl -X POST https://api.meishi.cards/v1/experiences \
  -H "Authorization: Bearer $MEISHI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "hologram",
    "orderReference": "1001",
    "image": { "contentType": "image/jpeg", "size": 812345 },
    "video": { "contentType": "video/mp4", "size": 24000000 }
  }'

The answer holds the draft experience and an upload URL for each file:

{
  "experience": {
    "experienceId": "3f1c9a52-…",
    "status": "draft",
    "scanUrl": "https://ar.meishi.cards/bgbikHGrcA",
    "…": "…"
  },
  "uploads": {
    "image": {
      "url": "https://…",
      "method": "PUT",
      "headers": { "Content-Type": "image/jpeg" },
      "expiresAt": 1762776000
    },
    "video": {
      "url": "https://…",
      "method": "PUT",
      "headers": { "Content-Type": "video/mp4" },
      "expiresAt": 1762776000
    }
  }
}

Upload the files

PUT each file to its URL with exactly the headers given, within an hour:

curl -X PUT "<uploads.image.url>" -H "Content-Type: image/jpeg" --data-binary @photo.jpg
curl -X PUT "<uploads.video.url>" -H "Content-Type: video/mp4" --data-binary @message.mp4

Submit it

curl -X POST https://api.meishi.cards/v1/experiences/<experienceId>/submit \
  -H "Authorization: Bearer $MEISHI_API_KEY"

Meishi checks the uploads, prints the QR code onto the image, counts one experience and starts cutting the person out of the video. The status becomes submitted, then processing.

Wait for experience.ready on your webhook, or poll until status is ready:

curl https://api.meishi.cards/v1/experiences/<experienceId> \
  -H "Authorization: Bearer $MEISHI_API_KEY"

Print printPdfUrl (or printImageUrl). Scan the code with a phone: the hologram stands on the printed image.

Next steps