IBM Generative AI Python SDK (Tech Preview)#

This is the Python SDK for IBM Foundation Models Studio to bring IBM Generative AI into Python programs and to also extend it with useful operations and types.

You can start a trial version or request a demo via https://www.ibm.com/products/watsonx-ai.

Migration to V3

We recently updated the SDK with improved moderations and schemas. See the V3 Migration Guide.

Migration to V2

We rewrote nearly the whole SDK to be faster and more reliable than V1 and would bring you all the latest features available on the API. To easily migrate, we prepared the V2 Migration Guide.

Top Features#

✅ Very Performant.

✅ Generated Typings directly from the API.

✅ Smart Requests Concurrency Handling.

✅ Retry Mechanism in case of network or API failure.

✅ Batching Large Requests automatically.

✅ Easy to extend (see example).

✅ Integrations to LangChain, LLamaIndex and HuggingFace.

LocalServer extension – run local API compatible with SDK.

First Steps#

To start using the SDK and the power of generative AI, ensure you have an API key from one of the supported environments. Then jump straight into Getting Started page and explore all prepared examples.

Important pages#