Coding generative AI solutions

Use the watsonx.ai Python library from a notebook or the watsonx.ai REST API directly to leverage foundation models in your generative AI applications.

Tasks that you can do programmatically

The following table describes the tasks that you can perform by using a notebook, the REST API, or both. A checkmark (✓) indicates that the task is supported for the coding method.

Table 1. Tasks you can do programmatically in watsonx.ai
Task Notebook REST API
Get details about the available foundation models
Check the tokens a model calculates for a prompt
Get a list of available custom foundation models
Inference a foundation model
Prompt-tune a foundation model
List available prompt templates
Inference a foundation model with a prompt template
Integrate with LangChain

Learn more

Parent topic: Developing generative AI solutions