ibm-watsonx-ai
IBM watsonx.ai API Client
What it is and what it does
ibm-watsonx-ai is the official Python client for IBM's enterprise AI platform, watsonx.ai. It abstracts authentication, API communication, and model lifecycle management into a single SDK, enabling developers to build, tune, deploy, and invoke foundation models (LLMs, embeddings, time-series, audio), run AutoAI experiments, construct retrieval-augmented generation systems, and integrate enterprise data sources—all from Python code.
The SDK is designed for the full AI lifecycle: from research prototyping to production deployment on IBM Cloud or on-premises watsonx.ai. It handles secure credential management, provides a unified interface to multiple model families and inference modes (chat, embeddings, fine-tuning), and integrates with IBM Cloud Object Storage (ibm-cos-sdk) for data and artifact management. With 10 runtime dependencies focused on HTTP communication, data handling, and caching, it is production-ready and suitable for enterprise environments requiring governance and scalability.
Use it for:
- Build conversational AI applications using foundation models like Granite or Llama via the ModelInference chat interface.
- Construct retrieval-augmented generation (RAG) systems that combine enterprise documents with LLM inference.
- Run AutoAI experiments to automatically discover and tune models for structured data tasks.
- Fine-tune and prompt-tune foundation models on domain-specific data within the watsonx.ai platform.
- Deploy trained models to scalable inference endpoints and manage their lifecycle through the SDK.
- Integrate enterprise data sources and IBM Cloud Object Storage into AI workflows for end-to-end ML pipelines.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Official Python SDK for IBM watsonx.ai that provides a unified interface to foundation models, AutoAI experiments, retrieval-augmented generation, model tuning, and deployment across the watsonx.ai platform.
Yes. The package is actively maintained (release 3 days old), carries no known vulnerabilities, has low install friction, and is production-stable (Development Status 5). It is the official and necessary client for any developer working with IBM watsonx.ai. Install it if you are building or deploying AI models on the watsonx.ai platform; skip it if you are not using that specific IBM service.
Install
ibm-watsonx-ai on PyPI
pip
pip install ibm-watsonx-aiuv
uv add ibm-watsonx-aipoetry
poetry add ibm-watsonx-aiInstalling ibm-watsonx-ai
Before you install
Low friction installation with a pure Python wheel; actively maintained with a release 3 days old. Requires Python 3.11–3.14 and brings 10 runtime dependencies including requests, httpx, pandas, and ibm-cos-sdk.
License in practice
BSD-3-Clause permissive license allows commercial and private use with minimal restrictions; suitable for enterprise deployments.
Quickstart
pip install ibm-watsonx-ai
from ibm_watsonx_ai import Credentials, APIClient
from ibm_watsonx_ai.foundation_models import ModelInference
credentials = Credentials(url="https://us-south.ml.cloud.ibm.com", api_key="<key>")
api_client = APIClient(credentials, space_id="<space-id>")
model = ModelInference(api_client=api_client, model_id="ibm/granite-4-h-small")
response = model.chat(messages=[{"role": "user", "content": "Hello"}])
Requires valid IBM watsonx.ai credentials (API key and space/project ID) and network access to IBM Cloud or on-premises watsonx.ai deployment.
Verify before relying
- Whether optional extras (rag, mcp) are included in the standard install or require separate installation.
- Performance characteristics and rate limits for concurrent inference requests.
- Specific model availability and versioning strategy across watsonx.ai deployments.
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (<3.15,>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 10 — requests, httpx, urllib3, pandas, certifi, lomond, tabulate, packaging, ibm-cos-sdk, cachetools |
| Maintenance | actively maintained — 3 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,585,364/month — #2,983 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: ibm_watsonx_ai-1.6.3-py3-none-any.whl
Keywords: watsonx.ai, machine learning, IBM, Bluemix, client, API, IBM Cloud
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
ibm-watson-machine-learningPython client library for IBM Watson Machine…
permissive · top 5,000 on PyPI
llama-index-llms-ibmIntegrates IBM watsonx.ai foundation models…
permissive · top 15,000 on PyPI
langchain-ibmIntegrates IBM watsonx.ai models with…
permissive · top 15,000 on PyPI
llama-index-embeddings-ibmIntegrates IBM watsonx.ai embedding models with…
permissive · top 15,000 on PyPI
opentelemetry-instrumentation-watsonxAutomatically captures and traces IBM Watsonx…
permissive · top 5,000 on PyPI
ibm-cos-sdk-coreProvides a low-level Python interface to IBM…
permissive · top 5,000 on PyPI
ibm-platform-servicesPython client library for IBM Cloud Platform…
permissive · top 5,000 on PyPI
ibm-vpcPython client library for programmatically…
permissive · top 15,000 on PyPI
azure-ai-inferenceUnified client library for chat completions,…
permissive · top 5,000 on PyPI
ibm-cloud-sdk-coreProvides core authentication, HTTP request…
permissive · top 5,000 on PyPI