Skip to main content

impossibl

Impossibl is an AI gateway with self-serve inference.

Build with models from OpenAI, Anthropic, Google, and xAI through one OpenAI-compatible API. Change the model ID to try another provider, while keeping the same integration.

Impossibl brings your models together with one API key, unified usage and billing, and automatic provider fallbacks.

Python client

This package is a small client for the hosted Impossibl API. It extends the OpenAI Python client with Impossibl's endpoint and the IMPOSSIBL_API_KEY environment variable.

pip install impossibl
export IMPOSSIBL_API_KEY="your-api-key"

List available models:

from impossibl import Impossibl

with Impossibl() as client:
    for model in client.models.list():
        print(model.id)

Generate a response using a model ID from the list:

import os
from impossibl import Impossibl

with Impossibl() as client:
    response = client.chat.completions.create(
        model=os.environ["IMPOSSIBL_MODEL"],
        messages=[{"role": "user", "content": "Hello!"}],
    )
    print(response.choices[0].message.content)

Set IMPOSSIBL_MODEL to your chosen model ID before running the second example. Model availability, pricing, and API credentials are managed by Impossibl. Generation requests may consume your account balance.

You can also pass api_key explicitly. OpenAI client options such as timeout, max_retries, and base_url are forwarded unchanged. An explicit key takes precedence over IMPOSSIBL_API_KEY; OPENAI_API_KEY is not used as a fallback.

This initial release provides a synchronous client. It does not create accounts or manage billing. API compatibility is determined by the Impossibl service.

Release files for impossibl 0.0.1

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

Source distribution (sdist)

Source distribution for impossibl 0.0.1
File Size Uploaded
impossibl-0.0.1.tar.gz 3.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for impossibl 0.0.1
File Interpreter ABI Platform
impossibl-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 6.0 kB

Release files / impossibl-0.0.1.tar.gz

Download URL impossibl-0.0.1.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
05ec1a27a35eeebfbeb15c11648c85ae8a4ef3f18d09b066e568f91452ee92d4
BLAKE2b-256 checksum
How to use checksums
948902ddc46af7c85b2dc26719a538fda9d77dd73b255cc3b0184b61cb7ccae2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release files / impossibl-0.0.1-py3-none-any.whl

Download URL impossibl-0.0.1-py3-none-any.whl
Size 2.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
81f31fee8f1c33998a13c2d2f5903c37ffdfa7386562717beaf7df9a354c691a
BLAKE2b-256 checksum
How to use checksums
0404c4e556e6431db04cc3215e912b6a3b4bd4bf24ddaf1bdec1a25812d712ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

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