Skip to main content

scikit-ai

ci doc

Category Tools
Development black ruff mypy docformatter
Testing pytest coverage interrogate
Security pip-audit bandit
Automation nox pre-commit
Package version pythonversion downloads
Documentation properdocs
Communication discussions

Introduction

scikit-ai provides task-oriented components for text, images, audio and video. Each component does one job, such as describing an image, summarizing a text, transcribing speech or making a portrait speak, and follows the scikit-learn estimator API. 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.

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[video]"     # encoding and decoding 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 task family, like scikit-learn's estimators. Every class name starts with its input type, except generators, which are named for what they generate.

Module Component Does Output
skai.classification TextClassifier, ImageClassifier, AudioClassifier, VideoClassifier assign labels, zero-shot or few-shot labels and probabilities
skai.description ImageDescriptor, AudioDescriptor, VideoDescriptor describe media in natural language text
skai.transcription SpeechTranscriber, VideoTranscriber transcribe speech, optionally with timestamps text or timed records
skai.text TextSummarizer summarizes texts text
skai.text TextTranslator translates texts text
skai.text TextExtractor extracts named fields records or columns
skai.embedding TextEmbedder, ImageEmbedder, AudioEmbedder map samples to vectors float array
skai.generation SpeechSynthesizer speaks texts, optionally in a cloned voice audio
skai.generation ImageGenerator, VideoGenerator generate images or videos from prompts images or videos
skai.generation ImageEditor applies an instruction to images images
skai.generation ImageAnimator turns images into short videos videos
skai.generation TalkingAvatarGenerator animates a portrait so that it speaks the audio video

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
TextClassifier, ImageClassifier samples and labels classes_, examples_ one example per class by default
TextSummarizer texts and reference summaries examples_, max_length_ example pairs and a learned length
TextTranslator texts and reference translations examples_, glossary_ example pairs and consistent terms
ImageDescriptor images and reference descriptions examples_ example pairs in the reference style
SpeechTranscriber audio and reference transcripts vocabulary_ domain terms sent as spelling context
TextEmbedder texts mean_, components_ centering, and PCA when the backend cannot shorten
SpeechSynthesizer the voice parameter voice_ a voice cloned from one or more recordings
ImageGenerator the style_images parameter style_ a style learned from reference images
TalkingAvatarGenerator the avatar parameter avatar_ the portrait cropped and sized for the backend

With adaptation='finetune', classifiers, TextSummarizer, TextTranslator and ImageDescriptor 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.description import ImageDescriptor

images = [Image.new('RGB', (64, 64), color) for color in ('red', 'green', 'blue', 'white')]
pipeline = make_pipeline(ImageDescriptor(backend='dummy'), TextClassifier(backend='dummy'))
pipeline.fit(images, ['warm', 'cold', 'cold', 'warm']).predict(images)

Make a portrait speak a text:

from skai.generation import TalkingAvatarGenerator
from skai.generation import SpeechSynthesizer

portrait = Image.new('RGB', (64, 64), 'white')
pipeline = make_pipeline(
    SpeechSynthesizer(backend='dummy'),
    TalkingAvatarGenerator(avatar=portrait, backend='dummy'),
)
videos = pipeline.fit(None).predict(['Hello, I am a talking portrait.'])
videos[0].duration

Backends

The backend parameter takes '<provider>', '<provider>:<model>' or a backend object from skai.backends. Without it, components run an open-source model.

Provider Backend Runs Install Tasks
hf HFBackend locally, open-source models scikit-ai[hf] every task except talking avatars
openai OpenAIBackend OpenAI API scikit-ai[openai] every task except talking avatars and image and audio embeddings
litellm LiteLLMBackend Anthropic, Gemini, Mistral, Bedrock, Azure, Ollama and others through LiteLLM scikit-ai[litellm] classification, description, summarization, translation, extraction, text and image embeddings
replicate ReplicateBackend open-source models hosted by Replicate scikit-ai[replicate] talking avatars, image generation, speech synthesis with voice cloning
dummy DummyBackend locally, no model included every task, with placeholder outputs for tests and documentation

The default model of every component and provider:

Component Default backend hf openai litellm replicate
TextClassifier hf facebook/bart-large-mnli gpt-5-mini anthropic/claude-haiku-5-5
TextSummarizer hf Qwen/Qwen2.5-1.5B-Instruct gpt-5-mini anthropic/claude-haiku-5-5
TextTranslator hf Qwen/Qwen2.5-1.5B-Instruct gpt-5-mini anthropic/claude-haiku-5-5
TextEmbedder hf sentence-transformers/all-MiniLM-L6-v2 text-embedding-3-small openai/text-embedding-3-small
SpeechSynthesizer hf facebook/mms-tts-eng gpt-4o-mini-tts jaaari/kokoro-82m, lucataco/xtts-v2 to clone a voice
ImageGenerator hf stabilityai/sd-turbo gpt-image-1 black-forest-labs/flux-schnell
ImageDescriptor hf HuggingFaceTB/SmolVLM-256M-Instruct gpt-5-mini anthropic/claude-haiku-5-5
ImageClassifier hf openai/clip-vit-base-patch32 gpt-5-mini anthropic/claude-haiku-5-5
SpeechTranscriber hf openai/whisper-small whisper-1
TalkingAvatarGenerator replicate cjwbw/sadtalker
AudioClassifier hf laion/clap-htsat-unfused gpt-audio-mini gemini/gemini-2.5-flash
VideoClassifier hf HuggingFaceTB/SmolVLM-256M-Instruct gpt-5-mini gemini/gemini-2.5-flash
AudioDescriptor hf Qwen/Qwen2-Audio-7B-Instruct gpt-audio-mini gemini/gemini-2.5-flash
VideoDescriptor hf HuggingFaceTB/SmolVLM-256M-Instruct gpt-5-mini gemini/gemini-2.5-flash
VideoTranscriber hf openai/whisper-small whisper-1
TextExtractor hf Qwen/Qwen2.5-1.5B-Instruct gpt-5-mini anthropic/claude-haiku-5-5
ImageEmbedder hf clip-ViT-B-32 cohere/embed-v4.0
AudioEmbedder hf laion/clap-htsat-unfused
VideoGenerator hf Wan-AI/Wan2.1-T2V-1.3B-Diffusers sora-2
ImageEditor hf timbrooks/instruct-pix2pix gpt-image-1
ImageAnimator hf stabilityai/stable-video-diffusion-img2vid-xt sora-2

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 and talking avatars 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.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scikit-ai 0.2.0
File Size Uploaded Provenance Actions
scikit_ai-0.2.0.tar.gz 113.6 kB With provenance Details for scikit_ai-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scikit-ai 0.2.0
File Interpreter ABI Platform Actions
scikit_ai-0.2.0-py3-none-any.whl Python 3 none any Details for scikit_ai-0.2.0-py3-none-any.whl

Total release size: 204.5 kB

Release files / scikit_ai-0.2.0.tar.gz

Download URL scikit_ai-0.2.0.tar.gz
Size 113.6 kB
Tags Source
SHA-256 checksum
How to use checksums
cd5ff684e25eb5c1dc8872cacaafb0bdb54f59434e012f1d8ed1b262a37e9d35
BLAKE2b-256 checksum
How to use checksums
c4fb491a9d30247c8c82862f4df685dc995c129af7d70fce98d4c3a9bc0e38dc
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 log

Release files / scikit_ai-0.2.0-py3-none-any.whl

Download URL scikit_ai-0.2.0-py3-none-any.whl
Size 90.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
46a4844aa429f58b1c7b3fed4cae3fd38e438515403df4ab3988be69bfb3b49d
BLAKE2b-256 checksum
How to use checksums
71f00b14f680a0558dd85de2d364085bd6eecdf5b11b4aa3798d4333df930e0c
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 log

Security for scikit-ai 0.2.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.

Select from 2 files

Attestation for scikit_ai-0.2.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 log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page