{"record":{"id":"aaae8cd22eb0dedf","repo":"BerriAI/litellm","slug":"api-base-is-none-please-set-azure-ai-api-base-or","errorCode":null,"errorMessage":"api_base is None. Please set AZURE_AI_API_BASE or dynamically via `api_base` param, to make the request.","messagePattern":"api_base is None\\. Please set AZURE_AI_API_BASE or dynamically via `api_base` param, to make the request\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"litellm/llms/azure_ai/embed/handler.py","lineNumber":102,"sourceCode":"            stream=False,\n            _response_headers=embedding_headers,\n        )\n        return returned_response\n\n    def image_embedding(\n        self,\n        model: str,\n        data: ImageEmbeddingRequest,\n        timeout: float,\n        logging_obj,\n        model_response: EmbeddingResponse,\n        optional_params: dict,\n        api_key: str | None,\n        api_base: str | None,\n        client: HTTPHandler | AsyncHTTPHandler | None = None,\n    ):\n        if api_base is None:\n            raise ValueError(\n                \"api_base is None. Please set AZURE_AI_API_BASE or dynamically via `api_base` param, to make the request.\"\n            )\n        if api_key is None:\n            raise ValueError(\n                \"api_key is None. Please set AZURE_AI_API_KEY or dynamically via `api_key` param, to make the request.\"\n            )\n\n        if client is None or not isinstance(client, HTTPHandler):\n            client = HTTPHandler(timeout=timeout, concurrent_limit=1)\n\n        url: Final = f\"{api_base}/images/embeddings\"\n\n        response: Final = client.post(\n            url=url,\n            json=data,\n            headers={\"Authorization\": f\"Bearer {api_key}\"},\n        )\n","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/llms/azure_ai/embed/handler.py#L84-L120","documentation":"Error \"api_base is None. Please set AZURE_AI_API_BASE or dynamically via `api_base` param, to make the request.\" thrown in BerriAI/litellm.","triggerScenarios":"Thrown at litellm/llms/azure_ai/embed/handler.py:102 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set AZURE_AI_API_BASE or pass api_base."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}