syntax = "proto3"; package model.v1alpha; // common definitions import "common/healthcheck/v1beta/healthcheck.proto"; import "common/run/v1alpha/run.proto"; import "common/task/v1alpha/task.proto"; // Google API import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/longrunning/operations.proto"; // Protobuf standard import "google/protobuf/field_mask.proto"; import "google/protobuf/struct.proto"; import "google/protobuf/timestamp.proto"; // Core definitions import "mgmt/v1beta/mgmt.proto"; // Model definitions import "model/v1alpha/common.proto"; import "model/v1alpha/model_definition.proto"; // LivenessRequest represents a request to check a service liveness status message LivenessRequest { // HealthCheckRequest message optional common.healthcheck.v1beta.HealthCheckRequest health_check_request = 1 [(google.api.field_behavior) = OPTIONAL]; } // LivenessResponse represents a response for a service liveness status message LivenessResponse { // HealthCheckResponse message common.healthcheck.v1beta.HealthCheckResponse health_check_response = 1; } // ReadinessRequest represents a request to check a service readiness status message ReadinessRequest { // HealthCheckRequest message optional common.healthcheck.v1beta.HealthCheckRequest health_check_request = 1 [(google.api.field_behavior) = OPTIONAL]; } // ReadinessResponse represents a response for a service readiness status message ReadinessResponse { // HealthCheckResponse message common.healthcheck.v1beta.HealthCheckResponse health_check_response = 1; } // Region describes the supported cloud provider and regions, with // their supported GPU respectively. message Region { // Concatenate name of provider and region string region_name = 1; // Hardware describes the available hardware types in this region repeated Hardware hardware = 2; } // Hardware describes the hardware title and string value that backend consumes. message Hardware { // Hardware display title string title = 1; // Hardware name value string value = 2; } // State describes the state of a model. See [Deploy // Models](https://instill-ai.dev/docs/latest/model/deploy) for more // information. enum State { // Unspecified. This state can occur while a model is under operation. STATE_UNSPECIFIED = 0; // Offline is the state when the model instance number is 0. STATE_OFFLINE = 1; // Active is the state when a model is processing requests. STATE_ACTIVE = 2; // Idle is the state when a model is alive but not processing requests. STATE_IDLE = 3; // Error is the state when the model is undeployable. STATE_ERROR = 4; // Starting is the state when the system is provisioning the necessary // resources for the model STATE_STARTING = 5; // Scaling Up is the transition state when the system is provisioning compute // resource for this model instance. STATE_SCALING_UP = 6; // Scaling is the transition state when the system is releasing compute // resource for this model instance. STATE_SCALING_DOWN = 7; } // ModelVersion contains information about the version of a model. message ModelVersion { // The resource name of the model version. // Format: `namespaces/{namespace}/models/{model}/versions/{version}`. string name = 1 [(google.api.field_behavior) = IMMUTABLE]; // The model version identifier, which is equal to image tag. string version = 2 [(google.api.field_behavior) = IMMUTABLE]; // Unique identifier, computed from the manifest the Version refers to. string digest = 3 [(google.api.field_behavior) = OPTIONAL]; // Current state of this model version. State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; // Version update time, i.e. timestamp of the last push. google.protobuf.Timestamp update_time = 5 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.field_behavior) = OPTIONAL ]; } // Model represents an AI model, i.e. a program that performs tasks as decision // making or or pattern recognition based on its training data // Model represents an AI/ML model. // Field ordering follows AIP standard: name(1), id(2), display_name(3), // slug(4), aliases(5), description(6) message Model { option (google.api.resource) = { type: "api.instill.tech/Model" pattern: "namespaces/{namespace}/models/{model}" }; // Visibility defines who can access the model. enum Visibility { // Unspecified, equivalent to PRIVATE. VISIBILITY_UNSPECIFIED = 0; // Only the owner can see the model. VISIBILITY_PRIVATE = 1; // Other users can see the model. VISIBILITY_PUBLIC = 2; } // Statistic data message Stats { // Number of model runs. int32 number_of_runs = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Last run time. google.protobuf.Timestamp last_run_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // ===== Standard AIP fields 1-6 (ALL resources must follow this order) ===== // Field 1: Canonical resource name. // Format: `namespaces/{namespace}/models/{model}`. string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Field 2: Immutable canonical resource ID (80-96 bits entropy, base62). // Example: "mod-8f3a2k9E7c1" string id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Field 3: Human-readable display name for UI. string display_name = 3 [(google.api.field_behavior) = REQUIRED]; // Field 4: URL-friendly slug (NO prefix). // If omitted, server generates from display_name. // Slug is NOT part of resource identity. string slug = 4 [(google.api.field_behavior) = OPTIONAL]; // Field 5: Previous slugs for backward compatibility. repeated string aliases = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; // Field 6: Optional description. optional string description = 6 [(google.api.field_behavior) = OPTIONAL]; // ===== Timestamps (common to all resources) ===== // Field 7: Creation time. google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // Field 8: Last update time. google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; // ===== Resource-specific fields start from field 9+ ===== // The model definition that has been used to import the model. string model_definition = 9 [ (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE ]; // Model configuration. This field is validated against the model // specification in the model definition. google.protobuf.Struct configuration = 10 [ (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE ]; // Model task. common.task.v1alpha.Task task = 11 [ (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE ]; // Model visibility. Visibility visibility = 12 [(google.api.field_behavior) = REQUIRED]; // Permission defines how the model can be used. Permission permission = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; // Region of choice for the particular provider to host the model. string region = 14 [ (google.api.field_behavior) = REQUIRED, (google.api.field_behavior) = IMMUTABLE ]; // Hardware of choice to serve the model. string hardware = 15 [(google.api.field_behavior) = REQUIRED]; // Input schema for the model. google.protobuf.Struct input_schema = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output schema for the model. google.protobuf.Struct output_schema = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; // Tags. repeated string tags = 18 [(google.api.field_behavior) = OPTIONAL]; // Version names. repeated string versions = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; // Statistic data. Stats stats = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; // README holds the model documentation. optional string readme = 21 [(google.api.field_behavior) = OPTIONAL]; // A link to the source code of the model (e.g. to a GitHub repository). optional string source_url = 22 [(google.api.field_behavior) = OPTIONAL]; // A link to any extra information. optional string documentation_url = 23 [(google.api.field_behavior) = OPTIONAL]; // License under which the model is distributed. optional string license = 24 [(google.api.field_behavior) = OPTIONAL]; // Model profile image in base64 format. optional string profile_image = 25 [(google.api.field_behavior) = OPTIONAL]; // ===== Owner and creator references ===== // Resource name of the owner namespace. string owner_name = 26 [(google.api.field_behavior) = OUTPUT_ONLY]; // Model owner (User or Organization). optional mgmt.v1beta.Owner owner = 27 [(google.api.field_behavior) = OUTPUT_ONLY]; // Full resource name of the user who created this model. // Format: `users/{user}` optional string creator_name = 28 [(google.api.field_behavior) = OUTPUT_ONLY]; // The user who created this model. optional mgmt.v1beta.User creator = 29 [(google.api.field_behavior) = OUTPUT_ONLY]; // Soft delete timestamp. google.protobuf.Timestamp delete_time = 30 [(google.api.field_behavior) = OUTPUT_ONLY]; } // ListPublicModelsRequest represents a request to list public models. message ListPublicModelsRequest { // The maximum number of models to return. If this parameter is unspecified, // at most 10 models will be returned. The cap value for this parameter is // 100 (i.e. any value above that will be coerced to 100). optional int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; // Page token. optional string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; // View allows clients to specify the desired model view in the response. optional View view = 3 [(google.api.field_behavior) = OPTIONAL]; // Include soft-deleted models in the result. optional bool show_deleted = 4 [(google.api.field_behavior) = OPTIONAL]; // Filter can hold an [AIP-160](https://google.aip.dev/160)-compliant filter // expression. // - Example: `create_time>timestamp("2000-06-19T23:31:08.657Z")`. optional string filter = 5 [(google.api.field_behavior) = OPTIONAL]; // Limit results to pipelines with the specified visibility. optional Model.Visibility visibility = 6 [(google.api.field_behavior) = OPTIONAL]; // Order by field, with options for ordering by `id`, `create_time` or // `update_time`. Format: `order_by=id` or `order_by=create_time desc`, // default is `asc`. optional string order_by = 7 [(google.api.field_behavior) = OPTIONAL]; } // ListPublicModelsResponse contains a list of public models. message ListPublicModelsResponse { // A list of model resources. repeated Model models = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Next page token. string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Total number of models. int32 total_size = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } // ListModelsRequest represents a request to list models. // Follows AIP-132: https://google.aip.dev/132 message ListModelsRequest { // The parent resource name. // Format: `namespaces/{namespace}` string parent = 1 [(google.api.field_behavior) = REQUIRED]; // The maximum number of models to return. If this parameter is unspecified, // at most 10 models will be returned. The cap value for this parameter is // 100 (i.e. any value above that will be coerced to 100). optional int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Page token. optional string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; // View allows clients to specify the desired model view in the response. optional View view = 4 [(google.api.field_behavior) = OPTIONAL]; // Include soft-deleted models in the result. optional bool show_deleted = 5 [(google.api.field_behavior) = OPTIONAL]; // Filter can hold an [AIP-160](https://google.aip.dev/160)-compliant filter // expression. // - Example: `create_time>timestamp("2000-06-19T23:31:08.657Z")`. optional string filter = 6 [(google.api.field_behavior) = OPTIONAL]; // Limit results to pipelines with the specified visibility. optional Model.Visibility visibility = 7 [(google.api.field_behavior) = OPTIONAL]; // Order by field, with options for ordering by `id`, `create_time` or // `update_time`. Format: `order_by=id` or `order_by=create_time desc`, // default is `asc`. optional string order_by = 8 [(google.api.field_behavior) = OPTIONAL]; } // ListModelsResponse contains a list of models. message ListModelsResponse { // A list of model resources. repeated Model models = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Next page token. string next_page_token = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Total number of models. int32 total_size = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; } // CreateModelRequest represents a request from a namespace to create a // model. // Follows AIP-133: https://google.aip.dev/133 message CreateModelRequest { // The parent resource name. // Format: `namespaces/{namespace}` string parent = 1 [(google.api.field_behavior) = REQUIRED]; // The properties of the model to be created. Model model = 2; } // CreateModelResponse contains the created model. message CreateModelResponse { // The created model resource. Model model = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } // GetModelRequest represents a request to fetch the details of a model // owned by a namespace. // Follows AIP-131: https://google.aip.dev/131 message GetModelRequest { // The resource name of the model. // Format: `namespaces/{namespace}/models/{model}` string name = 1 [(google.api.field_behavior) = REQUIRED]; // View allows clients to specify the desired model view in the response. optional View view = 2 [(google.api.field_behavior) = OPTIONAL]; } // GetModelResponse contains the requested model. message GetModelResponse { // The model resource. Model model = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } // UpdateModelRequest represents a request to update a model owned by a // namespace. // Follows AIP-134: https://google.aip.dev/134 message UpdateModelRequest { // The model resource to update. The model's `name` field identifies // the resource. Format: `namespaces/{namespace}/models/{model}` Model model = 1 [(google.api.field_behavior) = REQUIRED]; // The update mask specifies the subset of fields that should be modified. google.protobuf.FieldMask update_mask = 2 [(google.api.field_behavior) = REQUIRED]; } // UpdateModelResponse contains the updated model. message UpdateModelResponse { // The updated model resource. Model model = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } // DeleteModelRequest represents a request to delete a model owned by a // namespace. // Follows AIP-135: https://google.aip.dev/135 message DeleteModelRequest { // The resource name of the model to delete. // Format: `namespaces/{namespace}/models/{model}` string name = 1 [(google.api.field_behavior) = REQUIRED]; } // DeleteModelResponse is an empty response. message DeleteModelResponse {} // RenameModelRequest represents a request to rename a model message RenameModelRequest { // The resource name of the model to rename. // Format: namespaces/{namespace}/models/{model} string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference).type = "api.instill.tech/Model" ]; // The new resource ID. This will transform the resource name into // `namespaces/{namespace}/models/{new_model_id}`. string new_model_id = 2 [(google.api.field_behavior) = REQUIRED]; } // RenameModelResponse contains a renamed model. message RenameModelResponse { // The renamed model resource. Model model = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } // WatchModelVersionRequest represents a request to fetch current state of a // model message WatchModelVersionRequest { // The resource name of the model to watch. // Format: namespaces/{namespace}/models/{model} string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference).type = "api.instill.tech/Model" ]; // Model version string version = 2 [(google.api.field_behavior) = REQUIRED]; } // WatchModelVersionResponse contains the state of a model. message WatchModelVersionResponse { // State. State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Detail description of the state string message = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // WatchModelRequest represents a request to fetch // current state of the latest model version. message WatchModelRequest { // The resource name of the model to watch. // Format: namespaces/{namespace}/models/{model} string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference).type = "api.instill.tech/Model" ]; } // WatchModelResponse contains the state of the latest model // version. message WatchModelResponse { // State. State state = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Detail description of the state string message = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // ListModelVersionsRequest represents a request to list all the // versions of a model namespace of a namespace. // Follows AIP-132: https://google.aip.dev/132 message ListModelVersionsRequest { // The parent resource name (model). // Format: `namespaces/{namespace}/models/{model}` string parent = 1 [(google.api.field_behavior) = REQUIRED]; // The maximum number of versions to return. The default and cap values are 10 // and 100, respectively. optional int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Page number. optional int32 page = 3 [(google.api.field_behavior) = OPTIONAL]; } // ListModelVersionsResponse contains a list of models. message ListModelVersionsResponse { // A list of model resources. repeated ModelVersion versions = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Total number of versions. int32 total_size = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // The requested page size. int32 page_size = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The requested page offset. int32 page = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // DeleteModelVersionRequest represents a request to delete a model // version owned by a namespace. // Follows AIP-135: https://google.aip.dev/135 message DeleteModelVersionRequest { // The resource name of the model version to delete. // Format: `namespaces/{namespace}/models/{model}/versions/{version}` string name = 1 [(google.api.field_behavior) = REQUIRED]; } // DeleteModelVersionResponse is an empty response. message DeleteModelVersionResponse {} // TriggerModelVersionRequest represents a request to trigger a model // inference. message TriggerModelVersionRequest { // The resource name of the model version to trigger. // Format: `namespaces/{namespace}/models/{model}/versions/{version}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference).type = "api.instill.tech/Model" ]; // Model inference inputs. repeated google.protobuf.Struct task_inputs = 2 [(google.api.field_behavior) = REQUIRED]; } // TriggerModelVersionResponse contains the model inference results. message TriggerModelVersionResponse { // Task type. common.task.v1alpha.Task task = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Model inference outputs. repeated google.protobuf.Struct task_outputs = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // TriggerAsyncModelVersionRequest represents a request to trigger a model // inference asynchronously. message TriggerAsyncModelVersionRequest { // The resource name of the model version to trigger. // Format: `namespaces/{namespace}/models/{model}/versions/{version}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference).type = "api.instill.tech/Model" ]; // Model inference inputs. repeated google.protobuf.Struct task_inputs = 2 [(google.api.field_behavior) = REQUIRED]; } // TriggerAsyncModelVersionResponse contains the information to access the // status of an asynchronous model inference. message TriggerAsyncModelVersionResponse { // Long-running operation information. google.longrunning.Operation operation = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } // TriggerModelRequest represents a request to trigger a model // inference with the latest uploaded version. message TriggerModelRequest { // The resource name of the model to trigger (uses latest version). // Format: `namespaces/{namespace}/models/{model}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference).type = "api.instill.tech/Model" ]; // Model inference inputs. repeated google.protobuf.Struct task_inputs = 2 [(google.api.field_behavior) = REQUIRED]; } // TriggerModelResponse contains the model inference results. message TriggerModelResponse { // Task type. common.task.v1alpha.Task task = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Model inference outputs. repeated google.protobuf.Struct task_outputs = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // TriggerAsyncModelRequest represents a request to trigger a // model inference asynchronously with the latest uploaded version. message TriggerAsyncModelRequest { // The resource name of the model to trigger (uses latest version). // Format: `namespaces/{namespace}/models/{model}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference).type = "api.instill.tech/Model" ]; // Model inference inputs. repeated google.protobuf.Struct task_inputs = 2 [(google.api.field_behavior) = REQUIRED]; } // TriggerAsyncModelResponse contains the information to access // the status of an asynchronous model inference. message TriggerAsyncModelResponse { // Long-running operation information. google.longrunning.Operation operation = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } // TriggerModelVersionBinaryFileUploadRequest represents a request trigger a // model inference by uploading a binary file as the input. message TriggerModelVersionBinaryFileUploadRequest { // The resource name of the model version to trigger. // Format: `namespaces/{namespace}/models/{model}/versions/{version}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference).type = "api.instill.tech/Model" ]; // Inference input as a binary file. repeated google.protobuf.Struct task_input = 2 [(google.api.field_behavior) = REQUIRED]; } // TriggerModelVersionBinaryFileUploadResponse contains the model inference // results. message TriggerModelVersionBinaryFileUploadResponse { // Task type. common.task.v1alpha.Task task = 1 [(google.api.field_behavior) = REQUIRED]; // Model inference outputs. repeated google.protobuf.Struct task_outputs = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // TriggerModelVersionLatestBinaryFileUploadRequest represents a request // trigger a model inference by uploading a binary file as the input. message TriggerModelBinaryFileUploadRequest { // The resource name of the model to trigger (uses latest version). // Format: `namespaces/{namespace}/models/{model}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference).type = "api.instill.tech/Model" ]; // Inference input as a binary file. repeated google.protobuf.Struct task_input = 2 [(google.api.field_behavior) = REQUIRED]; } // TriggerModelBinaryFileUploadResponse contains the model // inference results. message TriggerModelBinaryFileUploadResponse { // Task type. common.task.v1alpha.Task task = 1 [(google.api.field_behavior) = REQUIRED]; // Model inference outputs. repeated google.protobuf.Struct task_outputs = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; } // GetModelOperationRequest represents a request to fetch the // latest long-running operation performed on a model for a namespace. message GetModelOperationRequest { // The resource name of the model. // Format: `namespaces/{namespace}/models/{model}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference).type = "api.instill.tech/Model" ]; // View allows clients to specify the desired operation result in the // response. optional View view = 2 [(google.api.field_behavior) = OPTIONAL]; } // GetModelOperationResponse represents a response to query a // long-running operation. message GetModelOperationResponse { // The long-running operation. google.longrunning.Operation operation = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } // GetModelVersionOperationRequest represents a request to fetch the // long-running operation performed on a particular model version. message GetModelVersionOperationRequest { // The resource name of the model version. // Format: `namespaces/{namespace}/models/{model}/versions/{version}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference).type = "api.instill.tech/Model" ]; // View allows clients to specify the desired operation result in the // response. optional View view = 2 [(google.api.field_behavior) = OPTIONAL]; } // GetModelVersionOperationResponse represents a response to query a // long-running operation. message GetModelVersionOperationResponse { // The long-running operation. google.longrunning.Operation operation = 1; } // DeployModelAdminRequest represents a request to deploy a model to // online state message DeployModelAdminRequest { // The resource name of the model version to deploy. // Format: `namespaces/{namespace}/models/{model}/versions/{version}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference).type = "api.instill.tech/Model" ]; // Model image digest string digest = 2 [(google.api.field_behavior) = OPTIONAL]; } // DeployModelAdminResponse represents a response for a deployed model message DeployModelAdminResponse {} // UndeployModelAdminRequest represents a request to undeploy a model // to offline state message UndeployModelAdminRequest { // The resource name of the model version to undeploy. // Format: `namespaces/{namespace}/models/{model}/versions/{version}` string name = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference).type = "api.instill.tech/Model" ]; // Model image digest string digest = 2 [(google.api.field_behavior) = OPTIONAL]; } // UndeployModelAdminResponse represents a response for a undeployed // model message UndeployModelAdminResponse {} // GetOperationRequest represents a request to fetch a long-running // operation by its ID. message GetOperationRequest { // The operation ID. string operation_id = 1 [(google.api.field_behavior) = REQUIRED]; } // GetOperationResponse represents a response to query a long-running // operation. message GetOperationResponse { // The long-running operation. google.longrunning.Operation operation = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } // LatestOperation represents an internal message for GetModelOperation // Response message LatestOperation { // Input request TriggerModelVersionRequest request = 1; // Output response TriggerModelVersionResponse response = 2; } // ListAvailableRegionsRequest represents a request to fetch a list // of available regions and hardware types a model can be deployed on. message ListAvailableRegionsRequest {} // ListAvailableRegionsResponse contains a list of available // regions and hardware types a model can be deployed on. message ListAvailableRegionsResponse { // A list of available region repeated Region regions = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } // ========== Private endpoints // ListModelsAdminRequest represents a request to list all models from all users // by admin message ListModelsAdminRequest { // Page size: the maximum number of resources to return. The service may // return fewer than this value. If unspecified, at most 10 models will be // returned. The maximum value is 100; values above 100 will be coereced to // 100. optional int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; // Page token optional string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; // Model view (default is VIEW_BASIC) // VIEW_UNSPECIFIED/VIEW_BASIC: omit `Model.configuration` // VIEW_FULL: show full information optional View view = 3 [(google.api.field_behavior) = OPTIONAL]; // Return soft_deleted models optional bool show_deleted = 4 [(google.api.field_behavior) = OPTIONAL]; // Filter can hold an [AIP-160](https://google.aip.dev/160)-compliant filter // expression. // - Example: `create_time>timestamp("2000-06-19T23:31:08.657Z")`. optional string filter = 5 [(google.api.field_behavior) = OPTIONAL]; } // ListModelsAdminResponse represents a response for a list of models message ListModelsAdminResponse { // a list of Models repeated Model models = 1; // Next page token string next_page_token = 2; // Total number of models. int32 total_size = 3; } // LookUpModelAdminRequest represents a request to query a model via // permalink by admin message LookUpModelAdminRequest { // Permalink of a model. For example: // "models/{uid}" string permalink = 1 [(google.api.field_behavior) = REQUIRED]; // Model view (default is VIEW_BASIC) // VIEW_UNSPECIFIED/VIEW_BASIC: omit `Model.configuration` // VIEW_FULL: show full information optional View view = 2 [(google.api.field_behavior) = OPTIONAL]; } // LookUpModelResponse represents a response for a model message LookUpModelAdminResponse { // A model resource Model model = 1; } // ModelRun contains information about a run of models. message ModelRun { option (google.api.resource) = { type: "api.instill.tech/ModelRun" pattern: "namespaces/{namespace}/models/{model}/runs/{run}" }; // The resource name of the model run. // Format: namespaces/{namespace}/models/{model}/runs/{run} string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Unique identifier for each run (immutable). string id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // Reserved for AIP-122 standard fields. reserved 3; // display_name reserved 4; // slug reserved 5; // aliases reserved 6; // description // Model run created time. google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // Model run updated time. google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; // Runner who triggered the run. // Full resource name: users/{user}. optional string runner = 9 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference).type = "api.instill.tech/User" ]; // The model resource name. // Full resource name: namespaces/{namespace}/models/{model} optional string model = 10 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference).type = "api.instill.tech/Model" ]; // Requester namespace. // Full resource name: namespaces/{namespace}. string requester = 11 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.resource_reference).type = "api.instill.tech/Namespace" ]; // Model run status. common.run.v1alpha.RunStatus status = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; // Run source. common.run.v1alpha.RunSource source = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; // Run total duration in milliseconds. optional int32 total_duration = 14 [(google.api.field_behavior) = OUTPUT_ONLY]; // Run end time. optional google.protobuf.Timestamp end_time = 15 [(google.api.field_behavior) = OUTPUT_ONLY]; // The amount of Instill Credit consumed by the run. optional float credit_amount = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; // Error message occurred during model run. optional string error = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; // The model version identifier, which is same as image tag. string version = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; // Model inference input. repeated google.protobuf.Struct task_inputs = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; // Model inference outputs. repeated google.protobuf.Struct task_outputs = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; } // ListModelRunsRequest represents a request to list of model runs. message ListModelRunsRequest { // The parent model resource name. // Format: namespaces/{namespace}/models/{model} string parent = 1 [ (google.api.field_behavior) = REQUIRED, (google.api.resource_reference).type = "api.instill.tech/Model" ]; // The maximum number of runs to return. The default and cap values are 10 // and 100, respectively. optional int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Page number. optional int32 page = 3 [(google.api.field_behavior) = OPTIONAL]; // Sort the results by the given expression. // Format: `field [ASC | DESC], where `field` can be: // - `create_time` // - `update_time` // By default, results are sorted by descending creation time. optional string order_by = 4 [(google.api.field_behavior) = OPTIONAL]; // Filter can hold an [AIP-160](https://google.aip.dev/160)-compliant filter // expression. // - Example: `create_time>timestamp("2000-06-19T23:31:08.657Z")`. // The filter can be applied to the following fields: // - `create_time` optional string filter = 5 [(google.api.field_behavior) = OPTIONAL]; } // ListModelRunsByRequesterRequest is the request message for // ListModelRunsByRequester. message ListModelRunsByRequesterRequest { // Requester namespace resource name. // Format: namespaces/{namespace} string requester = 1 [(google.api.field_behavior) = REQUIRED]; // The maximum number of runs to return. The default and cap values are 10 // and 100, respectively. optional int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; // Page number. optional int32 page = 3 [(google.api.field_behavior) = OPTIONAL]; // Sort the results by the given expression. // Format: `field [ASC | DESC], where `field` can be: // - `create_time` // - `update_time` // By default, results are sorted by descending creation time. optional string order_by = 4 [(google.api.field_behavior) = OPTIONAL]; // Filter can hold an [AIP-160](https://google.aip.dev/160)-compliant filter // expression. // - Example: `status="RUN_STATUS_COMPLETED"`. // The filter can be applied to the following fields: // - `status` // - `source` optional string filter = 5 [(google.api.field_behavior) = OPTIONAL]; // Beginning of the time range from which the records will be fetched. // The default value is the beginning of the current day, in UTC. optional google.protobuf.Timestamp start = 6; // End of the time range from which the records will be fetched. // The default value is the current timestamp. optional google.protobuf.Timestamp stop = 7; } // ListModelRunsResponse contains a list of model runs. message ListModelRunsResponse { // A list of runs resources. repeated ModelRun runs = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Total number of runs. int32 total_size = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // The requested page size. int32 page_size = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The requested page offset. int32 page = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // ListModelRunsByRequesterResponse is the request message for // ListModelRunsByRequester. message ListModelRunsByRequesterResponse { // A list of runs resources. repeated ModelRun runs = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; // Total number of runs. int32 total_size = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; // The requested page size. int32 page_size = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // The requested page offset. int32 page = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; } // RepositoryTag contains information about the version of some content in a // repository (e.g., Docker registry for model images). message RepositoryTag { // The name of the tag, defined by its parent repository and ID. // - Format: `repositories/{repository.id}/tags/{tag.id}`. string name = 1 [(google.api.field_behavior) = IMMUTABLE]; // The tag identifier. string id = 2 [(google.api.field_behavior) = IMMUTABLE]; // The Model backend will register the tag digest and timestamp when a // new version is pushed. However, the registry remains the source of truth // for tags, so if this information isn't found in the Model database, // these fields will be empty. // Unique identifier, computed from the manifest the tag refers to. string digest = 3 [(google.api.field_behavior) = OPTIONAL]; // Tag update time, i.e. timestamp of the last push. google.protobuf.Timestamp update_time = 4 [ (google.api.field_behavior) = OUTPUT_ONLY, (google.api.field_behavior) = OPTIONAL ]; } // ListRepositoryTagsRequest represents a request to list the tags of a // repository. message ListRepositoryTagsRequest { // The maximum number of tags to return. The default and cap values are 10 // and 100, respectively. optional int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; // Page number. optional int32 page = 2 [(google.api.field_behavior) = OPTIONAL]; // The repository holding the different versions of a given content. // - Format: `repositories/{repository.id}`. // - Example: `repositories/flaming-wombat/llama-2-7b`. string parent = 3 [(google.api.field_behavior) = REQUIRED]; } // ListRepositoryTagsResponse contains a list of container image tags. message ListRepositoryTagsResponse { // A list of repository tags. repeated RepositoryTag tags = 1; // Total number of tags. int32 total_size = 2; // The requested page size. int32 page_size = 3; // The requested page offset. int32 page = 4; } // CreateRepositoryTagRequest represents a request to add a tag to a given // repository. message CreateRepositoryTagRequest { // The tag information. RepositoryTag tag = 1; } // CreateRepositoryTagResponse contains the created tag. message CreateRepositoryTagResponse { // The created tag. RepositoryTag tag = 1; } // GetRepositoryTagRequest represents a request to get a tag from a given // repository. message GetRepositoryTagRequest { // The name of the tag, defined by its parent repository and ID. // - Format: `repositories/{repository.id}/tags/{tag.id}`. string name = 1 [(google.api.field_behavior) = REQUIRED]; } // GetRepositoryTagResponse contains the requested tag. message GetRepositoryTagResponse { // The requested tag. RepositoryTag tag = 1; } // DeleteRepositoryTagRequest represents a request to delete a tag from a given // repository. message DeleteRepositoryTagRequest { // The name of the tag, defined by its parent repository and ID. // - Format: `repositories/{repository.id}/tags/{tag.id}`. string name = 1 [(google.api.field_behavior) = REQUIRED]; } // DeleteRepositoryTagResponse represent an empty response. message DeleteRepositoryTagResponse {}