Skip to content
Interlatent/Documentation
Ivy/Technical reference/Source connections

Source connections

Connection states, cloud permissions, import tools, and recovery for source workflows.

Check access before importing

get_account and get_capabilities report plan access and supported sources. list_storage_connections returns connection IDs, providers, permissions, and whether a connection is usable. Recheck access with verify_storage_connection; inspect its verified result and the returned connection state.

ResponseMeaningNext action
Usable connectionThe saved connection is ready to use.Verify it if the cloud grant may have changed.
connected: false with setupAdditional cloud setup is required.Apply the returned instructions and finish verification.
Pending read/write connectionA connection exists but is not usable yet.Complete the IAM role setup and verify it.
Already connectedA connection for this bucket and permission already exists.List connections and reuse its ID.
verified: falseThe current access check failed.Read the reason, fix the grant, and verify again.

AWS permissions and verification

create_storage_connection(provider="aws", bucket=..., permission="read", region=...) probes access. When setup is required, use the response’s bucket-policy or IAM-role instructions. Preserve any returned verification nonce when retrying. If the bucket already has a policy, merge the new statements before applying it; AWS put-bucket-policy replaces the whole policy.

  1. For import-only access, request permission="read" and follow the returned setup.
  2. For export access, request permission="read_write" with a chosen root_prefix. The AWS flow creates a pending connection and returns a trust policy and permission policy.
  3. Create the IAM role with those exact policies, including the connection-specific ExternalId condition. The returned policy reads the bucket and limits writes to the selected root.
  4. Call verify_storage_connection with the connection ID and the role ARN. If the role was just created, allow for IAM propagation before verifying again.
  5. Check verified=true and a usable connection before importing or writing exports.

Google Cloud permissions

create_storage_connection(provider="gcp", bucket=..., permission="read") checks bucket access. If it returns setup, apply its commands for the exact service account and bucket, then retry as instructed. Use verify_storage_connection(connection_id=...) to check the saved connection. Read/write access is a separate request with a storage root.

Source storage and copies

import_from_bucket takes an s3:// or gs:// URI, project ID, and an optional connection ID. sync_mode="origin" is the default and reads from source storage. sync_mode="mirror" copies the source tree into Interlatent storage. Keep origin objects and their access grants available for later playback and processing.

Bucket import argumentspython
import_from_bucket(
    uri="s3://YOUR_BUCKET/recordings/session-01/",
    project_id="PROJECT_ID",
    connection_id="CONNECTION_ID",
    sync_mode="origin",
    episode_limit=1,
)

Drive tools and import continuation

drive_service_account returns the email and share steps. list_shared_drive_folders returns directly shared folders, who shared them, and a continuation token when more are available. import_drive_folder(folder_link=..., project_id=...) accepts a folder link or discovered folder ID and returns an estimate. Review it before calling confirm_import.

  1. Share the intended folder directly as Viewer with the address Ivy returns, with notifications off.
  2. Discover it with list_shared_drive_folders and check its identity.
  3. Plan with import_drive_folder. Review bytes, skipped items, notes, and whether an ingestion script is needed.
  4. After approval, call confirm_import(ingest_id=...). Poll ingest_status at least five seconds apart.
  5. If the copied files need an ingestion script, write one against the existing ingest ID with the ingestion script tools below. They read the existing copy; keep polling ingest_status for the import it names.

Write an ingestion script for a custom layout

When ingest_status or an import reports needs_ingestion_script, no built-in reader reads the layout. That is a normal step, not an error: your agent writes an ingestion script, Python with discover(src) and convert_episode(ep, src, out) that maps the files onto one LeRobot v3 episode each. It organizes metadata and references the source videos; it never decodes or copies them. Nothing is imported until an ingestion script passes the verifier.

  1. Read the contract, the verifier’s requirements and the plan schema with get_annotation_sdk(topic="ingestion_script").
  2. Inspect the location with your own access: local copies, your cloud CLI, your Drive or Hugging Face tools, ffprobe and the format’s own documentation. The ingestion script itself is given only the location’s metadata files, never video or other binary types.
  3. Test the script on one episode with dry_run_ingestion_script(ingest_id, script) and poll get_dry_run(dry_run_id). Fix the script from the report and log until it passes. Test runs are metered.
  4. Call submit_ingestion_script(ingest_id, dry_run_id, plan) with the passing run and its ingestion plan. It starts importing every episode (metered); poll ingest_status(active_ingest_id).
  5. If submit_ingestion_script stops at an ingestion plan because accepting it would re-import recordings already imported, show the user present_ingestion_plan(ingest_id) and call accept_ingestion_plan only on their go-ahead. Annotations on the old recordings do not carry over. reject_ingestion_plan discards it.

Upload protocol and preparation

Direct HTTPS files use import_video_url. Terminal agents use the upload tools below. After a single-video import or upload, poll get_video until the duration is present; it also provides the recovery path when preparation failed to start.

InputTool sequence
Local video from a terminalprepare_video_upload → upload bytes → complete_video_upload → get_video
Local dataset directory from a terminalprepare_directory_upload → upload each file → complete_directory_upload → ingest_status
Direct HTTPS video fileimport_video_url → get_video
Hugging Face repositoryhuggingface_search → huggingface_import → ingest_status → list_videos

Import completion and sample limits

Keep the returned ingest ID and poll ingest_status at intervals of at least five seconds. Follow its active import ID when copying leads to an ingestion script run. Once it reports completion, use list_videos(project_id=..., limit=100) and continue with next_offset as needed. Review imported, skipped, and failed counts rather than treating a submitted request as success.

SituationWhat to do
The source cannot enforce the sample limitNothing starts for that refused request. Keep the limit; use a compatible source or prepare a smaller collection.
A copy or import is still runningContinue polling the existing import instead of submitting a duplicate.
The recording layout needs clarificationDescribe episode boundaries, cameras, metadata files, and what should become recorded channels.
A Drive copy needs an ingestion scriptWrite one against the existing import with the ingestion script tools when authorized.
You need to stop a running importUse stop_ingest. Completed recordings stay; usage already incurred still applies.
You need to revoke a connectionReview its dependencies before detaching it. Detaching stops new work and can break origin recordings that depend on it.
Start hereQuickstartImport a Hugging Face dataset and analyze an episode with Ivy.Start hereConnect an agentConnect Claude Code, Codex, Cursor, or another compatible MCP agent to Interlatent’s Ivy for video datasets, hosted vision tools, and saved analysis.Start hereTrain vision models with an agentUse Ivy by Interlatent for vision model training and evaluation, available on every plan and billed from your credits.User manualRun batch video analysis with your agentA tested PushT walkthrough: import recordings, label actions, verify a pipeline, run a batch, query saved labels, and export a Dataset.User manualImport a datasetImport public or private Hugging Face datasets, video files, or recordings from connected storage.User manualAccess datasets from a coding agentDescribe the dataset you want, ask questions about its recordings, and turn the answers into a selection for vision model work with your MCP-compatible coding agent.User manualAmazon S3Let your agent analyze S3 recordings on hosted compute without downloading the collection into its local sandbox. Connect a bucket and verify a small import.User manualGoogle DriveShare a folder with Ivy, review the import plan, and bring the recordings into a project.User manualGoogle Cloud StorageGrant bucket access, verify the connection, and import recordings from a gs:// path.User manualFiles & video linksImport a single video, a direct download link, or a local recording directory.User manualFind & tag videosFind recordings by their visual content, save a selection as tags, and reuse it in later analysis.User manualObject trackingDetect objects, track their masks with SAM, and inspect the result before measuring motion or counting passages.User manualModels & analysisChoose the method for your question: actions, object locations, masks, or classifications.User manualSubtask segmentation & semantic trimmingPrompt Ivy to divide a video into meaningful steps, steer the boundaries and labels, and export selected sections as video clips.User manualTrim & process videoTrim video by timestamps or meaningful action sections, create processed views, and keep source and output times clear.User manualRun your first experimentsRun action labeling and object tracking on a small sample, then compare and apply the results.User manualReview & exportInspect annotations, correct errors, and export a Dataset snapshot.Technical referenceCore conceptsProjects, recordings, annotations, pipelines, and Dataset snapshots.Technical referencePython recipes & ffmpegRun repeatable measurements and video transformations with annotate(clip, ctx), then save outputs for review.Technical referenceQueries & tag operationsQuery saved annotations and recorded per-frame data with SQL, then use the matching clip IDs for tagging or export.Technical referenceSource connectionsConnection states, cloud permissions, import tools, and recovery for source workflows.Technical referenceTool referencePublic MCP tools grouped by task. Your connected agent provides the current schemas and availability.Technical referenceTroubleshootingResolve common connection, import, analysis, and access errors.ResourcesRights & data FAQAnswers about private video data, vision model ownership, provider handling, evaluation, and trial pricing with Interlatent.