---
title: "Pipeline"
sidebar_label: "Pipeline"
description: "Kotlin binding reference: Pipeline."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.modelverse](../index.md)/[Pipeline](index.md)

# Pipeline

sealed class [Pipeline](index.md)

A task pipeline: one call that runs a loaded model's door end to end and answers the result, under the task's own name ([Modelverse.pipeline](../Modelverse/pipeline.md) with a task string: `text-generation`, `automatic-speech-recognition`, `text-to-speech`, `translation`, `image-to-text`, `object-detection`, `depth-estimation`, `image-feature-extraction`, `zero-shot-image-classification`, `feature-extraction`, `text-ranking`, `voice-activity-detection`, `text-to-image`, `text-to-video`, and their aliases). Each pipeline's `invoke` blocks on the caller's thread for the model's reply; a failure throws [ModelverseException](../ModelverseException/index.md) with the model's message. The pipeline owns its [model](model.md): [close](close.md) closes it. The handle's own doors stay reachable through [model](model.md) for a caller that streams.

#### Inheritors

| |
|---|
| [TextGenerationPipeline](../TextGenerationPipeline/index.md) |
| [AutomaticSpeechRecognitionPipeline](../AutomaticSpeechRecognitionPipeline/index.md) |
| [TextToSpeechPipeline](../TextToSpeechPipeline/index.md) |
| [TranslationPipeline](../TranslationPipeline/index.md) |
| [ImageToTextPipeline](../ImageToTextPipeline/index.md) |
| [ObjectDetectionPipeline](../ObjectDetectionPipeline/index.md) |
| [DepthEstimationPipeline](../DepthEstimationPipeline/index.md) |
| [ImageFeatureExtractionPipeline](../ImageFeatureExtractionPipeline/index.md) |
| [ZeroShotImageClassificationPipeline](../ZeroShotImageClassificationPipeline/index.md) |
| [FeatureExtractionPipeline](../FeatureExtractionPipeline/index.md) |
| [TextRankingPipeline](../TextRankingPipeline/index.md) |
| [VoiceActivityDetectionPipeline](../VoiceActivityDetectionPipeline/index.md) |
| [TextToImagePipeline](../TextToImagePipeline/index.md) |
| [TextToVideoPipeline](../TextToVideoPipeline/index.md) |

## Properties

| Name | Summary |
|---|---|
| [model](model.md) | [common]<br>abstract val [model](model.md): [PreTrainedModel](../PreTrainedModel/index.md)<br>The loaded model the pipeline runs. |
| [task](task.md) | [common]<br>val [task](task.md): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)<br>The task the pipeline serves, in transformers' spelling. |

## Functions

| Name | Summary |
|---|---|
| [close](close.md) | [common]<br>open fun [close](close.md)(): &lt;Error class: unknown class&gt; |