Skip to content
Search Documentation
Search across all documentation pages
Imports

The Import object

An import is a list of source URLs, each of which becomes a hosted video through the same path as Create a video from a URL: the same SSRF checks, the same admission probe, the same hosted ABR ladder, the same pricing. Every import is quoted before anything is encoded, is started with a spend cap, and pauses rather than fails when the cap is reached. A step-by-step walkthrough lives in the Import a library guide.

An import can also read its items from a source library: a Vimeo account, read with a Vimeo personal access token (source.type vimeo). See Source libraries. Vimeo import is not available yet: until it has been run against a live Vimeo account, every request with a vimeo source is refused with invalid_argument, error code parameter_unsupported, “Vimeo import is not available yet.”.

Base path: transcodely.v1.ImportService Requires: an app-scoped API key (ak_), or the X-Organization-ID header for portal sessions. API-key callers may omit app_id (the key’s app is used) or pass their own app; another app is rejected with permission_denied. An import of another app or organization answers not_found with error code import_not_found.

The lifecycle:

  1. Create an import with up to 1,000 items (status draft), and add items to reach up to 10,000. Nothing is fetched or encoded yet. Every Create and AddItems returns the quote.
  2. Start it with a spend cap (max_spend_eur). Status becomes running and items are dispatched in submission order, in batches of up to 10, at a pace that leaves room in your queue for your own uploads.
  3. If the next item would take the import over its cap, the import pauses (paused, pause_reason spend_cap_reached). Nothing is lost: raising the cap with Update resumes it.
  4. When no item is pending or running any more, the import is completed and the import.completed webhook fires once.

Attributes

AttributeTypeDescription
idstringUnique identifier with the imp_ prefix (e.g. "imp_a1b2c3d4e5f6").
app_idstringApp the videos are created in.
statusstringLifecycle state. One of: draft, running, paused, completed, canceled. See States.
pause_reasonstringWhy the import is paused. Present only while status is paused. One of: spend_cap_reached, spend_limit_reached, billing, hosting_unavailable, manual, source_credentials_invalid, source_credentials_expired. See Pause reasons.
sourceobjectWhere the items come from: type is urls (items submitted in the request) or vimeo (items read from a Vimeo library, with the library’s settings in vimeo; see The VimeoImportSource object).
defaultsobjectSettings applied to every item unless the item overrides them. See Create an import.
max_spend_eurnumberSpend cap in EUR. Required to start. Omitted until set.
spent_eurnumberActual cost, in EUR, of the items that have finished.
reserved_eurnumberEstimated cost, in EUR, of items dispatched and not finished yet. It moves into spent_eur, as the actual cost, as each item finishes.
quoteobjectThe quote for the items submitted so far.
countsobjectNumber of items in each status: pending, running, succeeded, failed, skipped, canceled.
created_atstringISO 8601 timestamp.
updated_atstringISO 8601 timestamp of the last change.
started_atstringWhen the import was started. Omitted while draft.
completed_atstringWhen the import completed. Omitted until then.
canceled_atstringWhen the import was canceled. Omitted unless canceled.
{
  "id": "imp_a1b2c3d4e5f6",
  "app_id": "app_k1l2m3n4o5",
  "status": "paused",
  "pause_reason": "spend_cap_reached",
  "source": { "type": "urls" },
  "defaults": {
    "visibility": "unlisted",
    "preset": "",
    "auto_captions": false,
    "auto_translations": [],
    "tags": ["imported"]
  },
  "max_spend_eur": 25,
  "spent_eur": 22.84,
  "reserved_eur": 1.71,
  "quote": {
    "item_count": 240,
    "known_duration_seconds": 131400,
    "unknown_duration_items": 12,
    "estimated_encode_eur": 49.28,
    "estimated_storage_eur_per_month": 2.1,
    "currency": "EUR",
    "free_encode_seconds_applied": 0
  },
  "counts": { "pending": 118, "running": 2, "succeeded": 117, "failed": 3, "skipped": 0, "canceled": 0 },
  "created_at": "2026-11-30T09:00:00Z",
  "updated_at": "2026-11-30T10:12:44Z",
  "started_at": "2026-11-30T09:02:10Z"
}

States

StatusMeaning
draftCreated, not started. Items can be added; nothing is fetched or encoded.
runningItems are being dispatched and encoded.
pausedNo new items are dispatched; items already dispatched keep encoding. pause_reason says why.
completedEvery item has succeeded, failed, been skipped or been canceled. Final.
canceledCanceled by you. Items not yet dispatched were canceled. Final.

draft → running (Start) → completed. running ↔ paused (Pause and Resume, or the dispatcher pausing on one of the reasons below). draft, running and paused can be canceled. An action the current state does not allow is refused with failed_precondition, error code import_invalid_state, and a message that names the current status and what is allowed.

Pause reasons

Pause reasonWhat happenedWhat to do
spend_cap_reachedThe next item would take spent_eur + reserved_eur over max_spend_eur.Raise the cap with Update; that resumes the import.
spend_limit_reachedThe app’s monthly spend limit refused an item (error code limit_exceeded).Raise the app limit, then Resume. Resume continues only the items still pending, which includes an item refused when its video was created. An item refused after its video was created, when the video’s input was first read, is failed with limit_exceeded and nothing charged: submit it again in a new import, and delete its errored video if you do not want it.
billingThe account cannot start new work: a payment is past due, the outstanding balance is over its limit, or the account standing refuses new jobs.Settle the account, then Resume.
hosting_unavailableManaged hosting was turned off, or could not be provisioned, for the app after the import started.Enable hosting, then Resume.
manualPaused with Pause.Resume.
source_credentials_invalidThe source (Vimeo) rejected the import’s credential: it was revoked or lacks a required scope.Give a new token with UpdateSourceCredentials; that resumes the import.
source_credentials_expiredThe import’s source credential was deleted because it was given more than 7 days ago.Give a new token with UpdateSourceCredentials; that resumes the import.

The quote

Computed on every Create and AddItems from the live rate card for the app, with the same pricing the encode is billed with. It is an estimate, not a charge: encodes are billed on the real source duration, storage on the real bytes stored.

AttributeTypeDescription
item_countintegerItems that will be dispatched (pending items). Skipped duplicates are not counted.
known_duration_secondsnumberSum of duration_seconds over the counted items that gave one.
unknown_duration_itemsintegerCounted items that gave no duration_seconds. They are not priced in the quote; their real cost still counts against the cap as they run.
estimated_encode_eurnumberEstimated encode cost of the items with a known duration, in EUR, including the per-video processing fee and any caption translation fees the defaults ask for.
estimated_storage_eur_per_monthnumberEstimated monthly cost of storing the encoded renditions of the items with a known duration, in EUR per month. Delivery is billed separately, on what viewers watch.
currencystringAlways "EUR".
free_encode_seconds_appliednumberSource seconds whose encode charge a free-import allowance covers. 0 unless such an allowance is enabled for your account.

Source libraries (Vimeo, beta)

With source.type vimeo, the import reads a Vimeo library with a Vimeo personal access token instead of taking a list of URLs. Beta: not yet run against a live Vimeo account. The flow:

  1. Preview the library: its folders and videos, which videos can be imported and why the others cannot, and the quote. Nothing is created.
  2. Create the import with the same source and no items. The library is read again and every importable video in the selected folders becomes an item with its title, description, tags (plus folder:<name>), duration and visibility, and external_id vimeo:<id>. More than 10,000 importable videos is refused: select folders.
  3. Start it with a spend cap, as any import. Each video’s download link is fetched from Vimeo just before its item is dispatched (the original upload when Vimeo offers it, else the largest rendition; the item’s source_file records which), and is never stored.
  4. When a video is ready, its Vimeo caption and subtitle tracks are attached to it (unless include_text_tracks is false).
  5. Export the mapping file to swap the embeds on your site.

The VimeoImportSource object

The vimeo field of source. Required when type is vimeo, refused otherwise.

AttributeTypeDescription
access_tokenstringA Vimeo personal access token for the account that owns the videos, with the public, private and video_files scopes (max 512 characters). Write-only: accepted on Create, Preview and UpdateSourceCredentials, and never returned (responses carry it as an empty string). Stored encrypted, and deleted when the import completes or is canceled, and 7 days after it was given in any case.
folder_idsarray of stringsVimeo folder IDs to import, each with everything below it (at most 500, digits only). Empty: the whole library.
include_text_tracksbooleanAttach the videos’ Vimeo caption and subtitle tracks to the created videos once they are ready. Default true. A track the video cannot take becomes the warning text_track_not_imported on its item, never a failure.
visibility_mappingobjectVisibility of the created videos per Vimeo privacy setting, overriding the default mapping. Keys are Vimeo privacy.view values (such as anybody, unlisted, password); values are public, unlisted or private. At most 20 entries.
access_token_setbooleanOutput only. Whether the import still holds a token. false once the import has completed or been canceled, or 7 days after the token was given.
account_namestringOutput only. The Vimeo account the token belongs to.
{
  "type": "vimeo",
  "vimeo": {
    "access_token": "",
    "folder_ids": ["11223344"],
    "include_text_tracks": true,
    "visibility_mapping": {},
    "access_token_set": true,
    "account_name": "Acme Academy"
  }
}

Visibility mapping

The default, applied per video from its Vimeo privacy.view value. Override any row with visibility_mapping.

Vimeo settingCreated video
anybodypublic
unlisted, disable, embed_onlyunlisted
everything else: nobody, password, contacts, users, and any other valueprivate

What each value means is defined by Vimeo (ViewPrivacyType in Vimeo’s own client library, accessed 2026-11-28).

A Vimeo video with a password becomes private: per-video passwords do not come across.

Why a video cannot be imported

Whether a video can be imported is decided per video, from what Vimeo returns for it, never from the account’s plan name.

ReasonMeaning
no_download_accessVimeo offered no file to download: the account’s plan does not allow downloads through the API, or the token lacks the video_files scope (missing_scopes in the preview says which when Vimeo tells us).
not_ownerThe video belongs to another Vimeo account; only its owner’s token can download it.
source_unavailableThe video has nothing to import right now: still processing on Vimeo, failed there, over the Vimeo account’s quota, or a live event.

The ImportItem object

One source of an import and what became of it.

AttributeTypeDescription
idstringUnique identifier with the imi_ prefix (e.g. "imi_a1b2c3d4e5f6g7").
import_idstringImport the item belongs to.
app_idstringApp the video is created in.
statusstringOne of: pending, running, succeeded, failed, skipped, canceled.
urlstringSource URL, as submitted.
external_idstringYour identifier for the source, as submitted. Empty when none was given.
titlestringTitle, as submitted.
descriptionstringDescription, as submitted.
tagsarray of stringsTags, as submitted.
duration_secondsnumberSource duration hint, as submitted. Omitted when none was given.
visibilitystringVisibility override, as submitted. Empty: the import’s defaults.
text_tracksarray of objectsCaption files, as submitted (url, language, kind). Not ingested yet; see Caption files.
video_idstringThe video this item created. Empty until the item is dispatched.
errorobjectWhy the item failed: code (a standard API error code such as input_not_found or invalid_input_url, or for a Vimeo item source_no_download_access, source_not_owner or source_unavailable; see Item error codes) and message (plain words, and how to fix it). Present only when status is failed.
duplicate_of_item_idstringThe item that holds this item’s external_id. Set only when status is skipped.
warningsarray of objectsThings that did not stop the item, each with a code and message, e.g. text_tracks_not_ingested, or text_track_not_imported for a Vimeo caption track the video could not take.
source_idstringThe source’s ID of the video (the Vimeo video ID). Empty for a urls import.
source_fileobjectWhich file of the source video was imported: quality (source for the original upload, else a rendition label such as hd or sd), is_original (false means the import encodes a rendition Vimeo made, not your original), and width, height and size_bytes when Vimeo said. Present once the item has been dispatched from a source library.
text_tracks_attachedintegerNumber of the source video’s caption and subtitle tracks attached to the created video.
estimated_cost_eurnumberEstimated cost of this item in EUR: from duration_seconds when given, else 0 until the item is dispatched.
cost_eurnumberActual cost of this item in EUR. Present once the item has finished.
created_atstringWhen the item was submitted.
updated_atstringWhen the item last changed.
Item statusMeaning
pendingNot dispatched yet.
runningDispatched: its video is being created or encoded.
succeededIts video is ready. Final.
failedIts video could not be created or encoded; error says why. Final. A failed item does not hold its external_id, so it can be retried by submitting it again in a new import.
skippedNot imported because another item of the same app with the same external_id is pending, running or succeeded; duplicate_of_item_id names it. No video is created. Final.
canceledNot dispatched because the import was canceled. Final.
{
  "id": "imi_a1b2c3d4e5f6g7",
  "import_id": "imp_a1b2c3d4e5f6",
  "app_id": "app_k1l2m3n4o5",
  "status": "failed",
  "url": "https://cdn.example.com/courses/lesson-07.mp4",
  "external_id": "lesson-07",
  "title": "Lesson 7",
  "description": "",
  "tags": ["course-a"],
  "duration_seconds": 540,
  "visibility": "",
  "text_tracks": [],
  "video_id": "",
  "error": {
    "code": "input_not_found",
    "message": "The source URL answered 404. Check the URL, and that the object is still there."
  },
  "duplicate_of_item_id": "",
  "warnings": [],
  "estimated_cost_eur": 0.21,
  "cost_eur": 0,
  "created_at": "2026-11-30T09:00:00Z",
  "updated_at": "2026-11-30T09:20:31Z",
  "source_id": "",
  "source_file": null,
  "text_tracks_attached": 0
}

Create an import

POST /transcodely.v1.ImportService/Create

Creates an import in draft with its first batch of items (1 to 1,000). Nothing is fetched or encoded until Start. The response carries the quote.

Every item URL is checked up front: a URL that is not http(s), or that points at a private or internal address, fails the whole request with invalid_argument, error code invalid_input_url, and a field violation naming the item (items[3].url); nothing is stored. URLs are not fetched at this point: an unreachable URL fails its item later, with input_not_found.

ParameterTypeRequiredDescription
app_idstringNoApp to import into. API-key callers may omit it; portal sessions that omit it get the organization’s first active app.
sourceobjectYes{"type": "urls"}, or {"type": "vimeo", "vimeo": {...}} for a Vimeo library.
source.vimeo.access_tokenstringFor vimeoVimeo personal access token with the public, private and video_files scopes. Write-only.
source.vimeo.folder_idsarray of stringsNoVimeo folders to import, each with everything below it. Empty: the whole library.
source.vimeo.include_text_tracksbooleanNoAttach the videos’ Vimeo caption and subtitle tracks. Default true.
source.vimeo.visibility_mappingobjectNoPer Vimeo privacy setting, the visibility of the created videos. Omitted: the default mapping.
defaultsobjectNoSettings for every item (below). Omitted: visibility from the app’s default, the app’s default hosted ladder, no captions, no tags.
defaults.visibilitystringNopublic, unlisted or private. Empty: the app’s hosting default_visibility, else unlisted, the same rule as CreateFromUrl.
defaults.presetstringNoPreset ID or slug for every transcode. Empty: the app’s default hosted ABR ladder.
defaults.auto_captionsbooleanNoGenerate AI captions for every item. Default false. Free on hosted video.
defaults.auto_translationsarray of stringsNoTranslate the AI captions into these languages (ISO 639-2, at most 10). Requires auto_captions. Billed per source minute per language and included in the quote.
defaults.tagsarray of stringsNoTags for every video (at most 20). An item with its own non-empty tags uses those instead.
itemsarray of objectsFor urls1 to 1,000 items (below) for a urls import. Append more with AddItems. Must be empty for a vimeo import: its items are read from the library.
items[].urlstringYesPublicly reachable http(s) URL of the source video (max 2048 characters).
items[].external_idstringNoYour own ID for the source (max 255 characters), unique within the app among items that are pending, running or succeeded. The dedupe key.
items[].titlestringNoTitle of the video (max 255 characters).
items[].descriptionstringNoDescription of the video (max 2,000 characters).
items[].tagsarray of stringsNoTags of the video (at most 20). Empty: defaults.tags.
items[].duration_secondsnumberNoSource duration in seconds, if you know it (above 0, at most one week). Used only for the quote and the spend-cap reservation; the encode is billed on the real duration.
items[].visibilitystringNoVisibility of this item’s video. Empty: defaults.visibility.
items[].text_tracksarray of objectsNoCaption files (url, language, kind), at most 20. Accepted but not ingested yet; see Caption files.
max_spend_eurnumberNoSpend cap in EUR (above 0). Optional here; required by Start.
curl -X POST https://api.transcodely.com/transcodely.v1.ImportService/Create 
  -H "Authorization: Bearer {{API_KEY}}" 
  -H "Content-Type: application/json" 
  -d '{
    "source": { "type": "urls" },
    "defaults": { "visibility": "unlisted", "tags": ["imported"] },
    "items": [
      {
        "url": "https://cdn.example.com/courses/lesson-01.mp4",
        "external_id": "lesson-01",
        "title": "Lesson 1",
        "tags": ["course-a"],
        "duration_seconds": 612
      },
      {
        "url": "https://cdn.example.com/courses/lesson-02.mp4",
        "external_id": "lesson-02",
        "title": "Lesson 2"
      }
    ]
  }'
{
  "import": {
    "id": "imp_a1b2c3d4e5f6",
    "app_id": "app_k1l2m3n4o5",
    "status": "draft",
    "source": { "type": "urls" },
    "defaults": {
      "visibility": "unlisted",
      "preset": "",
      "auto_captions": false,
      "auto_translations": [],
      "tags": ["imported"]
    },
    "spent_eur": 0,
    "reserved_eur": 0,
    "quote": {
      "item_count": 2,
      "known_duration_seconds": 612,
      "unknown_duration_items": 1,
      "estimated_encode_eur": 0.24,
      "estimated_storage_eur_per_month": 0.01,
      "currency": "EUR",
      "free_encode_seconds_applied": 0
    },
    "counts": { "pending": 2, "running": 0, "succeeded": 0, "failed": 0, "skipped": 0, "canceled": 0 },
    "created_at": "2026-11-30T09:00:00Z",
    "updated_at": "2026-11-30T09:00:00Z"
  }
}

The amounts above are illustrative; your quote uses your app’s rate card.

Create an import of a Vimeo library

For a vimeo source, pass no items. The library is read when you call Create (the token in this request is the one used), and every importable video in folder_ids (all folders when empty) becomes an item: url is the Vimeo page (never a download link), external_id is vimeo:<id>, with the video’s title, description, tags (folder:<name> first), duration (so the quote is exact) and visibility from the mapping. Videos that cannot be imported become no item; they are listed in the mapping file with the reason. A library with more than 10,000 importable videos in the selection is refused: select folders and run several imports. A token Vimeo rejects is refused with invalid_argument, error code import_source_credentials_invalid.

curl -X POST https://api.transcodely.com/transcodely.v1.ImportService/Create 
  -H "Authorization: Bearer {{API_KEY}}" 
  -H "Content-Type: application/json" 
  -d '{
    "source": {
      "type": "vimeo",
      "vimeo": {
        "access_token": "{{VIMEO_TOKEN}}",
        "folder_ids": ["11223344"]
      }
    },
    "defaults": { "tags": ["from-vimeo"] },
    "max_spend_eur": 50
  }'

Add items

POST /transcodely.v1.ImportService/AddItems

Appends 1 to 1,000 items to a draft urls import, up to 10,000 items per import (skipped items included). A source-library (vimeo) import takes no added items. A call that would exceed that is refused with invalid_argument and appends nothing. Refused with failed_precondition, error code import_invalid_state, once the import has been started or canceled. Returns the import with its recomputed quote.

ParameterTypeRequiredDescription
idstringYesID of the import (imp_ prefix).
app_idstringNoApp of the import. API-key callers may omit it.
itemsarray of objectsYes1 to 1,000 items, as in Create.

Retrieve an import

POST /transcodely.v1.ImportService/Get

Returns the import with its quote, spend and per-status item counts. Poll it to follow progress, or listen for the webhooks.

ParameterTypeRequiredDescription
idstringYesID of the import.
app_idstringNoApp of the import. API-key callers may omit it.

List imports

POST /transcodely.v1.ImportService/List

Lists imports, newest first.

ParameterTypeRequiredDescription
app_idstringNoApp filter. API-key callers may omit it (their key’s app is used); portal sessions that omit it list every app in the organization.
statusstringNoOnly imports in this status, e.g. running.
paginationobjectNolimit (default 20, at most 100) and cursor (the next_cursor of the previous page).

Returns imports and pagination (next_cursor, empty on the last page).


Start an import

POST /transcodely.v1.ImportService/Start

Starts a draft import. A spend cap is required: pass max_spend_eur here, or set it at Create or with Update; with neither, the call is refused with invalid_argument on max_spend_eur. Refused with invalid_argument when the import has no pending items.

Start enables managed hosting on the app if it is not enabled yet, exactly as CreateFromUrl does, and refuses with the same errors when it cannot (hosting_provisioning_failed is safe to retry).

ParameterTypeRequiredDescription
idstringYesID of the import.
app_idstringNoApp of the import. API-key callers may omit it.
max_spend_eurnumberNoSpend cap in EUR (above 0). Replaces any cap set before. Required unless the import already has one.
curl -X POST https://api.transcodely.com/transcodely.v1.ImportService/Start 
  -H "Authorization: Bearer {{API_KEY}}" 
  -H "Content-Type: application/json" 
  -d '{ "id": "imp_a1b2c3d4e5f6", "max_spend_eur": 60 }'

The spend cap

The dispatcher reserves an item’s estimate only while spent_eur + reserved_eur + estimate stays within max_spend_eur, and pauses the import with spend_cap_reached otherwise. A pause stops new videos only. Videos already encoding finish, and a video whose length was not known in advance is counted at an estimate until it is measured, so the final spent_eur can exceed the cap by up to the cost of the videos in flight. The cap is in addition to the app’s monthly spend limit, which still applies to every video the import creates: whichever is lower stops the import. Reaching the app limit pauses it with spend_limit_reached.


Update the spend cap

POST /transcodely.v1.ImportService/Update

Changes an import’s spend cap, while the import is draft, running or paused. When the import is paused with spend_cap_reached, setting a cap resumes it (status running); the dispatcher pauses it again if the new cap still leaves no room for the next item. Lowering the cap below what is already spent and reserved stops further dispatch; items already dispatched finish.

ParameterTypeRequiredDescription
idstringYesID of the import.
app_idstringNoApp of the import. API-key callers may omit it.
max_spend_eurnumberYesNew spend cap in EUR (above 0).

Pause an import

POST /transcodely.v1.ImportService/Pause

Pauses a running import (pause_reason manual). Items already dispatched keep encoding; no new items are dispatched. Takes id and optional app_id.


Resume an import

POST /transcodely.v1.ImportService/Resume

Resumes a paused import, whatever paused it. Only items still pending are dispatched; failed items stay failed and go in a new import. If the cause is still there (the app spend limit is still reached, for example), the import pauses again with the same reason on the next dispatch. An import paused at its cap whose cap is still used up is refused with import_invalid_state: raise max_spend_eur with Update instead. Takes id and optional app_id.


Cancel an import

POST /transcodely.v1.ImportService/Cancel

Cancels a draft, running or paused import. Items not yet dispatched become canceled. Videos already being encoded finish, and their cost is still added to spent_eur. Refused with failed_precondition, error code import_invalid_state, for a completed or already canceled import. Takes id and optional app_id.


List an import’s items

POST /transcodely.v1.ImportService/ListItems

Lists an import’s items in submission order, optionally filtered by status. Each item carries the video it created (video_id), and failed items carry the standard error code and message.

ParameterTypeRequiredDescription
idstringYesID of the import.
app_idstringNoApp of the import. API-key callers may omit it.
statusstringNoOnly items in this status, e.g. failed for a retry list.
paginationobjectNolimit (default 20, at most 100) and cursor.
curl -X POST https://api.transcodely.com/transcodely.v1.ImportService/ListItems 
  -H "Authorization: Bearer {{API_KEY}}" 
  -H "Content-Type: application/json" 
  -d '{ "id": "imp_a1b2c3d4e5f6", "status": "failed", "pagination": { "limit": 100 } }'

Preview a source library

POST /transcodely.v1.ImportService/Preview

Reads a source library and says what an import of it would bring in and cost, without creating anything. For a vimeo source: the account’s folders (subfolders included) and videos, which videos can be imported and, for the rest, why not, and the quote for the importable videos in the selected folders. Nothing is stored and no download link is requested. Not available for a urls source.

Refused with invalid_argument, error code import_source_credentials_invalid, when Vimeo rejects the token, and with unavailable, error code import_source_rate_limited or import_source_unavailable, when the library cannot be read right now; retry later.

ParameterTypeRequiredDescription
app_idstringNoApp the import would create videos in; prices come from its rate card. API-key callers may omit it.
sourceobjectYesThe library to read: {"type": "vimeo", "vimeo": {"access_token": "...", "folder_ids": [...]}}. folder_ids selects which videos are listed and quoted; folders always lists the whole library.
defaultsobjectNoSettings the quote is computed with, as Create takes them (AI captions and translations change the quote).
curl -X POST https://api.transcodely.com/transcodely.v1.ImportService/Preview 
  -H "Authorization: Bearer {{API_KEY}}" 
  -H "Content-Type: application/json" 
  -d '{
    "source": {
      "type": "vimeo",
      "vimeo": { "access_token": "{{VIMEO_TOKEN}}", "folder_ids": ["11223344"] }
    }
  }'
{
  "preview": {
    "account": { "id": "123456789", "name": "Acme Academy", "plan": "" },
    "missing_scopes": [],
    "warnings": [],
    "folders": [
      { "id": "11223344", "name": "Course A", "parent_id": "", "video_count": 2 }
    ],
    "videos": [
      {
        "source_id": "76979871",
        "link": "https://vimeo.com/76979871",
        "title": "Lesson 1: Getting started",
        "duration_seconds": 612,
        "folder_id": "11223344",
        "view_privacy": "unlisted",
        "embed_privacy": "whitelist",
        "visibility": "unlisted",
        "importable": true,
        "reason_message": "",
        "source_file": { "quality": "source", "is_original": true, "width": 1920, "height": 1080, "size_bytes": "734003200" },
        "thumbnail_url": "https://i.vimeocdn.com/video/1234567_1280x720.jpg"
      },
      {
        "source_id": "76979872",
        "link": "https://vimeo.com/76979872",
        "title": "Lesson 2: The basics",
        "duration_seconds": 540,
        "folder_id": "11223344",
        "view_privacy": "password",
        "embed_privacy": "public",
        "visibility": "private",
        "importable": false,
        "reason": "no_download_access",
        "reason_message": "Vimeo offered no file to download for this video.",
        "source_file": null,
        "thumbnail_url": "https://i.vimeocdn.com/video/1234568_1280x720.jpg"
      }
    ],
    "counts": {
      "videos": 2,
      "importable": 1,
      "total_duration_seconds": "1152",
      "importable_duration_seconds": "612",
      "not_importable": { "no_download_access": 1 }
    },
    "quote": {
      "item_count": 1,
      "known_duration_seconds": 612,
      "unknown_duration_items": 0,
      "estimated_encode_eur": 0.13,
      "estimated_storage_eur_per_month": 0.01,
      "currency": "EUR",
      "free_encode_seconds_applied": 0
    }
  }
}

The amounts and the reason_message text above are illustrative.

The ImportPreview object

The preview field of the response.

AttributeTypeDescription
accountobjectThe Vimeo account the token belongs to: id, name, and plan as Vimeo names it, for reference only. Whether a video can be imported is decided per video, never from the plan.
missing_scopesarray of stringsRequired token scopes Vimeo says the token lacks. Empty when nothing is missing or Vimeo did not say.
warningsarray of stringsNotes about parts of the library Vimeo would not list. The videos are all there; some may be shown without their folder.
foldersarray of objectsEvery folder of the library: id (pass it in folder_ids), name, parent_id (empty for a top-level folder) and video_count as Vimeo counts them.
videosarray of objectsThe videos in the selected folders (all videos when none are selected), each with source_id (imported as external_id vimeo:<id>), link, title, duration_seconds, folder_id (the deepest folder that holds it), view_privacy and embed_privacy (Vimeo’s own settings), visibility (what the created video would get), importable, reason and reason_message when not importable, source_file (the file the import would fetch) and thumbnail_url.
countsobjectOver videos: videos, importable, total_duration_seconds, importable_duration_seconds, and not_importable per reason.
quoteobjectThe quote for the importable videos in videos, with defaults.

Update source credentials

POST /transcodely.v1.ImportService/UpdateSourceCredentials

Replaces an import’s source credential (a new Vimeo access token) on a draft, running or paused import. The token is checked against Vimeo first, and must belong to the same Vimeo account as the import; otherwise the call is refused with invalid_argument, error code import_source_credentials_invalid, and a message that says which. An import paused with source_credentials_invalid or source_credentials_expired resumes (status running). The new token is kept for 7 days.

ParameterTypeRequiredDescription
idstringYesID of the import.
app_idstringNoApp of the import. API-key callers may omit it.
vimeoobjectYesThe new credential. Only access_token is read.
curl -X POST https://api.transcodely.com/transcodely.v1.ImportService/UpdateSourceCredentials 
  -H "Authorization: Bearer {{API_KEY}}" 
  -H "Content-Type: application/json" 
  -d '{ "id": "imp_a1b2c3d4e5f6", "vimeo": { "access_token": "{{VIMEO_TOKEN}}" } }'

Returns the import, running again if it was paused for its credential.


Export the mapping file

POST /transcodely.v1.ImportService/ExportMapping

Downloads the mapping of an import’s source videos to the videos created from them, as CSV or JSON. Use it to swap the embeds on your site. One row per source video: the import’s items first, in submission order, then the source videos that could not be imported, with the reason.

ParameterTypeRequiredDescription
idstringYesID of the import.
app_idstringNoApp of the import. API-key callers may omit it.
formatstringNocsv or json. Default csv.
curl -X POST https://api.transcodely.com/transcodely.v1.ImportService/ExportMapping 
  -H "Authorization: Bearer {{API_KEY}}" 
  -H "Content-Type: application/json" 
  -d '{ "id": "imp_a1b2c3d4e5f6", "format": "json" }'
{
  "content_type": "application/json",
  "filename": "imp_a1b2c3d4e5f6-mapping.json",
  "content": "WwogIHsKICAgICJzb3VyY2VfaWQiOiAiNzY5Nzk4NzEiLAo..."
}

content_type is text/csv or application/json, filename a suggested file name, and content the file itself (base64 in JSON, as every bytes field). The CSV has a header row; the JSON is an array of objects, each carrying every column (empty when there is no value). The columns, in order (new columns are only ever added at the end):

ColumnWhat it holds
source_idThe source’s ID of the video (the Vimeo video ID).
source_urlThe video’s page on the source.
external_idThe item’s external_id (vimeo:<id>). Empty for a video that was not imported.
titleTitle.
statusThe item’s status (pending, running, succeeded, failed, skipped, canceled), or not_imported for a source video that never became an item.
video_idThe Transcodely video created from it.
player_urlThe video’s player URL, once the video can play.
embed_codeAn iframe embed snippet for that player, once the video can play.
video_visibilityThe created video’s visibility.
file_qualityWhich source file was imported: source for the original upload, else a rendition label such as hd.
file_is_originaltrue when the original upload was imported, false when a rendition Vimeo made was.
view_privacyVimeo’s privacy setting for the video, e.g. anybody or password.
embed_privacyVimeo’s embed setting, e.g. public or whitelist (an embed-domain allow-list). Recorded here only; it is not applied to the created video.
thumbnail_urlThe Vimeo thumbnail. Not imported as the poster.
text_tracks_attachedCaption and subtitle tracks attached to the created video.
error_codeWhy the item failed, when it did.
not_imported_reasonFor not_imported rows: no_download_access, not_owner or source_unavailable.
not_imported_messageFor not_imported rows: the reason in plain words.

In the CSV, a value that starts with =, +, -, @ or a tab gets a leading ' so a spreadsheet does not read it as a formula.


Deduplication

external_id is the dedupe key, unique within the app among items that are pending, running or succeeded. An item whose external_id is already held, including by an earlier item of the same request, is stored as skipped with duplicate_of_item_id naming the holder, and creates no video. Failed, canceled and skipped items do not hold their key, so submitting the same list again retries exactly the items that did not make it. Items without an external_id are never deduplicated. A Vimeo import sets external_id to vimeo:<id> on every item, so importing the same library again skips the videos already imported.


Caption files

Items accept text_tracks (caption file URLs) and return them, but they are not ingested yet: an item with text tracks carries the warning text_tracks_not_ingested. Add the files to the video once it is ready.

A Vimeo import is different: when an item’s video is ready, the Vimeo video’s caption and subtitle tracks are attached to it before the item settles, and text_tracks_attached counts them. Tracks marked inactive on Vimeo are not imported. A track the video cannot take (a language we do not support, or a second track of the same language and kind, such as en-US and en-GB subtitles) becomes the warning text_track_not_imported on the item, never a failure. Turn it off with source.vimeo.include_text_tracks false.


Webhook events

EventWhen
import.completedFired once, when no item of the import is pending or running any more.
import.pausedFired when the dispatcher pauses an import: its cap, the app spend limit, billing, hosting, or (for a Vimeo import) its source credential.

Each event carries the Import as it was at that moment. Subscribe through webhook endpoints like any other event. Every video an import creates also fires its own video events (video.ready, video.failed).


Errors

CodeStatusWhen
import_not_foundnot_foundNo import with that ID in your app or organization.
import_invalid_statefailed_preconditionThe action is not allowed in the import’s current status. The message names the status.
invalid_input_urlinvalid_argumentAn item URL is not public http(s). The field violation names the item.
hosting_provisioning_failedunavailableStart could not enable hosting on the app. Nothing changed; retry.
import_source_credentials_invalidinvalid_argumentVimeo rejected the token (mistyped, revoked, missing a scope), or a replacement token belongs to another Vimeo account. The message says which. Give a new token with the scopes named.
import_source_rate_limitedunavailableVimeo is rate limiting requests for the account; nothing was created. The message gives the retry time.
import_source_unavailableunavailableVimeo could not be read right now; nothing was created. Retry in a few minutes.

Item error codes

A Vimeo item that fails carries one of these in error.code, alongside the standard codes any item can carry:

CodeWhen
source_no_download_accessVimeo offered no file to download for the video when its turn came: the plan does not allow downloads through the API, the token lacks video_files, or Vimeo refused the video while the token itself still worked.
source_not_ownerThe video belongs to another Vimeo account.
source_unavailableThe video is gone from Vimeo, is not available there right now (processing, failed, over quota, a live event), or Vimeo kept failing to hand out its file.

A rate limit from Vimeo never fails an item: the item waits for Vimeo’s reset and is dispatched then. When a video’s fetch fails because its Vimeo download link no longer works (links expire), the item is sent again once with a freshly resolved link while the import still holds a working token, provided that failure cost nothing; the failed first video is deleted (a video.deleted webhook fires for it). A second fetch failure is final.

Run this against your own file

A free account runs standard-quality encodes up to 2 minutes, one at a time (a longer upload is shortened to its first 2 minutes), so the Quickstart runs with nothing set up but an API key.