scikit-ai
| Category | Tools |
|---|---|
| Development | |
| Testing | |
| Security | |
| Automation | |
| Package | |
| Documentation | |
| Communication |
Introduction
scikit-ai provides components for text, images, audio, video and multimodal samples that follow the
scikit-learn estimator API. Components are named by their input and output, such
as ImageClassifier, AudioSegmenter or TextToVideoGenerator, so the name says what every sample is and what every
output is. The same component runs on open-source models or on cloud APIs, chosen with one backend parameter, and
fits into Pipeline, GridSearchCV and the rest of the scikit-learn ecosystem. Presets and recipes configure the
components and pipelines of common tasks, from a summary to a video dubbed in the original voice.
Installation
scikit-ai is available on PyPI. The base install includes the offline dummy backend, and every other backend is an
optional extra:
pip install scikit-ai # components and the dummy backend
pip install "scikit-ai[hf]" # local open-source models with Hugging Face
pip install "scikit-ai[openai]" # the OpenAI API
pip install "scikit-ai[litellm]" # Anthropic, Gemini, Mistral, Bedrock, Ollama and others through LiteLLM
pip install "scikit-ai[replicate]" # open-source models hosted by Replicate
pip install "scikit-ai[diarize]" # speaker diarization with pyannote
pip install "scikit-ai[video]" # encoding, decoding and assembling video
pip install "scikit-ai[all]" # everything
Development installation requires to clone the repository and then use PDM to install the project as well as the main and development dependencies:
git clone https://github.com/georgedouzas/scikit-ai.git
cd scikit-ai
pdm install
Components
Components live in modules named after their role, like scikit-learn's estimators. Analyzers are named
{Input}{Role} and generators {Input}To{Output}Generator, where the input is Text, Image, Audio, Video or
Multimodal, a dict of named parts.
| Module | Components | Does | Output |
|---|---|---|---|
skai.classification |
TextClassifier, ImageClassifier, AudioClassifier, VideoClassifier, MultimodalClassifier |
assign labels, zero-shot or few-shot | labels and probabilities |
skai.extraction |
TextExtractor, ImageExtractor, AudioExtractor, VideoExtractor, MultimodalExtractor |
extract declared fields, nested records and lists | records or columns |
skai.embedding |
TextEmbedder, ImageEmbedder, AudioEmbedder, VideoEmbedder |
map samples to vectors | float array |
skai.segmentation |
TextSegmenter, ImageSegmenter, AudioSegmenter, VideoSegmenter |
split samples into regions in space or time | lists of regions |
skai.generation |
TextToTextGenerator, ImageToTextGenerator, AudioToTextGenerator, VideoToTextGenerator, MultimodalToTextGenerator |
follow instructions, or transcribe speech and written text | text |
skai.generation |
TextToImageGenerator, ImageToImageGenerator, VideoToImageGenerator, MultimodalToImageGenerator |
generate, edit, upscale, cut out, lay out and pick images | images |
skai.generation |
TextToAudioGenerator, AudioToAudioGenerator, VideoToAudioGenerator, MultimodalToAudioGenerator |
speak, compose, separate, enhance, convert, join and mix audio | audio |
skai.generation |
TextToVideoGenerator, ImageToVideoGenerator, AudioToVideoGenerator, VideoToVideoGenerator, MultimodalToVideoGenerator |
generate, animate, reframe, join, lip-sync, mux and subtitle video | videos |
skai.pipeline |
MediaUnion, Field, ForEach, TopK, Retriever |
combine branches, pick fields, work on every item, keep the best, search | samples |
skai.presets, skai.recipes |
functions such as summarizer or explainer_video |
configure components and pipelines for common tasks | estimators |
operation selects the procedure of a component, such as 'transcribe' or 'upscale', and instructions holds the
prompt of the components that follow one, such as 'Summarize the text.'.
What fit learns
Every component learns from the data given to fit, without training a model unless you ask for fine-tuning.
| Component | fit(X, y) takes |
Learns | Uses it as |
|---|---|---|---|
| classifiers | samples and labels | classes_, examples_ |
one example per class by default |
| extractors | samples and reference records | examples_ |
example pairs |
text generators with operation='instruct' |
samples and reference texts | examples_, max_length_ |
example pairs and, with max_length='auto', a learned length |
TextToTextGenerator(learn_terms=True) |
texts and reference texts | glossary_ |
consistent terms |
text generators with operation='transcribe', AudioSegmenter |
audio or video and reference transcripts | vocabulary_ |
domain terms sent as spelling context |
| embedders | samples | mean_, components_ |
centering, and PCA when the backend cannot shorten |
TextToAudioGenerator, AudioToAudioGenerator |
the voice parameter |
voice_ |
a voice cloned from one or more recordings |
TextToImageGenerator |
the style_images and reference_prompt parameters |
style_, reference_images_ |
a learned style and a consistent subject |
AudioToVideoGenerator |
the avatar parameter |
avatar_ |
the portrait cropped and sized for the backend |
With adaptation='finetune', classifiers and text generators with operation='instruct' train a model on all the
training data on backends that support fine-tuning, and fit raises UnsupportedBackendError on the others. In a
pipeline, intermediate steps are fitted through fit_transform, which ignores y, so a transcriber in front of a
classifier never reads the class labels as transcripts.
Usage
Every component is a scikit-learn estimator. The examples use the offline dummy backend, so they run without models
or credentials. Replace backend='dummy' with a backend from the table below to get real results.
Classify texts with a few labeled examples:
from skai.classification import TextClassifier
X = ['I loved this movie.', 'The product broke after a day.', 'Great service!', 'Never again.']
y = ['positive', 'negative', 'positive', 'negative']
classifier = TextClassifier(k_shot=2, random_state=0, backend='dummy').fit(X, y)
classifier.predict(['What a wonderful day.'])
Describe images, then classify the descriptions in one pipeline:
from PIL import Image
from sklearn.pipeline import make_pipeline
from skai.generation import ImageToTextGenerator
images = [Image.new('RGB', (64, 64), color) for color in ('red', 'green', 'blue', 'white')]
pipeline = make_pipeline(
ImageToTextGenerator(instructions='Describe the image.', backend='dummy'),
TextClassifier(backend='dummy'),
)
pipeline.fit(images, ['warm', 'cold', 'cold', 'warm']).predict(images)
Make a portrait speak a text:
from skai.generation import AudioToVideoGenerator, TextToAudioGenerator
portrait = Image.new('RGB', (64, 64), 'white')
pipeline = make_pipeline(
TextToAudioGenerator(backend='dummy'),
AudioToVideoGenerator(avatar=portrait, backend='dummy'),
)
videos = pipeline.fit(None).predict(['Hello, I am a talking portrait.'])
videos[0].duration
Turn a brief into a narrated, subtitled video with a recipe:
from skai import recipes
explainer = recipes.explainer_video(size=(64, 48), scene_seconds=1, backend='dummy')
video = explainer.fit(None).predict(['How solar panels work'])[0]
video.duration, video.audio is not None
Backends
The backend parameter takes '<provider>', '<provider>:<model>' or a backend object from skai.backends. Without
it, components run an open-source model, locally with hf for most operations.
| Provider | Backend | Runs | Install | Tasks |
|---|---|---|---|---|
hf |
HFBackend |
locally, open-source models | scikit-ai[hf] |
every task except talking heads, voice conversion, lip sync and fine-tuning, with diarization from scikit-ai[diarize] |
openai |
OpenAIBackend |
OpenAI API | scikit-ai[openai] |
classification, text generation, extraction, transcription, text embeddings, object detection, moments, thumbnails, speech, image generation with reference images and edits, video generation and animation, fine-tuning |
litellm |
LiteLLMBackend |
Anthropic, Gemini, Mistral, Bedrock, Azure, Ollama and others through LiteLLM | scikit-ai[litellm] |
classification, text generation, extraction, image transcription, object detection, moments, thumbnails, text and image embeddings |
replicate |
ReplicateBackend |
open-source models hosted by Replicate | scikit-ai[replicate] |
talking heads, lip sync, voice conversion, image generation, speech synthesis with voice cloning |
dummy |
DummyBackend |
locally, no model | included | every task, with placeholder outputs for tests and documentation |
Local operations, such as joining clips, mixing tracks, muxing, subtitles, collages, frames, shot cuts, silences and text splitting, run without a backend. The backends guide lists the providers and the default model of every class and operation.
Cloud backends read credentials from environment variables, such as OPENAI_API_KEY or REPLICATE_API_TOKEN, and
never take a secret as an argument. Generated speech, converted voices, lip sync and talking heads can imitate real
people. Use them only with the consent of the people they depict, and within the policies of the providers.
Spec-driven development
The project's engineering constitution lives in openspec/constitution.md and binds all work. The project uses
OpenSpec for spec-driven development, and openspec/config.yaml names the
constitution as binding.
Metadata
Release files for scikit-ai 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| scikit_ai-0.3.0.tar.gz | 202.2 kB | With provenance | Details for scikit_ai-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| scikit_ai-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for scikit_ai-0.3.0-py3-none-any.whl |
Total release size: 345.4 kB
Release files / scikit_ai-0.3.0.tar.gz
| Download URL | scikit_ai-0.3.0.tar.gz |
|---|---|
| Size | 202.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e876ae116aa01a882c54eaf7b6b24b634a8993b17a1d7b3b53963d032223e233
|
|
BLAKE2b-256 checksum How to use checksums |
facadf4fa64d01f0c80fdced2bc1350530c7a60e6f82bdfc540f97709417cc9e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.
Transparency logRelease files / scikit_ai-0.3.0-py3-none-any.whl
| Download URL | scikit_ai-0.3.0-py3-none-any.whl |
|---|---|
| Size | 143.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
45ae60f9aa61cddad19c449eb0d4eb8c8f76ee5d8f0a5653547a69f1e7ef5c3d
|
|
BLAKE2b-256 checksum How to use checksums |
580502d40e0ae18c97f72229b511dffe278be6df37cd8a87907b86a96c29c8d9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.
Transparency logSecurity for scikit-ai 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for scikit_ai-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.