{"id":27927,"library":"llama-index-embeddings-ibm","title":"LlamaIndex Embeddings IBM","description":"LlamaIndex integration for IBM watsonx.ai embeddings. Provides wrapper classes to generate embeddings using IBM foundation models via watsonx.ai API. Current version 0.6.0.post1, supports Python >=3.11, <4.0. Packages are released frequently alongside llama-index core updates.","status":"active","version":"0.6.0.post1","language":"python","source_language":"en","source_url":"https://github.com/run-llama/llama_index/tree/main/llama-index-integrations/embeddings/llama-index-embeddings-ibm","tags":["llama-index","embeddings","ibm","watsonx","llm"],"install":[{"cmd":"pip install llama-index-embeddings-ibm","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for base embedding classes and integration framework","package":"llama-index-core","optional":false},{"reason":"Required for interaction with IBM watsonx.ai API","package":"ibm-watsonx-ai","optional":false}],"imports":[{"note":"The package namespace changed from 'watsonx' to 'ibm' in version 0.5.0+","wrong":"from llama_index.embeddings.watsonx import WatsonxEmbeddings","symbol":"WatsonxEmbeddings","correct":"from llama_index.embeddings.ibm import WatsonxEmbeddings"}],"quickstart":{"code":"from llama_index.embeddings.ibm import WatsonxEmbeddings\n\nembedding = WatsonxEmbeddings(\n    model_id=\"ibm/slate-125m-english-rtrvr\",\n    url=os.environ.get(\"WATSONX_URL\", \"https://us-south.ml.cloud.ibm.com\"),\n    apikey=os.environ.get(\"WATSONX_APIKEY\", \"\"),\n    project_id=os.environ.get(\"WATSONX_PROJECT_ID\", \"\"),\n)\n\nembeddings = embedding.get_text_embedding(\"Hello World!\")\nprint(embeddings[:5])","lang":"python","description":"Initialize WatsonxEmbeddings with credentials and generate an embedding."},"warnings":[{"fix":"Use `from llama_index.embeddings.ibm import WatsonxEmbeddings`","message":"In version 0.5.0, the import path changed from `llama_index.embeddings.watsonx` to `llama_index.embeddings.ibm`. Update all imports.","severity":"breaking","affected_versions":">=0.5.0"},{"fix":"Remove `credentials` argument and set individual parameters.","message":"Passing `credentials` as a dict is deprecated. Use explicit parameters (`url`, `apikey`, `project_id`) instead.","severity":"deprecated","affected_versions":">=0.6.0"},{"fix":"Always prefix your model with 'ibm/'.","message":"The `model_id` must include the provider prefix (e.g., 'ibm/slate-125m-english-rtrvr'). Omitting 'ibm/' may cause a silent fallback or error.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Run `pip install ibm-watsonx-ai`.","cause":"Missing required dependency `ibm-watsonx-ai` not installed.","error":"ModuleNotFoundError: No module named 'ibm_watsonx_ai'"},{"fix":"Use `from llama_index.embeddings.ibm import WatsonxEmbeddings`.","cause":"Import path changed after version 0.5.0.","error":"ImportError: cannot import name 'WatsonxEmbeddings' from 'llama_index.embeddings.watsonx'"},{"fix":"Ensure `WATSONX_APIKEY` and `WATSONX_PROJECT_ID` are set correctly.","cause":"Missing or incorrect API key or project ID.","error":"AuthenticationError: Bearer token is invalid."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}