Skip to main content

llm-flexai

PyPI Tests License

LLM plugin for models hosted by FlexAI.

Installation

Install this plugin in the same environment as LLM:

llm install llm-flexai

Configuration

You will need an API key from platform.flex.ai. Set it like this:

llm keys set flexai
# Paste your key here

You can also set the FLEXAI_API_KEY environment variable instead.

Usage

The list of models is fetched live from GET https://api.flex.ai/v1/models and cached for an hour. Every chat model is available with a flexai/ prefix. To see them:

llm models -q flexai/

Run a prompt:

llm -m flexai/DeepSeek-V4-Flash-0731 "Five fun names for a pet pelican"

Start a chat:

llm chat -m flexai/gpt-oss-120b

Tools

FlexAI chat models support tool calling:

llm -m flexai/DeepSeek-V4-Flash-0731 -T llm_version "What version of LLM is this?" --td

Images

Models where image input has been verified accept image attachments (PNG, JPEG, WebP):

llm -m flexai/Qwen3.6-27B-FP8 "Describe this image" -a photo.jpg

The verified models are listed in VISION_MODELS in llm_flexai.py.

Options

Models that support it take a reasoning_effort option:

llm -m flexai/gpt-oss-120b -o reasoning_effort low "Explain RAID 5 in one paragraph"

Models that support structured outputs work with --schema:

llm -m flexai/DeepSeek-V4-Flash-0731 --schema 'name, age int' "Invent a dog"

Embeddings

The bge-m3 embedding model is available as flexai/bge-m3:

llm embed -m flexai/bge-m3 -c "hello world"

Commands

llm flexai models          # list FlexAI models and their capabilities
llm flexai models --json   # the raw /v1/models response
llm flexai refresh         # refresh the cached model list

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd llm-flexai
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

The tests mock every HTTP request and make no network calls.

About FlexAI

FlexAI runs open models behind an OpenAI-compatible API at https://api.flex.ai/v1. Documentation: docs.flex.ai.

Metadata

Release files for llm-flexai 0.1.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 llm-flexai 0.1.0
File Size Uploaded Provenance
llm_flexai-0.1.0.tar.gz 7.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for llm-flexai 0.1.0
File Interpreter ABI Platform
llm_flexai-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.5 kB

Release files / llm_flexai-0.1.0.tar.gz

Download URL llm_flexai-0.1.0.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2df037631f35d2c8153c2536b199f97d3844712061eaedc83ac7ba5e28c76f22
BLAKE2b-256 checksum
How to use checksums
3d5c2115b393749fd06b88ab34fbddd64ca83225abf5dcc739640d924246c461
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 16, 2026.

Transparency log

Release files / llm_flexai-0.1.0-py3-none-any.whl

Download URL llm_flexai-0.1.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
faa0714b7a3a61d41e167cc179085c63c8879b3b0c7e79950abc0133917a1236
BLAKE2b-256 checksum
How to use checksums
bfd5ba5cc239f9f885dedf2f8b13aae72af88f34fe4ec11447c6fd5239a6a3bc
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 16, 2026.

Transparency log

Security for llm-flexai 0.1.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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for llm_flexai-0.1.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 16, 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

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