# Python V4 - Set api version for Azure OpenAI vectorizer?

**URL:** <https://forum.weaviate.io/t/python-v4-set-api-version-for-azure-openai-vectorizer/3306>\
**Category:** Support\
**Tags:** python, azure, documentation\
**Created:** [August 8, 2024, 4:36pm UTC](https://forum.weaviate.io/t/python-v4-set-api-version-for-azure-openai-vectorizer/3306 "2024-08-08T16:36:38Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![DudaNogueira](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/dudanogueira/32/7846_2.png) [@DudaNogueira](https://forum.weaviate.io/u/DudaNogueira)\
**Post date:** [August 8, 2024, 9:22pm UTC](https://forum.weaviate.io/t/python-v4-set-api-version-for-azure-openai-vectorizer/3306/2 "2024-08-08T21:22:40Z")

</div>

hi @Taylor_Hickman !!

I believe we have found an undocumented feature 🙂

`apiVersion`

I am not sure you can pass `apiVersion` at query time. 🤔 I will have to ask internally as I couldn’t figure out from the PR:

> <https://github.com/weaviate/weaviate/pull/4605>
>
> \### What's being changed:
> 
> This PR adds \`apiVersion\` support to \`text2vec-open…ai\` module.
> 
> It sets the default \`apiVersion\` to \`2024-02-01\` both in \`text2vec-openai\` and \`generative-openai\` modules.
> 
> \### Review checklist
> 
> \- \[\] Documentation has been updated, if necessary. Link to changed documentation:
> \- \[\] Chaos pipeline run or not necessary. Link to pipeline:
> \- \[\] All new code is covered by tests where it is reasonable.
> \- \[\] Performance tests have been run or not necessary.

You can also change the baseUrl at query time, as documented here:

> **[text2vec-openai | Weaviate - Vector Database](https://weaviate.io/developers/weaviate/modules/retriever-vectorizer-modules/text2vec-openai#query-time-parameters)**
>
> Overview

I have also found some related forum threads:

> [@Weaviate Post still using api-version=2022-12-01 even though the version has been retired](https://forum.weaviate.io/t/weaviate-post-still-using-api-version-2022-12-01-even-though-the-version-has-been-retired/1891):
>
> Hello. I am quite new to using weaviate but have enjoyed it well. Yesterday all of my embedding queries stopped working for my application as weaviate continues to try to connect to https://{resource}.openai.azure.com/openai/deployments/{deployment-id}/embeddings?api-version=2022-12-01. As of my understanding since yesterday 2.4.2024 that version has been retired. I read here that weaviate should try another version automatically. But clearly it does not so for me as it still uses 2022-12-01…

> [@Api version in Query-time parameters?](https://forum.weaviate.io/t/api-version-in-query-time-parameters/2368/3):
>
> Yes, I added those to the collection definition and those worked for vectorizing our documents. but what about when I want to deploy the application and we are using a different base\_url when deployed? So if i want to vector search with “nearText” using a different base\_url. Thas base\_url should be added in the headers like “X-OpenAI-BaseURL”: {baseUrl} since I am making REST Api calls

Let me know if this helps!

---

_[View the full topic](https://forum.weaviate.io/t/python-v4-set-api-version-for-azure-openai-vectorizer/3306)._
