openai-api-availability-test
A tiny CLI that checks whether an OpenAI API key can call Chat Completions.
Usage
pip install -e openai-api-availability-test
openai-api-test --api-key "your_api_key"
The test uses gpt-4.1-nano by default, asks for only one output token,
uses https://api.openai.com/v1/ as the default base URL, and has a
10-second timeout.
To use another model:
openai-api-test --api-key "your_api_key" --model gpt-4.1-mini
To use another base URL:
openai-api-test --api-key "your_api_key" --base-url "https://api.openai.com/v1"
To use another timeout:
openai-api-test --api-key "your_api_key" --timeout 30
Python API
from openai_api_availability_test import check_availability
available = check_availability(
api_key="your_api_key",
base_url="https://api.openai.com/v1/",
timeout=30,
)
print(available)
Metadata
Release files for openai-api-availability-test 0.1.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 |
|---|---|---|---|---|
| openai_api_availability_test-0.1.0.tar.gz | 4.1 kB | Without provenance | Details for openai_api_availability_test-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| openai_api_availability_test-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for openai_api_availability_test-0.1.0-py3-none-any.whl |
Total release size: 7.4 kB
Release files / openai_api_availability_test-0.1.0.tar.gz
| Download URL | openai_api_availability_test-0.1.0.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
39696f57bcebeb8de09c7afd5fca4937c90e1881c59ac427158919d65140b7a7
|
|
BLAKE2b-256 checksum How to use checksums |
20896b2455f04c5df428a0a5c55ffeb4717781fa5d85b1693c532d8b913ecf40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.11.15 Windows/10
|
Release files / openai_api_availability_test-0.1.0-py3-none-any.whl
| Download URL | openai_api_availability_test-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fef26aa4322d64cdc8115253675f1d0c5c8f2400bc3be1bc4d0805af7e9c5a52
|
|
BLAKE2b-256 checksum How to use checksums |
196bb5026171e6d119efb8859cb45b6e5818abaa6b4cf5bca742a1d591e8d4dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.1 CPython/3.11.15 Windows/10
|
Security for openai-api-availability-test 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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.