Skip to content

voplica.api.ai.model

The protobuf package voplica.api.ai.model: 3 services, 69 messages and 1 enum, defined in voplica/api/ai/model/model.proto, voplica/api/ai/model/model_import.proto, voplica/api/ai/model/model_variant.proto.

Each method is called as POST https://api.voplica.com/voplica.api.ai.model.ModelService/<Method> with its request message as JSON and your API key (Authentication); a method marked Anonymous allowed also answers without one. See the JSON API.

Method Request Response Description
CreateModel CreateModelRequest CreateModelResponse
GetModel GetModelRequest GetModelResponse Anonymous allowed.
GetModelLikenessDisclosure GetModelLikenessDisclosureRequest GetModelLikenessDisclosureResponse Anonymous allowed. Get model likeness disclosure by Id
GetModelMetadata GetModelMetadataRequest GetModelMetadataResponse Anonymous allowed.
UpdateModel UpdateModelRequest UpdateModelResponse
UpdateModelLikenessDisclosure UpdateModelLikenessDisclosureRequest UpdateModelLikenessDisclosureResponse
DeleteModel DeleteModelRequest DeleteModelResponse Deletes Model, including all attached Model Variants
ListModels ListModelsRequest ListModelsResponse Anonymous allowed.

Import Models / Model Variants / model files from Civitai and HuggingFace.

Each method is called as POST https://api.voplica.com/voplica.api.ai.model.ModelImportService/<Method> with its request message as JSON and your API key (Authentication); a method marked Anonymous allowed also answers without one. See the JSON API.

Method Request Response Description
ResolveExternalModel ResolveExternalModelRequest ResolveExternalModelResponse Inspect an external model (Civitai model or version URL) or repository (HuggingFace URL) with the caller’s stored token. A missing/invalid token is reported in token_status with no summary (not an error) so the studio can ask for the token.
ImportModel ImportModelRequest ImportModelResponse Create a Model + one variant per selected version + empty preview assets, then start the background download job.
ImportModelVariant ImportModelVariantRequest ImportModelVariantResponse One external version into an existing model of the caller.
ImportModelVariantFiles ImportModelVariantFilesRequest ImportModelVariantFilesResponse Model files only (Civitai version files or HuggingFace repository files) into an existing variant whose asset is UNLOCKED.
GetModelImport GetModelImportRequest GetModelImportResponse
ListModelImports ListModelImportsRequest ListModelImportsResponse
CancelModelImport CancelModelImportRequest CancelModelImportResponse

Each method is called as POST https://api.voplica.com/voplica.api.ai.model.ModelVariantService/<Method> with its request message as JSON and your API key (Authentication); a method marked Anonymous allowed also answers without one. See the JSON API.

Method Request Response Description
CreateModelVariant CreateModelVariantRequest CreateModelVariantResponse
GetModelVariant GetModelVariantRequest GetModelVariantResponse Anonymous allowed.
GetRecommendedBaseModelVariant GetRecommendedBaseModelVariantRequest GetRecommendedBaseModelVariantResponse Anonymous allowed. Returns recommended base model valiant to use based on the provided criteria
GetRecommendedControlNetModelVariant GetRecommendedControlNetModelVariantRequest GetRecommendedControlNetModelVariantResponse Anonymous allowed. Returns recommended controlnet model valiant
GetModelVariantMetadata GetModelVariantMetadataRequest GetModelVariantMetadataResponse Anonymous allowed.
UpdateModelVariant UpdateModelVariantRequest UpdateModelVariantResponse
DeleteModelVariant DeleteModelVariantRequest DeleteModelVariantResponse Deletes Model Variant and detaches it from the Model
UpdateModelVariantPublishStatus UpdateModelVariantPublishStatusRequest UpdateModelVariantPublishStatusResponse
AddModelVariantPreviewAsset AddModelVariantPreviewAssetRequest AddModelVariantPreviewAssetResponse
DeleteModelVariantPreviewAsset DeleteModelVariantPreviewAssetRequest DeleteModelVariantPreviewAssetResponse
GetModelVariantFiles GetModelVariantFilesRequest GetModelVariantFilesResponse Will work only if download is enabled for the file variant
TriggerModelVariantVerification TriggerModelVariantVerificationRequest TriggerModelVariantVerificationResponse
UnlockModelVariantFilesModification UnlockModelVariantFilesModificationRequest UnlockModelVariantFilesModificationResponse
GetModelVariantPreviewAssets GetModelVariantPreviewAssetsRequest GetModelVariantPreviewAssetsResponse Anonymous allowed.
GetMultiModelVariant GetMultiModelVariantRequest GetMultiModelVariantResponse Anonymous allowed.
GetModelVariantRuntimeStates GetModelVariantRuntimeStatesRequest GetModelVariantRuntimeStatesResponse
Field Number Type Label Description
name 1 string Model name
visibility 2 voplica.types.base.VisibilityType Model visibility type. All models in the same inherit this visibility type.
revenue_sharing_preferred 3 bool If enabled, models in this by default will be set for revenue sharing (unless explicitly disabled per model)
model_type_metadata 4 voplica.types.ai.model.GenModelTypeMetadata Model type of the included models is inferred from the GenModelTypeMetadata
category 5 voplica.types.ai.common.SubjectCategory Category of the included models
description 6 string Optional description of the model
nsfw 7 bool Model is intended to produce NSFW content. If true then usage_for_nsfw_allowed should be true as well.
usage_for_nsfw_allowed 8 bool true means this model is allowed to be used for NSFW. false means this model should not be used for NSFW content. This must always be false if the content is based on the minor likeness.
based_on_likeness_category 9 voplica.types.base.LikenessCategory If the dataset is of a likeness of a real person or copyright non-free content then the permission should be granted explicitly.
likeness_granted_permission_verification 10 voplica.types.base.LikenessGrantedPermissionVerification Verification for likeness granted permission
auto_publish 11 bool optional Absent = the platform default (true), so an older studio build never silently opts out.
Field Number Type Label Description
model_id 1 string
Field Number Type Label Description
model_id 1 string

No fields.

Field Number Type Label Description
model_id 1 string
Field Number Type Label Description
likeness_disclosure 1 voplica.types.base.LikenessDisclosure
Field Number Type Label Description
model_id 1 string
Field Number Type Label Description
model_metadata 1 voplica.types.ai.model.GenModelMetadata
Field Number Type Label Description
id 1 string oneof attribute
idempotency_key 2 string oneof attribute
fields_fetching_options 3 ModelFieldsFetchingOptions
Field Number Type Label Description
model 1 voplica.types.ai.model.GenModel
Field Number Type Label Description
owner_id 1 string optional
output_file_type 2 voplica.types.base.FileType optional
model_family 3 voplica.types.ai.common.ModelFamily optional
model_type 4 voplica.types.ai.common.ModelType optional
visibility 5 voplica.types.base.VisibilityType optional
compatible_with_subscription 6 voplica.types.subscription.StudioSubscriptionType optional Returns models that don’t require any subscriptions OR that are compatible with the provided subscription
category 7 voplica.types.ai.common.SubjectCategory optional
nsfw 8 bool optional true means to return NSFW models only. false means to exclude NSFW models. unset means to return both NSFW and SFW models.
only_nsfw_allowed_models 9 bool true means to return only those models, that are allowed to be used for NSFW content. false means to return both that are allowed or not allowed to be used for NSFW content.
base_models_only 10 bool true means to returns models with marked with the flag base_model = true only. false means any models.
status 11 voplica.types.base.PublishStatus optional
only_with_verified_model_variants 12 bool true means to returns models with marked with the flag has_published_valid_model_variants = true only.
only_with_enabled_inference 13 bool true means to returns models with marked with the flag has_published_inference_enabled_variant = true only.
only_with_enabled_training 14 bool true means to returns models with marked with the flag has_published_training_enabled_variant = true only.
query 15 string optional Case-insensitive model NAME substring search (‘%term%’), composed with every other filter above. Server-side guards: blank after trim = no filter; 1 char after trim = INVALID_ARGUMENT (min 2 chars); capped at 100 chars. When set, results are ordered by created_at (keyset) regardless of the requested trending/last-variant sort key — mirrors the Voices/Characters query relation semantics.
Field Number Type Label Description
filters 1 ListModelsFilters optional
limit 2 int64 Max amount of elements per page
sort 3 ListModelsSorting How to sort results
fields_fetching_options 4 ModelFieldsFetchingOptions Extra options for fields fetching
cursor 10 string optional to continue pagination use next_token with before_cursor = false to fetch the next page or prev_token with before_cursor = true to fetch the previous page.
before 11 bool Used only with cursor. If false it means fetch data after cursor. If true it means fetch data before cursor.
check_more_available 12 bool Check limit + 1 to know if there is more data available By default is is false. Meaning that more_available flag won’t be returned. In this case, the only way to verify that there is any data available is to fetch the next page. Generally this should not be used for infinite scrolls, but can be used if we have buttons like next, previous.
Field Number Type Label Description
models 1 voplica.types.ai.model.GenModel repeated
next_token 2 string optional Token to pass in the next query’s Pagination directive to go to the next page It will be missing if this request didn’t return any data (i.e. no more data available) If it’s missing the last used cursor is essentially the next_token
prev_token 3 string optional Token to pass in the next query’s Pagination directive to go to the previous page It will be missing if this request didn’t return any data (i.e. no more data available) If it’s missing the last used cursor is essentially the prev_token
more_available 4 bool optional Returns if there is more data available (i.e. checks limit + 1). Returned only if check_more_available is set to true
Field Number Type Label Description
sort_key 1 ModelSortKey
asc_sort 2 bool
Field Number Type Label Description
default_preview_retriever 1 voplica.types.file.FilesRetriever optional If provided, the found file variant groups will be returned for the default preview asset
Field Number Type Label Description
use_variant_id 1 string oneof strategy
use_latest_variant 2 google.protobuf.Empty oneof strategy
Field Number Type Label Description
model_id 1 string
based_on_likeness_category 2 voplica.types.base.LikenessCategory optional The category this model’s subject falls under. Omitted = unchanged.
likeness_granted_permission_verification 3 voplica.types.base.LikenessGrantedPermissionVerification optional The proof, in the shape the create form and the import wizard already build. Omitted = unchanged. A permission_granted strategy REPLACES the stored identification and the stored document asset ids wholesale (it is a declaration, not a patch): sending it with an empty obtained_permission_asset_ids removes every document.
Field Number Type Label Description
likeness_disclosure 1 voplica.types.base.LikenessDisclosure
Field Number Type Label Description
model_id 1 string
model_name 2 string optional
visibility 3 voplica.types.base.VisibilityType optional
model_type_metadata 4 voplica.types.ai.model.GenModelTypeMetadata optional Model type of the included models is inferred from the GenModelTypeMetadata
category 5 voplica.types.ai.common.SubjectCategory optional
revenue_sharing_preferred 6 bool optional
description 7 string optional
nsfw 8 bool optional The owner may set the flag either way (true or false).
usage_for_nsfw_allowed 9 bool optional
default_model_variant 10 ModelVariantSelectionStrategy optional
auto_publish 11 bool optional Patch semantics like every other field here; owner-scoped like every other field here.
Field Number Type Label Description
model 1 voplica.types.ai.model.GenModel
Field Number Type Label Description
id 1 string
Field Number Type Label Description
cancelled 1 bool
Field Number Type Label Description
id 1 string
Field Number Type Label Description
model_import 1 voplica.types.ai.model.ModelImport
Field Number Type Label Description
source_uri 1 string
model_fields 2 voplica.types.ai.model.ImportModelFields
variant_defaults 3 voplica.types.ai.model.ImportVariantFields Applied to every created variant.
versions 4 voplica.types.ai.model.ImportVersionSelection repeated Empty = every version whose family is supported.
idempotency_key 5 string optional
Field Number Type Label Description
model_id 1 string
import_id 2 string
model_variant_ids 3 string repeated
Field Number Type Label Description
model_variant_id 1 string
source_uri 2 string
external_file_ids 3 string repeated Empty = the primary supported model file (Civitai) / the file named by the URI (HuggingFace).
idempotency_key 4 string optional
Field Number Type Label Description
import_id 1 string
Field Number Type Label Description
parent_model_id 1 string
source_uri 2 string
version 3 voplica.types.ai.model.ImportVersionSelection
variant_fields 4 voplica.types.ai.model.ImportVariantFields
idempotency_key 5 string optional
Field Number Type Label Description
model_variant_id 1 string
import_id 2 string
Field Number Type Label Description
model_id 1 string optional
model_variant_id 2 string optional
active_only 3 bool Only PENDING / RUNNING / CANCELLING imports.
pagination 100 voplica.types.base.PaginationToken
Field Number Type Label Description
imports 1 voplica.types.ai.model.ModelImport repeated
pagination 100 voplica.types.base.PaginationTokenResponse
Field Number Type Label Description
source_uri 1 string
Field Number Type Label Description
token_status 1 voplica.types.ai.model.ExternalTokenStatus
model 2 voplica.types.ai.model.ExternalModelSummary oneof summary
repo 3 voplica.types.ai.model.ExternalRepoSummary oneof summary
quota 4 voplica.types.ai.model.ImportQuotaEstimate
Field Number Type Label Description
model_variant_id 1 string
preview_asset_id 2 string
Field Number Type Label Description
created_asset_id 1 string
Field Number Type Label Description
parent_model_id 1 string
variant_name 2 string Model version name
min_required_subscription 3 voplica.types.subscription.StudioSubscriptionType Minimum subscription level the user should have to use this model
revenue_share 4 bool optional If enabled, this model becomes eligible for revenue sharing. Absent ⇒ defaults from the parent model’s revenue_sharing_preferred.
download_allowed 5 bool If true anyone who can use the model will also be able to download model files. If false nobody will be able to download the model.
model_family 6 voplica.types.ai.common.ModelFamily
trigger_words 7 string repeated
based_on_model_variant_id 8 string optional Allows taking missing model variant files from another model variant. Useful when the model variant ships transformer weights only, but needs text encoder, vae, and other parts from a base model. Useful not to upload duplicate model files.
Field Number Type Label Description
id 1 string
asset_id 2 string ID of the Asset that should be used to upload Files of the Model Variant. The Asset will be unlocked for user’s modifications. When all files are uploaded, the user should call TriggerModelVariantVerification to lock the asset and verify that asset variant files are valid for inference and / or models training.
Field Number Type Label Description
model_variant_id 1 string
preview_asset_id 2 string

No fields.

Field Number Type Label Description
model_variant_id 1 string

No fields.

Field Number Type Label Description
model_variant_id 1 string
file_variant_filter 10 voplica.types.file.FileVariantFilter repeated
Field Number Type Label Description
model_asset_files 1 voplica.types.file.AssetFileVariantGroups
Field Number Type Label Description
id 1 string
Field Number Type Label Description
model_variant_metadata 1 voplica.types.ai.model.GenModelVariantMetadata
Field Number Type Label Description
model_variant_id 1 string
asset_id_filter 2 string optional Optionally filter by asset_id. If not provided - all preview assets are returned.
previews_retriever 3 voplica.types.file.FilesRetriever optional If provided, the found file variant groups will be returned for each preview asset (or for the asset that matched asset_id_filter if provided)
Field Number Type Label Description
all_previews 1 voplica.types.file.AssetFileVariantGroups repeated 0 to 10 images / videos for model variant preview Note: file_variant_groups are returned only if requested explicitly
Field Number Type Label Description
id 1 string oneof attribute
idempotency_key 2 string oneof attribute
fields_fetching_options 3 ModelVariantFieldsFetchingOptions
Field Number Type Label Description
model_variant 1 voplica.types.ai.model.ModelVariant
Field Number Type Label Description
variant_ids 1 string repeated
Field Number Type Label Description
entries 1 ModelVariantRuntimeStateEntry repeated One entry per REQUESTED id, in request order, including the ids nothing is known about (state UNSPECIFIED) - so a client can index by position without a second lookup.
Field Number Type Label Description
ids 1 string repeated
with_parent 2 bool
with_metadata 3 bool
Field Number Type Label Description
model_pairs 1 ModelVariantWithParentModel repeated
Field Number Type Label Description
compatible_lora_model_family 1 voplica.types.ai.common.ModelFamily optional If provided it will return only model that is compatible with lora of this model family
output_file_type 2 voplica.types.base.FileType optional If specific it will return recommended model that can produce this output type
Field Number Type Label Description
model_variant 1 voplica.types.ai.model.ModelVariant optional

GetRecommendedControlNetModelVariantRequest

Section titled “GetRecommendedControlNetModelVariantRequest”
Field Number Type Label Description
base_model_family_compatibility 1 voplica.types.ai.common.ModelFamily optional If provided returns controlnet that is compatible with this model family
controlnet_type 2 voplica.types.ai.common.ControlnetType optional

GetRecommendedControlNetModelVariantResponse

Section titled “GetRecommendedControlNetModelVariantResponse”
Field Number Type Label Description
model_variant 1 voplica.types.ai.model.ModelVariant optional
Field Number Type Label Description
default_preview_retriever 1 voplica.types.file.FilesRetriever optional If provided, the found file variant groups will be returned for the default preview asset
Field Number Type Label Description
variant_id 1 string
state 2 voplica.types.ai.common.ModelVariantRuntimeState
Field Number Type Label Description
model_variant 1 voplica.types.ai.model.ModelVariant
parent_model 2 voplica.types.ai.model.GenModel optional
model_variant_metadata 3 voplica.types.ai.model.GenModelVariantMetadata optional
revenue_share_eligible 4 bool optional Populated only for the owner.
Field Number Type Label Description
model_variant_id 1 string
Field Number Type Label Description
workflow_id 1 string

UnlockModelVariantFilesModificationRequest

Section titled “UnlockModelVariantFilesModificationRequest”
Field Number Type Label Description
model_variant_id 1 string

UnlockModelVariantFilesModificationResponse

Section titled “UnlockModelVariantFilesModificationResponse”

No fields.

Field Number Type Label Description
id 1 string
status 2 voplica.types.base.PublishStatus
Field Number Type Label Description
status 1 voplica.types.base.PublishStatus
Field Number Type Label Description
model_variant_id 1 string
variant_name 2 string optional
min_required_subscription 3 voplica.types.subscription.StudioSubscriptionType optional
revenue_share 4 bool optional
download_allowed 5 bool optional
model_family 6 voplica.types.ai.common.ModelFamily optional
trigger_words 7 string repeated Trigger words are always provided during an update. An empty list means unchanged; set clear_trigger_words to remove every trigger word.
default_preview 8 voplica.types.file.AssetSelectionStrategy optional
based_on_model_variant_id 9 string optional An empty string removes based_on_model_variant_id from the model variant.
clear_trigger_words 10 bool Remove every trigger word. A plain bool, not optional: absent and false are the SAME instruction (“leave the trigger words alone”), so an optional wrapper would invite a third state with no meaning (same reasoning as GetMultiModelVariantRequest.with_parent). Sending clear_trigger_words = true together with a non-empty trigger_words is a contradiction and is refused with INVALID_ARGUMENT rather than silently resolved.
sampling_regime 11 voplica.types.ai.model.ModelVariantSamplingRegime optional The manual raw / step-distilled declaration (see ModelVariantSamplingRegime). Absent leaves it as it is, SAMPLING_REGIME_UNSPECIFIED clears it and lets the model family decide, and either concrete value sets it.
declared_external_ref 12 string optional
Field Number Type Label Description
model_variant 1 voplica.types.ai.model.ModelVariant
Name Number Description
MODEL_SORT_KEY_UNSPECIFIED 0
CREATED_AT 1
LAST_MODEL_VARIANT_CREATED 2
TRENDING_SCORE 3