Package-level declarations

Types

Link copied to clipboard

Pure policy: callers translate Android observations into UploadConditions.

Link copied to clipboard
data class AdaptiveUploadPreset(val name: String, val partSizeBytes: Long, val maxConcurrency: Int, val maxPartAttempts: Int, val partTimeoutSeconds: Long)

Resolved immutable multipart tuning values.

Link copied to clipboard

Administrative statistics and usage operations.

Link copied to clipboard

Forward-compatible administrative statistic item.

Link copied to clipboard

Administrative user-statistics result.

Link copied to clipboard
class AndroidLogcatDiagnostics(writer: AndroidLogWriter, val tag: String = "VModalSDK", val requestLevel: DiagnosticLogLevel = DiagnosticLogLevel.DEBUG, val responseLevel: DiagnosticLogLevel = DiagnosticLogLevel.INFO, val failureLevel: DiagnosticLogLevel = DiagnosticLogLevel.WARNING, val lineLimit: Int) : DiagnosticSink

DiagnosticSink that renders sanitized events as bounded Android Logcat lines.

Link copied to clipboard
fun interface AndroidLogWriter

Small boundary compatible with android.util.Log.println(priority, tag, message).

Link copied to clipboard
class ApiError(message: String, statusCode: Int = 0, body: Any? = null, details: Any? = null) : SdkError

A service request failed while preserving status and response details.

Link copied to clipboard
fun interface ApiKeyProvider

Supplies the current credential at request time.

Link copied to clipboard
class AuthError(message: String, statusCode: Int = 401, body: Any? = null, details: Any? = null) : SdkError

Authentication failed; callers should renew or replace credentials.

Link copied to clipboard

Authentication and availability operations. All methods block.

Link copied to clipboard

Administrative cache and limiter counters.

Link copied to clipboard

Additive transport capability for requests that can cancel their underlying HTTP call.

Link copied to clipboard
class Client(val cfg: SdkConfig, transport: VmodalTransport = HttpUrlConnectionTransport(cfg), signedUploads: SignedUploadTransport = OkHttpSignedUploadTransport(cfg.timeoutMillis.toLong()).withDiagnostics(cfg.diagnostics))

Main SDK entry point and owner of resource clients.

Link copied to clipboard
data class CollectionAddAssetsRequest(val collectionId: String, val assetIds: List<String>, val mode: String, val groupName: String, val streamName: String = "astream")

Request to associate existing asset identifiers with a collection.

Link copied to clipboard

Asset association result with forward-compatible raw data.

Link copied to clipboard

Forward-compatible collection asset item.

Link copied to clipboard

Description update result with forward-compatible raw data.

Link copied to clipboard

Collection discovery, mutation, metadata, and upload operations.

Link copied to clipboard

Coroutine counterpart of AdminResource. Safe reads retain retry behavior, cancellable transports are cancelled with the caller, and all typed SDK errors propagate unchanged.

Link copied to clipboard

Coroutine counterpart of AuthResource. Cancellable transports are cancelled with the caller; safe reads retain the blocking retry policy and failures retain their typed SdkError.

Link copied to clipboard

Coroutine-first view of an existing Client.

Link copied to clipboard

Coroutine counterpart of CollectionsResource. It retains blocking validation, request models, mutation no-retry behavior, typed errors, and disabled-operation behavior. Gateway requests use cancellable transport suspension; signed video cancellation also cancels its UploadHandle.

Link copied to clipboard

Coroutine counterpart of ImagesResource. Mutations are not retried, response limits remain enforced, cancellable transports are cancelled with the caller, and typed errors are preserved.

Link copied to clipboard

Coroutine counterpart of IndexesResource. Request validation and typed errors are shared with the blocking models; safe status/list calls retry, while create/delete mutations do not.

Link copied to clipboard

Coroutine counterpart of R2Resource. Safe presign reads retain retries, mutations do not retry, cancellation reaches cancellable transports, and typed SDK failures propagate unchanged.

Link copied to clipboard

Coroutine counterpart of SearchesResource. Validation uses SearchRequest, mutations are not retried, cancellation reaches cancellable transports, and typed SDK failures propagate unchanged.

Link copied to clipboard
data class DeleteCollectionRequest(val groupName: String, val mode: String, val scope: String = "all", val dryRun: Boolean = false, val confirm: Boolean = false)

Dry-run or confirmed collection deletion request.

Link copied to clipboard

Collection deletion result with forward-compatible raw data.

Link copied to clipboard
sealed class DiagnosticEvent

Immutable, sanitized network attempt event delivered to a DiagnosticSink.

Link copied to clipboard

Stable, message-free reason for a failed network attempt.

Link copied to clipboard

Android-compatible log priority used without adding an Android runtime dependency to core.

Link copied to clipboard

Safe request-shape metadata. It never retains request values or uploaded bytes.

Link copied to clipboard
fun interface DiagnosticSink

Consumer callback for already-sanitized diagnostic events.

Link copied to clipboard
Link copied to clipboard

Pre-authorized single-upload session details.

Link copied to clipboard
class FeatureDisabled(message: String) : SdkError

A compatibility entry point is unavailable and should not be retried.

Link copied to clipboard

File-backed checkpoint store with atomic replacement and recovery backup.

Link copied to clipboard

Legacy folder-upload item retained for compatibility.

Link copied to clipboard

Legacy disabled folder-upload response retained for compatibility.

Link copied to clipboard

Image content plus its resolved storage path.

Link copied to clipboard

Disabled compatibility resource whose methods fail before transport.

Link copied to clipboard

Typed collection group summary with version helpers.

Link copied to clipboard

Collection group page with normalized lookup support.

Link copied to clipboard

Typed availability result.

Link copied to clipboard

Default synchronous JVM transport with strict bounds and redirect handling.

Link copied to clipboard

Forward-compatible bulk image response.

Link copied to clipboard

Bulk image-content results.

Link copied to clipboard
data class ImageRecord(val mode: String = "", val groupName: String = "", val streamName: String = "astream", val filename: String = "", val frameId: String = "", val userid: String? = null)

Bulk image lookup record.

Link copied to clipboard

Base64 image-content result.

Link copied to clipboard

Typed image URL and image-content operations.

Link copied to clipboard

Bulk signed image URL results.

Link copied to clipboard
data class ImageUrlRecord(val mode: String = "", val groupName: String = "", val modality: String = "", val streamName: String = "astream", val filename: String = "", val tsUnix13digits: String? = null)

Bulk signed-image-URL lookup record.

Link copied to clipboard

Signed image URL lookup result.

Link copied to clipboard
data class IndexationDeleteRequest(val mode: String, val groupName: String, val version: String, val modality: String? = null, val dryRun: Boolean = false, val confirm: Boolean = false)

Index-version deletion request with confirmation controls.

Link copied to clipboard

Index deletion result.

Link copied to clipboard

Forward-compatible index job item.

Link copied to clipboard

Typed page of index jobs.

Link copied to clipboard

Current index job state.

Link copied to clipboard
data class IndexationSubmitRequest(val mode: String, val groupName: String, val streamName: String? = null, val indexType: String? = null, val modality: String? = null, val insertMode: String = "append", val createIndex: Boolean = true, val version: String = "new_version", val startDate: String? = null, val endDate: String? = null, val embeddingModel: String? = null, val reProcess: Boolean = false, val dryRun: Boolean = false)

Index creation request with lifecycle and date-range options.

Link copied to clipboard

Index job creation result.

Link copied to clipboard

Index creation, status, listing, and deletion operations.

Link copied to clipboard
open class JsonBackedResponse(val raw: Map<String, Any?> = emptyMap())

Base typed response that preserves unrecognized fields.

Link copied to clipboard
class MalformedResponse(message: String = "malformed JSON response") : SdkError

Structured response content could not be decoded.

Link copied to clipboard

Process-local thread-safe checkpoint store.

Link copied to clipboard

Metadata upload result with forward-compatible raw data.

Link copied to clipboard

Completed multipart object state.

Link copied to clipboard

Newly created multipart session.

Link copied to clipboard

Completed multipart part state.

Link copied to clipboard

Pre-authorized multipart part details.

Link copied to clipboard

Batch of pre-authorized multipart parts.

Link copied to clipboard

Reconciled multipart session status.

Link copied to clipboard

Thread-safe rotatable credential provider whose value is redacted in logs.

Link copied to clipboard
class OkHttpSignedUploadTransport(timeoutMillis: Long, client: OkHttpClient = OkHttpClient.Builder() .connectTimeout(timeoutMillis, java.util.concurrent.TimeUnit.MILLISECONDS) .readTimeout(timeoutMillis, java.util.concurrent.TimeUnit.MILLISECONDS) .writeTimeout(timeoutMillis, java.util.concurrent.TimeUnit.MILLISECONDS) .build()) : SignedUploadTransport

OkHttp implementation of SignedUploadTransport.

Link copied to clipboard

Built-in blocking and cancellable transport backed by one OkHttp request encoder.

Link copied to clipboard

One pre-authorized file in a folder-upload response.

Link copied to clipboard

Batch of pre-authorized folder-upload files.

Link copied to clipboard

Pre-authorized object upload details.

Link copied to clipboard
class R2Resource(http: VmodalHttp)

Low-level signed object-upload helpers. Prefer the video upload extensions.

Link copied to clipboard
class ResponseTooLarge(val limitBytes: Long, val observedBytes: Long) : SdkError

A bounded response exceeded limitBytes.

Link copied to clipboard
data class ScopedAddAssetsOptions(val mode: String = "vid_file")

Scoped add-assets behavior without organization fields.

Link copied to clipboard
data class ScopedAssetChanges(val mode: String = "vid_file", val description: String? = null, val tags: List<String>? = null)

Asset changes for the selected scope.

Link copied to clipboard
data class ScopedCreateIndexOptions(val mode: String = "vid_file", val indexType: String? = null, val modality: String? = null, val insertMode: String = "append", val createIndex: Boolean = true, val version: String = "new_version", val startDate: String? = null, val endDate: String? = null, val embeddingModel: String? = null, val reProcess: Boolean = false, val dryRun: Boolean = false)

Scoped index creation behavior without organization fields.

Link copied to clipboard
data class ScopedDeleteCollectionOptions(val mode: String = "vid_file", val scope: String = "all", val dryRun: Boolean = false, val confirm: Boolean = false)

Collection-wide deletion behavior without organization fields.

Link copied to clipboard
data class ScopedDeleteIndexOptions(val mode: String = "vid_file", val modality: String? = null, val dryRun: Boolean = false, val confirm: Boolean = false)

Scoped index deletion behavior without organization fields.

Link copied to clipboard
data class ScopedIndexJobsOptions(val status: String? = null, val mode: String? = null, val limit: Int = 200)

Scoped index job filters without organization fields.

Link copied to clipboard
data class ScopedMetadataOptions(val mode: String = "img_file", val writeMode: String = "append", val allowOverlap: Boolean = false)

Scoped metadata upload behavior without organization fields.

Link copied to clipboard
data class ScopedSearchOptions(val queryMetadata: Map<String, Any?>? = null, val imageQuery: String? = null, val mode: String = "vid_file", val searchSources: List<String> = listOf("ocr", "asr", "image"), val searchCombineMode: String = "union", val startDate: String? = null, val endDate: String? = null, val offset: Int = 0, val limit: Int = 50, val textEmbScoreMin: Double = 0.9, val imageEmbScoreMin: Double = 1.5, val versionLancedb: Int? = null)

Scoped search behavior without organization fields.

Link copied to clipboard
data class ScopedUploadOptions(val mode: String = "vid_file", val modality: String = "vid_raw", val ttl: Int, val uploadOptions: VideoUploadOptions = VideoUploadOptions())

Scoped signed-upload behavior without organization fields.

Link copied to clipboard
data class SdkConfig(val baseUrl: String = PUBLIC_GATEWAY_URL, val userId: String = "", val tenantId: String = "", val email: String = "", val token: String = "", val timeoutMillis: Int, val mode: String = "gateway", val maxRetries: Int = 1, val apiKeyProvider: ApiKeyProvider? = null)

Immutable client configuration.

Link copied to clipboard

Opt-in network diagnostics configuration. Disabled diagnostics are the default.

Link copied to clipboard
open class SdkError(message: String, val statusCode: Int = 0, val body: Any? = null, val details: Any? = null) : RuntimeException

Base SDK failure with optional status and structured diagnostic details.

Link copied to clipboard

Typed video search operations.

Link copied to clipboard
data class SearchRequest(val queryText: String = "", val queryMetadata: Map<String, Any?>? = null, val imageQuery: String? = null, val mode: String = "vid_file", val groupName: String = "agroup", val streamName: String = "astream", val searchSources: List<String> = listOf("ocr", "asr", "image"), val searchCombineMode: String = "union", val startDate: String? = null, val endDate: String? = null, val offset: Int = 0, val limit: Int = 50, val textEmbScoreMin: Double = 0.9, val imageEmbScoreMin: Double = 1.5, val versionLancedb: Int? = null)

Validated multimodal search request and its optional filters.

Link copied to clipboard

Typed search result page with counts and elapsed time.

Link copied to clipboard

Forward-compatible search result item.

Link copied to clipboard
data class SignedUploadResult(val statusCode: Int, val etag: String = "", val localMd5: String = "")

Completion details returned by a signed upload transport.

Link copied to clipboard

Injectable asynchronous byte transport for pre-authorized upload locations.

Link copied to clipboard

Disabled compatibility resource whose methods fail before transport.

Link copied to clipboard

Connectivity failed before a usable response was received.

Link copied to clipboard
data class UploadConditions(val networkType: UploadNetworkType = UploadNetworkType.UNKNOWN, val networkSpeed: UploadNetworkSpeed = UploadNetworkSpeed.UNKNOWN, val deviceMemory: UploadDeviceMemory = UploadDeviceMemory.STANDARD)

Platform observations supplied to AdaptiveUploadPolicy.

Link copied to clipboard

Coarse memory capacity used to limit concurrent upload work.

Link copied to clipboard

Cancellation handle shared by all requests in one asynchronous upload.

Link copied to clipboard

Coarse caller-observed network speed.

Link copied to clipboard

Caller-observed network transport used by adaptive upload policy.

Link copied to clipboard
data class UploadProgress(val uploadedBytes: Long, val totalBytes: Long)

Immutable byte progress with a clamped whole-number percentage.

Link copied to clipboard

Legacy multipart endpoint response retained for source compatibility.

Link copied to clipboard

Durable checkpoint contract used to resume multipart uploads.

Link copied to clipboard

Shared checkpoint-store factories and defaults.

Link copied to clipboard
class UploadSource(val fileName: String, val contentLength: Long, val contentType: String = guessContentType(fileName), val sourceId: String = fileName, val versionTag: String = "", rangeOpener: (Long) -> InputStream? = null, opener: () -> InputStream)

Reopenable media input used by signed uploads.

Link copied to clipboard

Usage totals for one user and date.

Link copied to clipboard

Authenticated credential-owner profile.

Link copied to clipboard
class ValidationFailed(message: String, statusCode: Int = 422, body: Any? = null, details: Any? = null) : SdkError

Input validation failed; correct the request before retrying.

Link copied to clipboard

Ordered results for a bulk video upload.

Link copied to clipboard
sealed class VideoUploadEvent

Events emitted while one signed video upload is collected.

Link copied to clipboard
data class VideoUploadOptions(val multipart: Boolean = false, val multipartThresholdBytes: Long = 100L * 1024 * 1024, val partSizeBytes: Long = 64L * 1024 * 1024, val maxConcurrency: Int = 4, val maxPartAttempts: Int = 5, val partTimeoutSeconds: Long = 300, val resume: Boolean = true, val sessionStore: UploadSessionStore = UploadSessionStores.memory, val adaptiveConditions: UploadConditions? = null)

Signed-upload policy including retry, resume, cancellation, and explicit multipart behavior. Multipart is never selected implicitly by file size.

Link copied to clipboard

Complete signed video-upload result including resume and retry metadata.

Link copied to clipboard
object VModal

Preferred entry point for project, collection, and stream scoped Android integrations.

Link copied to clipboard
fun interface VmodalCancelHandle

Handle returned by a cancellable transport request.

Link copied to clipboard
class VmodalFilePart(val fieldName: String, val fileName: String, val contentLength: Long, val contentType: String = "application/octet-stream", opener: () -> InputStream)

Reopenable multipart file part used by low-level collection helpers.

Link copied to clipboard
class VmodalHttp(val cfg: SdkConfig, val transport: VmodalTransport = HttpUrlConnectionTransport(cfg))

Supported low-level request facade used by resource classes.

Link copied to clipboard
object VmodalJson

Strict, bounded JSON facade shared by SDK models and low-level integrations.

Link copied to clipboard

Immutable client for one developer-owned project.

Link copied to clipboard
data class VmodalRequest(val method: String, val path: String, val queryParameters: Map<String, Any?> = emptyMap(), val headers: Map<String, String> = emptyMap(), val jsonBody: Any? = null, val formFields: Map<String, Any?> = emptyMap(), val files: List<VmodalFilePart> = emptyList())

Transport-neutral request value used by injectable VmodalTransport implementations.

Link copied to clipboard
data class VmodalResponse(val statusCode: Int, val body: String = "", val headers: Map<String, List<String>> = emptyMap(), val bytes: ByteArray = body.toByteArray(StandardCharsets.UTF_8))

Bounded transport response with lazy structured decoding.

Link copied to clipboard

Immutable operation scope for one project, collection, and stream.

Link copied to clipboard
interface VmodalTransport

Injectable synchronous transport contract.

Link copied to clipboard

Exactly-once callback for CancellableVmodalTransport.

Properties

Link copied to clipboard

Default maximum in-memory binary response size.

Link copied to clipboard

Maximum response-preview length accepted by SdkDiagnostics.

Link copied to clipboard

Default maximum error response size.

Link copied to clipboard

Default maximum structured response size.

Link copied to clipboard

Published SDK semantic version.

Functions

Link copied to clipboard
fun filePart(fieldName: String, file: File, contentType: String = guessContentType(file.name)): VmodalFilePart

Creates a reopenable part backed by file.

Link copied to clipboard
fun streamPart(fieldName: String, fileName: String, contentLength: Long, contentType: String = guessContentType(fileName), opener: () -> InputStream): VmodalFilePart

Creates a reopenable streaming part without retaining all bytes in memory.

Link copied to clipboard
fun CollectionsResource.videoUpload(source: UploadSource, collectionName: String, subCollectionName: String, mode: String = "vid_file", modality: String = "vid_raw", ttl: Int = 12600, options: VideoUploadOptions = VideoUploadOptions(), onProgress: (UploadProgress) -> Unit = {}): VideoUploadResponse

Blocking counterpart for workers and tests. Never call this method on Android's main thread.

Link copied to clipboard
fun CollectionsResource.videoUploadAsync(source: UploadSource, collectionName: String, subCollectionName: String, mode: String = "vid_file", modality: String = "vid_raw", ttl: Int = 12600, options: VideoUploadOptions = VideoUploadOptions(), onProgress: (UploadProgress) -> Unit = {}, onSuccess: (VideoUploadResponse) -> Unit, onFailure: (Exception) -> Unit): UploadHandle

Starts a non-blocking, cancelable upload and returns its UploadHandle.

Link copied to clipboard
fun CollectionsResource.videoUploadBulk(sources: List<UploadSource>, collectionName: String, subCollectionName: String, mode: String = "vid_file", modality: String = "vid_raw", ttl: Int = 12600, options: VideoUploadOptions = VideoUploadOptions()): VideoUploadBulkResponse

Uploads sources sequentially on the calling worker thread.

Link copied to clipboard
fun CollectionsResource.videoUploadBulkAsync(sources: List<UploadSource>, collectionName: String, subCollectionName: String, mode: String = "vid_file", modality: String = "vid_raw", ttl: Int = 12600, options: VideoUploadOptions = VideoUploadOptions(), onProgress: (UploadProgress) -> Unit = {}, onSuccess: (VideoUploadBulkResponse) -> Unit, onFailure: (Exception) -> Unit): UploadHandle

Starts a cancelable bulk upload and reports aggregate byte progress.