A catalog of AI models in Microsoft Foundry that you can discover, compare, and deploy using Azure’s built‑in tools for evaluation, fine‑tuning, and inference
Hi @Do, Nam ,
You’re absolutely right that the Azure Inference SDK changes can be a bit confusing, especially for image embedding scenarios like Cohere Embed‑v4.
To clarify, the older OpenAI-style SDKs mainly focus on text-based scenarios and don’t fully support image embeddings. However, you can still continue using Embed‑v4 fully within Azure without needing any external services.
Here are the supported approaches:
- Use Azure AI Foundry + new Azure AI Inference APIs
The recommended path is to continue using your existing Embed‑v4 deployment in Azure AI Foundry and switch to the newer Azure AI Inference SDK or REST API.
- These newer clients fully support image embeddings
- You just need to:
- Point to your Foundry endpoint
- Use your deployment name
- Call the image embedding API
For example (Python):
from azure.ai.inference import ModelClient
from azure.identity import DefaultAzureCredential
client = ModelClient(
endpoint="https://<your-endpoint>.cognitiveservices.azure.com",
credential=DefaultAzureCredential()
)
with open("image.jpg", "rb") as f:
image_bytes = f.read()
result = client.begin_image_embeddings(
deployment_id="your-embed-v4-deployment",
image=image_bytes
).result()
print(result.embeddings)
The same approach works with REST, C#, or JavaScript.
- Optional: Container-based deployment
If you need more control, you can deploy the model as a container (Azure ML / ACI) and call it via endpoint. This uses the same inference pattern but gives you more flexibility in hosting.
You do not need to move away from Azure. The only change required is to move from the older Azure Inference/OpenAI SDK to the new Azure AI Inference SDK or REST API, which supports image embeddings.
I Hope this helps. Do let me know if you have any further queries.
Thankyou!