TravelyfeHelp
DevelopersAPI ReferenceImports

Import From Photos Or A Video

POST
/v1/itinerary/from-media

Builds an itinerary from still frames of a video, or from photos and screenshots. Send the frames as base64 JPEGs; kind tells the reader whether they came from a video or an album.

Requires Travelyfe Pro and AI Imports turned on for the account (subscriptionRequired or aiConsentRequired otherwise). Imports draw from a yearly allowance; reading a link someone already imported is free.

AuthorizationBearer <token>

A Travelyfe access token.

In: header

Header Parameters

Idempotency-Key?string

A unique key per logical request. Retrying with the same key and body replays the first response instead of repeating the write.

Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/itinerary/from-media" \  -H "Content-Type: application/json" \  -d '{    "frames": [      {        "base64": "string"      }    ]  }'
{  "preview": {    "title": "string",    "destination": "string",    "origin": "string",    "summary": "string",    "center": {      "latitude": 0,      "longitude": 0    },    "startDate": "2019-08-24",    "tags": [      "string"    ],    "bestSeason": "string",    "homeCurrency": "string",    "days": [      {        "id": "string",        "title": "string",        "summary": "string",        "imageURL": "http://example.com",        "stops": [          {            "id": "string",            "name": "string",            "address": "string",            "category": "string",            "coordinate": {              "latitude": 0,              "longitude": 0            },            "startTime": "string",            "durationMinutes": 0,            "note": "string",            "phone": "string",            "bookingURL": "http://example.com"          }        ]      }    ],    "packing": [      {        "id": "string",        "name": "string",        "quantity": 0,        "category": "string",        "isPacked": true      }    ],    "expenses": [      {        "id": "string",        "title": "string",        "amount": 0,        "currency": "string",        "date": "2019-08-24",        "category": "string"      }    ]  },  "source": {    "url": "string",    "author": "string",    "confidence": 0,    "stops": 0,    "placed": 0  }}